From bac5cf9bbba1f5584653acadc62f827406ced300 Mon Sep 17 00:00:00 2001 From: Angus Antley Date: Mon, 22 Apr 2019 14:35:04 -0700 Subject: [PATCH] fixed the debug state info updating --- libraries/animation/src/AnimRandomSwitch.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libraries/animation/src/AnimRandomSwitch.cpp b/libraries/animation/src/AnimRandomSwitch.cpp index 46c8e4fccf..e1de08c38a 100644 --- a/libraries/animation/src/AnimRandomSwitch.cpp +++ b/libraries/animation/src/AnimRandomSwitch.cpp @@ -104,18 +104,21 @@ const AnimPoseVec& AnimRandomSwitch::evaluate(const AnimVariantMap& animVars, co _prevPoses.clear(); _nextPoses.clear(); } - if (_duringInterp) { - // hack: add previoius state to debug alpha map, with parens around it's name. - context.setDebugAlpha(QString("(%1)").arg(_previousState->getID()), 1.0f - _alpha, AnimNodeType::Clip); - } - }else { + } + + if (!_duringInterp){ context.setDebugAlpha(_currentState->getID(), parentDebugAlpha, _children[_currentState->getChildIndex()]->getType()); _poses = currentStateNode->evaluate(animVars, context, dt, triggersOut); } _framesActive = context.getFramesAnimatedThisSession(); processOutputJoints(triggersOut); + context.addStateMachineInfo(_id, _currentState->getID(), _previousState->getID(), _duringInterp, _alpha); + if (_duringInterp) { + // hack: add previoius state to debug alpha map, with parens around it's name. + context.setDebugAlpha(QString("(%1)").arg(_previousState->getID()), 1.0f - _alpha, AnimNodeType::Clip); + } return _poses; }