Skip to content
Snippets Groups Projects
Commit f9c9a894 authored by Nicky's avatar Nicky
Browse files

Crashfix in animation preview floater.

parent 57d36df3
No related branches found
No related tags found
No related merge requests found
...@@ -422,13 +422,14 @@ void LLFloaterBvhPreview::resetMotion() ...@@ -422,13 +422,14 @@ void LLFloaterBvhPreview::resetMotion()
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
BOOL paused = avatarp->areAnimationsPaused(); BOOL paused = avatarp->areAnimationsPaused();
// *TODO: Fix awful casting hack LLKeyframeMotion* motionp = dynamic_cast<LLKeyframeMotion*>(avatarp->findMotion(mMotionID));
LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID); if( motionp )
{
// Set emotion // Set emotion
std::string emote = getChild<LLUICtrl>("emote_combo")->getValue().asString(); std::string emote = getChild<LLUICtrl>("emote_combo")->getValue().asString();
motionp->setEmote(mIDList[emote]); motionp->setEmote(mIDList[emote]);
}
LLUUID base_id = mIDList[getChild<LLUICtrl>("preview_base_anim")->getValue().asString()]; LLUUID base_id = mIDList[getChild<LLUICtrl>("preview_base_anim")->getValue().asString()];
avatarp->deactivateAllMotions(); avatarp->deactivateAllMotions();
avatarp->startMotion(mMotionID, 0.0f); avatarp->startMotion(mMotionID, 0.0f);
...@@ -438,8 +439,12 @@ void LLFloaterBvhPreview::resetMotion() ...@@ -438,8 +439,12 @@ void LLFloaterBvhPreview::resetMotion()
// Set pose // Set pose
std::string handpose = getChild<LLUICtrl>("hand_pose_combo")->getValue().asString(); std::string handpose = getChild<LLUICtrl>("hand_pose_combo")->getValue().asString();
avatarp->startMotion( ANIM_AGENT_HAND_MOTION, 0.0f ); avatarp->startMotion( ANIM_AGENT_HAND_MOTION, 0.0f );
motionp->setHandPose(LLHandMotion::getHandPose(handpose));
if( motionp )
{
motionp->setHandPose(LLHandMotion::getHandPose(handpose));
}
if (paused) if (paused)
{ {
mPauseRequest = avatarp->requestPause(); mPauseRequest = avatarp->requestPause();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment