diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-08-14 15:00:08 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-08-14 15:00:08 -0400 |
commit | 2a57da233423ca3531bfcec2e138023afead4c3f (patch) | |
tree | 6d21fe57ca108b82b48bfd10d25a3a593bb3b478 /indra/newview/llfloatermodelpreview.cpp | |
parent | 590d0e35e542fe3d973e5a67e1a7db34c0429701 (diff) |
SL-125 WIP - updated base bento repo excluding dynamic skeleton.
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 59 |
1 files changed, 17 insertions, 42 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 2a2c0b81f0..23c5b7192d 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1316,48 +1316,8 @@ LLModelLoader::LLModelLoader( std::string filename, S32 lod, LLModelPreview* pre , mJointsFromNode( jointsFromNodes ) , LLThread("Model Loader"), mFilename(filename), mLod(lod), mPreview(preview), mFirstTransform(TRUE), mNumOfFetchingTextures(0) { - mJointMap["mPelvis"] = "mPelvis"; - mJointMap["mTorso"] = "mTorso"; - mJointMap["mChest"] = "mChest"; - mJointMap["mNeck"] = "mNeck"; - mJointMap["mHead"] = "mHead"; - mJointMap["mSkull"] = "mSkull"; - mJointMap["mEyeRight"] = "mEyeRight"; - mJointMap["mEyeLeft"] = "mEyeLeft"; - mJointMap["mCollarLeft"] = "mCollarLeft"; - mJointMap["mShoulderLeft"] = "mShoulderLeft"; - mJointMap["mElbowLeft"] = "mElbowLeft"; - mJointMap["mWristLeft"] = "mWristLeft"; - mJointMap["mCollarRight"] = "mCollarRight"; - mJointMap["mShoulderRight"] = "mShoulderRight"; - mJointMap["mElbowRight"] = "mElbowRight"; - mJointMap["mWristRight"] = "mWristRight"; - mJointMap["mHipRight"] = "mHipRight"; - mJointMap["mKneeRight"] = "mKneeRight"; - mJointMap["mAnkleRight"] = "mAnkleRight"; - mJointMap["mFootRight"] = "mFootRight"; - mJointMap["mToeRight"] = "mToeRight"; - mJointMap["mHipLeft"] = "mHipLeft"; - mJointMap["mKneeLeft"] = "mKneeLeft"; - mJointMap["mAnkleLeft"] = "mAnkleLeft"; - mJointMap["mFootLeft"] = "mFootLeft"; - mJointMap["mToeLeft"] = "mToeLeft"; - - // FIXME BENTO change this to use the skeleton info rather than hardwiring - mJointMap["mLeftWingShoulder"] = "mLeftWingShoulder"; - mJointMap["mLeftWingElbow"] = "mLeftWingElbow"; - mJointMap["mLeftWingWrist"] = "mLeftWingWrist"; - mJointMap["mLeftWingTip"] = "mLeftWingTip"; - mJointMap["mRightWingShoulder"] = "mRightWingShoulder"; - mJointMap["mRightWingElbow"] = "mRightWingElbow"; - mJointMap["mRightWingWrist"] = "mRightWingWrist"; - mJointMap["mRightWingTip"] = "mRightWingTip"; - - mJointMap["mTail_1"] = "mTail_1"; - mJointMap["mTail_2"] = "mTail_2"; - mJointMap["mTail_3"] = "mTail_3"; - mJointMap["mTail_4"] = "mTail_4"; - + // Accepted joint aliases - the origins and continued relevance of these is unclear. + mJointMap["avatar_mPelvis"] = "mPelvis"; mJointMap["avatar_mTorso"] = "mTorso"; mJointMap["avatar_mChest"] = "mChest"; @@ -1407,6 +1367,21 @@ LLModelLoader::LLModelLoader( std::string filename, S32 lod, LLModelPreview* pre mJointMap["lShin"] = "mKneeLeft"; mJointMap["lFoot"] = "mFootLeft"; + // Get all standard skeleton joints from the preview avatar. + if (mPreview) + { + LLVOAvatar *av = mPreview->getPreviewAvatar(); + const LLVOAvatar::avatar_joint_list_t &skel = av->getSkeleton(); + for (S32 i=0; i<skel.size(); i++) + { + LLAvatarJoint *joint = skel[i]; + if (joint) + { + mJointMap[joint->getName()] = joint->getName(); + } + } + } + if (mPreview) { //only try to load from slm if viewer is configured to do so and this is the |