summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2014-10-08 11:45:12 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2014-10-08 11:45:12 -0400
commit2be54fbe6f7e19a1e924f1d62e4327da2406310d (patch)
tree8b270f88b05cf7c0a1aadb36c78fab43710e782e /indra/newview
parent1355578332b4225488918d892e21c84634fb1b40 (diff)
Switched to keying joint offsets by mesh id
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp4
-rwxr-xr-xindra/newview/llvoavatar.cpp8
-rwxr-xr-xindra/newview/llvoavatar.h2
-rwxr-xr-xindra/newview/llvovolume.cpp4
4 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 195a7f5ffe..73bf7f3e23 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1935,7 +1935,9 @@ bool LLModelLoader::doLoadModel()
LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint );
if ( pJoint )
{
- pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename);
+ LLUUID fake_mesh_id;
+ fake_mesh_id.generate();
+ pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), fake_mesh_id, gAgentAvatarp->avString());
}
else
{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 3763ea79c6..157c402795 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5076,7 +5076,7 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name )
//-----------------------------------------------------------------------------
// resetJointPositionsOnDetach
//-----------------------------------------------------------------------------
-void LLVOAvatar::resetJointPositionsOnDetach(const std::string& attachment_name)
+void LLVOAvatar::resetJointPositionsOnDetach(const LLUUID& mesh_id)
{
//Subsequent joints are relative to pelvis
avatar_joint_list_t::iterator iter = mSkeleton.begin();
@@ -5091,7 +5091,7 @@ void LLVOAvatar::resetJointPositionsOnDetach(const std::string& attachment_name)
if ( pJoint && pJoint != pJointPelvis)
{
pJoint->setId( LLUUID::null );
- pJoint->removeAttachmentPosOverride(attachment_name);
+ pJoint->removeAttachmentPosOverride(mesh_id, avString());
}
else
if ( pJoint && pJoint == pJointPelvis)
@@ -5761,8 +5761,8 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
&& pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG // full rig
&& pSkinData->mAlternateBindMatrix.size() > 0 )
{
- const std::string& attachment_name = pVO->getAttachmentItemName();
- LLVOAvatar::resetJointPositionsOnDetach(attachment_name);
+ const LLUUID& mesh_id = pSkinData->mMeshID;
+ LLVOAvatar::resetJointPositionsOnDetach(mesh_id);
//Need to handle the repositioning of the cam, updating rig data etc during outfit editing
//This handles the case where we detach a replacement rig.
if ( gAgentCamera.cameraCustomizeAvatar() )
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 4d5e616906..0fde732b6f 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -200,7 +200,7 @@ public:
virtual LLJoint* getJoint(const std::string &name);
- void resetJointPositionsOnDetach(const std::string& attachment_name);
+ void resetJointPositionsOnDetach(const LLUUID& mesh_id);
/*virtual*/ const LLUUID& getID() const;
/*virtual*/ void addDebugText(const std::string& text);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 9d16ce5a7b..35893a0354 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4637,8 +4637,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();
//Set the joint position
- const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName();
- pJoint->addAttachmentPosOverride( jointPos, attachment_name );
+ const LLUUID& mesh_id = pSkinData->mMeshID;
+ pJoint->addAttachmentPosOverride( jointPos, mesh_id, pAvatarVO->avString() );
//If joint is a pelvis then handle old/new pelvis to foot values
if ( lookingForJoint == "mPelvis" )