From f81f5e237492189874bb44c9fc059bde3b2b894c Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Fri, 27 Dec 2013 17:57:45 +0100 Subject: [PATCH] Show the part of an animation after the loop out point when previewing. --- indra/newview/llfloaterbvhpreview.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 2544f6788..58e27b914 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -754,8 +754,25 @@ void LLFloaterBvhPreview::onBtnStop() avatarp = mAnimPreview->getDummyAvatar(); else return; +#if 0 // Singu note: See https://jira.secondlife.com/browse/SH-2590 resetMotion(); mPauseRequest = avatarp->requestPause(); +#else + // + // https://jira.secondlife.com/browse/SH-2590?focusedCommentId=286661&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-286661 + // Written by Coaldust Numbers. + // Is the motion looping and have we passed the loop in point? + if (getChild("loop_check")->getValue().asBoolean() && + (F32)getChild("loop_in_point")->getValue().asReal() <= (F32)getChild("playback_slider")->getValue().asReal() * 100.f) + { + avatarp->stopMotion(mMotionID, FALSE); + } + else + { + avatarp->stopMotion(mMotionID, TRUE); + } + // +#endif } }