From 97374a5362f097afd3027ea51757de2e36af4798 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Tue, 27 Oct 2015 15:15:34 -0700 Subject: Fixes SL-202 joint offset and skin weight import. Race condition still exists. --- indra/llprimitive/lldaeloader.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'indra/llprimitive/lldaeloader.cpp') diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index 6db6bc4dc7..b4c5c844ef 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -1303,8 +1303,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do mat.mMatrix[i][j] = transform[k*16 + i + j*4]; } } - - model->mSkinInfo.mInvBindMatrix.push_back(mat); + model->mSkinInfo.mInvBindMatrix.push_back(mat); } } } @@ -1362,20 +1361,15 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do std::string lookingForJoint = (*jointIt).c_str(); //Look for the joint xform that we extracted from the skeleton, using the jointIt as the key //and store it in the alternate bind matrix - if ( mJointList.find( lookingForJoint ) != mJointList.end() ) + if ( mJointMap.find( lookingForJoint ) != mJointMap.end() ) { - LLMatrix4 jointTransform = mJointList[lookingForJoint]; LLMatrix4 newInverse = model->mSkinInfo.mInvBindMatrix[i]; newInverse.setTranslation( mJointList[lookingForJoint].getTranslation() ); model->mSkinInfo.mAlternateBindMatrix.push_back( newInverse ); } else { - LL_WARNS()<<"Possibly misnamed/missing joint [" <mSkinInfo.mAlternateBindMatrix.push_back( emptyInverse ); + LL_WARNS()<<"Possibly misnamed/missing joint [" <