diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 947a985681..3b1aee77d1 100755 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -166,7 +166,9 @@ void LLFloaterBvhPreview::setAnimCallbacks() getChild("playback_slider")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onSliderMove, this)); getChild("preview_base_anim")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitBaseAnim, this)); - getChild("preview_base_anim")->setValue("Standing"); + // FIRE-17251: Use the XUI values for defaults + //getChild("preview_base_anim")->setValue("Standing"); + // getChild("priority")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitPriority, this)); getChild("loop_check")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitLoop, this)); @@ -178,7 +180,9 @@ void LLFloaterBvhPreview::setAnimCallbacks() getChild("hand_pose_combo")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitHandPose, this)); getChild("emote_combo")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitEmote, this)); - getChild("emote_combo")->setValue("[None]"); + // FIRE-17251: Use the XUI values for defaults + //getChild("emote_combo")->setValue("[None]"); + // getChild("ease_in_time")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitEaseIn, this)); getChild("ease_in_time")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateEaseIn, this, _1)); @@ -371,13 +375,22 @@ BOOL LLFloaterBvhPreview::loadBVH() getChild("playback_slider")->setMinValue(0.0); getChild("playback_slider")->setMaxValue(1.0); - getChild("loop_check")->setValue(LLSD(motionp->getLoop())); - getChild("loop_in_point")->setValue(LLSD(motionp->getLoopIn() / motionp->getDuration() * 100.f)); - getChild("loop_out_point")->setValue(LLSD(motionp->getLoopOut() / motionp->getDuration() * 100.f)); - getChild("priority")->setValue(LLSD((F32)motionp->getPriority())); - getChild("hand_pose_combo")->setValue(LLHandMotion::getHandPoseName(motionp->getHandPose())); - getChild("ease_in_time")->setValue(LLSD(motionp->getEaseInDuration())); - getChild("ease_out_time")->setValue(LLSD(motionp->getEaseOutDuration())); + // FIRE-17251: Use defaults from XUI, not from the JointMotionList constructor + //getChild("loop_check")->setValue(LLSD(motionp->getLoop())); + //getChild("loop_in_point")->setValue(LLSD(motionp->getLoopIn() / motionp->getDuration() * 100.f)); + //getChild("loop_out_point")->setValue(LLSD(motionp->getLoopOut() / motionp->getDuration() * 100.f)); + //getChild("priority")->setValue(LLSD((F32)motionp->getPriority())); + //getChild("hand_pose_combo")->setValue(LLHandMotion::getHandPoseName(motionp->getHandPose())); + //getChild("ease_in_time")->setValue(LLSD(motionp->getEaseInDuration())); + //getChild("ease_out_time")->setValue(LLSD(motionp->getEaseOutDuration())); + motionp->setLoop(getChild("loop_check")->getValue().asBoolean()); + motionp->setLoopIn((F32)getChild("loop_in_point")->getValue().asReal() / 100.f * motionp->getDuration()); + motionp->setLoopOut((F32)getChild("loop_out_point")->getValue().asReal() / 100.f * motionp->getDuration()); + motionp->setPriority(getChild("priority")->getValue().asInteger()); + motionp->setHandPose(LLHandMotion::getHandPose(getChild("hand_pose_combo")->getValue().asString())); + motionp->setEaseIn((F32)getChild("ease_in_time")->getValue().asReal()); + motionp->setEaseOut((F32)getChild("ease_out_time")->getValue().asReal()); + // setEnabled(TRUE); std::string seconds_string; seconds_string = llformat(" - %.2f seconds", motionp->getDuration()); diff --git a/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml index 9cb3ab83bf..453a92c5e5 100755 --- a/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml @@ -193,7 +193,7 @@ Maximum animation length is [MAX_LENGTH] seconds. follows="left|top" height="23" increment="1" - initial_value="0" + initial_value="2" label="Priority" label_width="88" layout="topleft" @@ -209,6 +209,7 @@ Maximum animation length is [MAX_LENGTH] seconds. layout="topleft" left="10" width="100" + initial_value="false" name="loop_check" tool_tip="Makes this animation loop" /> @@ -330,6 +333,8 @@ Maximum animation length is [MAX_LENGTH] seconds. width="130" layout="topleft" left_pad="20" + initial_value="" + label=" " name="emote_combo" tool_tip="Controls what face does during animation">