summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2014-11-15 14:29:39 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2014-11-15 14:29:39 -0500
commitb1884d40f5ba74d1d39be1abad7dc416905c6caf (patch)
treeb3b35a6f4aebe3292caf2700d86dcfbb2a4a2774 /indra/newview/llvovolume.cpp
parent9c4397b6ee6d1a2a2c43d5d886b178753a4833d8 (diff)
MAINT-4537 WIP - more joint position management during outfit changes
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rwxr-xr-xindra/newview/llvovolume.cpp59
1 files changed, 5 insertions, 54 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index aebd9f470d..5707d373bf 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4517,7 +4517,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
//Determine if we've received skininfo that contains an
//alternate bind matrix - if it does then apply the translational component
//to the joints of the avatar.
+#if 0
bool pelvisGotSet = false;
+#endif
{
LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_FACE_LIST);
@@ -4602,55 +4604,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
//get drawpool of avatar with rigged face
LLDrawPoolAvatar* pool = get_avatar_drawpool(vobj);
+ // FIXME should this be inside the face loop?
+ // doesn't seem to depend on any per-face state.
if ( pAvatarVO )
{
- LLUUID currentId = vobj->getVolume()->getParams().getSculptID();
- const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( currentId, vobj );
- if ( pSkinData )
- {
- const int bindCnt = pSkinData->mAlternateBindMatrix.size();
- if ( bindCnt > 0 )
- {
- const int jointCnt = pSkinData->mJointNames.size();
- const F32 pelvisZOffset = pSkinData->mPelvisOffset;
- const LLUUID& mesh_id = pSkinData->mMeshID;
- bool fullRig = (jointCnt>=JOINT_COUNT_REQUIRED_FOR_FULLRIG) ? true : false;
- if ( fullRig )
- {
- for ( int i=0; i<jointCnt; ++i )
- {
- 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();
-
- //Set the joint position
- pJoint->addAttachmentPosOverride( jointPos, mesh_id, pAvatarVO->avString() );
-
- //If joint is a pelvis then handle old/new pelvis to foot values
- if ( lookingForJoint == "mPelvis" )
- {
- pelvisGotSet = true;
- }
- }
- }
- if (pelvisZOffset != 0.0F)
- {
- pAvatarVO->addPelvisFixup( pelvisZOffset, mesh_id );
- pelvisGotSet = true;
- }
- }
- }
- }
+ pAvatarVO->addAttachmentPosOverridesForObject(vobj);
}
-
- //Rebuild body data if we altered joints/pelvis
- if ( pelvisGotSet && pAvatarVO )
- {
- pAvatarVO->postPelvisSetRecalc();
- }
if (pool)
{
@@ -5008,14 +4967,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
}
-
-
-
-
-
-
-
-
}
group->mBufferUsage = useage;