Mesh-related updates. In particular, cleanupAttachedMesh wasn't called!
This commit is contained in:
@@ -5804,19 +5804,6 @@ void LLVOAvatar::resetSpecificJointPosition( const std::string& name )
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLVOAvatar::resetJointPositionsToDefault( void )
|
||||
{
|
||||
const LLVector3& avPos = getCharacterPosition();
|
||||
|
||||
//Reposition the pelvis
|
||||
LLJoint* pPelvis = mRoot.findJoint("mPelvis");
|
||||
if ( pPelvis )
|
||||
{
|
||||
pPelvis->setPosition( avPos + pPelvis->getPosition() );
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns<<"Can't get pelvis joint."<<llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
//Subsequent joints are relative to pelvis
|
||||
for( S32 i = 0; i < (S32)mNumJoints; ++i )
|
||||
@@ -5827,7 +5814,7 @@ void LLVOAvatar::resetJointPositionsToDefault( void )
|
||||
|
||||
pJoint->setId( LLUUID::null );
|
||||
//restore joints to default positions, however skip over the pelvis
|
||||
if ( pJoint && pPelvis != pJoint )
|
||||
if ( pJoint )
|
||||
{
|
||||
pJoint->restoreOldXform();
|
||||
}
|
||||
@@ -7041,6 +7028,14 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
|
||||
if ( bindCnt > 0 )
|
||||
{
|
||||
LLVOAvatar::resetJointPositionsToDefault();
|
||||
//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() )
|
||||
{
|
||||
gAgent.unpauseAnimation();
|
||||
//Still want to refocus on head bone
|
||||
gAgentCamera.changeCameraToCustomizeAvatar();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7077,7 +7072,7 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
cleanupAttachedMesh( viewer_object );
|
||||
LLUUID item_id = viewer_object->getAttachmentItemID();
|
||||
attachment->removeObject(viewer_object);
|
||||
if (isSelf())
|
||||
|
||||
Reference in New Issue
Block a user