diff options
| author | prep <prep@lindenlab.com> | 2011-03-14 18:02:25 -0400 | 
|---|---|---|
| committer | prep <prep@lindenlab.com> | 2011-03-14 18:02:25 -0400 | 
| commit | 16ff50719055aae202011e4b20aeae41d98493fa (patch) | |
| tree | 9afc5affdc3821f0896bb041f52d792a8ef73cec | |
| parent | 3559789967513a1f3eecf1bc1ad38d9b073cb296 (diff) | |
WIP:Added pelvis offset to skinning info
| -rwxr-xr-x | indra/llprimitive/llmodel.cpp | 4 | ||||
| -rwxr-xr-x | indra/llprimitive/llmodel.h | 1 | ||||
| -rwxr-xr-x | indra/newview/llmeshrepository.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llmeshrepository.h | 1 | 
4 files changed, 12 insertions, 1 deletions
| diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index a9101378a4..eed82f924b 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -57,6 +57,7 @@ const int MODEL_NAMES_LENGTH = sizeof(model_names) / sizeof(std::string);  LLModel::LLModel(LLVolumeParams& params, F32 detail)  	: LLVolume(params, detail), mNormalizedScale(1,1,1), mNormalizedTranslation(0,0,0) +	, mPelvisOffset( 0.0f )  {  	mDecompID = -1;  } @@ -1497,6 +1498,7 @@ LLSD LLModel::writeModel(  			}  		} +		  		if ( upload_joints && high->mAlternateBindMatrix.size() > 0 )  		{  			for (U32 i = 0; i < high->mJointList.size(); ++i) @@ -1509,6 +1511,8 @@ LLSD LLModel::writeModel(  					}  				}  			} + +			mdl["skin"]["pelvis_offset"] = high->mPelvisOffset;  		}  	} diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index c10ca1c11b..e9e33bdee5 100755 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -194,6 +194,7 @@ public:  	LLVector3 mNormalizedScale;  	LLVector3 mNormalizedTranslation; +	float	mPelvisOffset;  	// convex hull decomposition  	S32 mDecompID;  	convex_hull_decomposition mConvexHullDecomp; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index e259ee9846..8e869b2d5b 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1162,7 +1162,12 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat  				info.mAlternateBindMatrix.push_back(mat);  			}  		} -		 + +		if (skin.has("pelvis_offset")) +		{ +			info.mPelvisOffset = skin["pelvis_offset"].asReal(); +		} +  		mSkinInfoQ.push(info);  	} diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 0fcb2213de..ccdcc03310 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -131,6 +131,7 @@ public:  	std::vector<LLMatrix4> mAlternateBindMatrix;  	LLMatrix4 mBindShapeMatrix; +	float mPelvisOffset;  };  class LLMeshDecomposition | 
