From 5b09da5079d576678eb5d66a5518044d1b22664f Mon Sep 17 00:00:00 2001 From: prep Date: Wed, 5 Jan 2011 16:07:16 -0500 Subject: Fix for SH-579 --- indra/newview/llvovolume.cpp | 53 ++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 24 deletions(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 471df30bfe..366213073e 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4068,39 +4068,44 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { LLUUID currentId = vobj->getVolume()->getParams().getSculptID(); const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( currentId ); - + if ( pSkinData ) { const int bindCnt = pSkinData->mAlternateBindMatrix.size(); if ( bindCnt > 0 ) { const int jointCnt = pSkinData->mJointNames.size(); - for ( int i=0; i=20) ? true : false; + if ( fullRig ) { - std::string lookingForJoint = pSkinData->mJointNames[i].c_str(); - LLJoint* pJoint = pAvatarVO->getJoint( lookingForJoint ); - if ( pJoint && pJoint->getId() != currentId ) - { - pJoint->setId( currentId ); - const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); - //If joint is a pelvis then handle by setting avPos+offset - if ( lookingForJoint == "mPelvis" ) - { - //Apply av pos + offset - if ( !pAvatarVO->hasPelvisOffset() ) - { - pAvatarVO->setPelvisOffset( true, jointPos ); - //Trigger to rebuild viewer AV - pelvisGotSet = true; - } + for ( int i=0; imJointNames[i].c_str(); + //llinfos<<"joint name "<getJoint( lookingForJoint ); + if ( pJoint && pJoint->getId() != currentId ) + { + pJoint->setId( currentId ); + const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); + //If joint is a pelvis then handle by setting avPos+offset + if ( lookingForJoint == "mPelvis" ) + { + //Apply av pos + offset + if ( !pAvatarVO->hasPelvisOffset() ) + { + pAvatarVO->setPelvisOffset( true, jointPos ); + //Trigger to rebuild viewer AV + pelvisGotSet = true; + } + } + else + { + //Straight set for ALL joints except pelvis + pJoint->storeCurrentXform( jointPos ); + } } - else - { - //Straight set for ALL joints except pelvis - pJoint->storeCurrentXform( jointPos ); - } } - } + } } } } -- cgit v1.2.3