diff options
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index da84a6b8f8..168fb13d11 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1755,9 +1755,17 @@ void LLModelPreview::getJointAliases( JointMap& joint_map) //Joint names and aliases come from avatar_skeleton.xml joint_map = av->getJointAliases(); - for (S32 i = 0; i < av->mNumCollisionVolumes; i++) + + std::vector<std::string> cv_names, attach_names; + av->getSortedJointNames(1, cv_names); + av->getSortedJointNames(2, attach_names); + for (std::vector<std::string>::iterator it = cv_names.begin(); it != cv_names.end(); ++it) + { + joint_map[*it] = *it; + } + for (std::vector<std::string>::iterator it = attach_names.begin(); it != attach_names.end(); ++it) { - joint_map[av->mCollisionVolumes[i].getName()] = av->mCollisionVolumes[i].getName(); + joint_map[*it] = *it; } } @@ -3443,16 +3451,11 @@ void LLModelPreview::update() //----------------------------------------------------------------------------- void LLModelPreview::createPreviewAvatar( void ) { - mPreviewAvatar = (LLVOAvatar*)gObjectList.createObjectViewer( LL_PCODE_LEGACY_AVATAR, gAgent.getRegion() ); + mPreviewAvatar = (LLVOAvatar*)gObjectList.createObjectViewer( LL_PCODE_LEGACY_AVATAR, gAgent.getRegion(), LLViewerObject::CO_FLAG_UI_AVATAR ); if ( mPreviewAvatar ) { mPreviewAvatar->createDrawable( &gPipeline ); - mPreviewAvatar->mIsDummy = TRUE; mPreviewAvatar->mSpecialRenderMode = 1; - mPreviewAvatar->setPositionAgent( LLVector3::zero ); - mPreviewAvatar->slamPosition(); - mPreviewAvatar->updateJointLODs(); - mPreviewAvatar->updateGeometry( mPreviewAvatar->mDrawable ); mPreviewAvatar->startMotion( ANIM_AGENT_STAND ); mPreviewAvatar->hideSkirt(); } |