diff options
author | prep <prep@lindenlab.com> | 2012-11-28 16:36:34 -0500 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2012-11-28 16:36:34 -0500 |
commit | e0432f98ee515f9777604aa784d28b63d2abfe40 (patch) | |
tree | 398fcae43d9904bde2112a7085c7ef7c1a926100 /indra/newview/llfloaterbvhpreview.cpp | |
parent | bf87920fc91e2ca2b8d9f6f2656ad632c3005164 (diff) | |
parent | f5a47417fde70f78b99744386c6da0bcf78e60d5 (diff) |
SH-3563. Pull and merge from viewer-development. Modest code changes to fix alignment issue in llAppearance.
Diffstat (limited to 'indra/newview/llfloaterbvhpreview.cpp')
-rw-r--r-- | indra/newview/llfloaterbvhpreview.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index ce67c6c65d..f2deb6a805 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -422,13 +422,14 @@ void LLFloaterBvhPreview::resetMotion() LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); BOOL paused = avatarp->areAnimationsPaused(); - // *TODO: Fix awful casting hack - LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID); - - // Set emotion - std::string emote = getChild<LLUICtrl>("emote_combo")->getValue().asString(); - motionp->setEmote(mIDList[emote]); - + LLKeyframeMotion* motionp = dynamic_cast<LLKeyframeMotion*>(avatarp->findMotion(mMotionID)); + if( motionp ) + { + // Set emotion + std::string emote = getChild<LLUICtrl>("emote_combo")->getValue().asString(); + motionp->setEmote(mIDList[emote]); + } + LLUUID base_id = mIDList[getChild<LLUICtrl>("preview_base_anim")->getValue().asString()]; avatarp->deactivateAllMotions(); avatarp->startMotion(mMotionID, 0.0f); @@ -438,8 +439,12 @@ void LLFloaterBvhPreview::resetMotion() // Set pose std::string handpose = getChild<LLUICtrl>("hand_pose_combo")->getValue().asString(); avatarp->startMotion( ANIM_AGENT_HAND_MOTION, 0.0f ); - motionp->setHandPose(LLHandMotion::getHandPose(handpose)); + if( motionp ) + { + motionp->setHandPose(LLHandMotion::getHandPose(handpose)); + } + if (paused) { mPauseRequest = avatarp->requestPause(); |