From b8ea6c22fa55cdc840a0f803433ff745edc873a0 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Fri, 29 Sep 2017 11:14:29 -0700 Subject: [PATCH] no tpose when switching avatars (cherry picked from commit fcfac9efc0b4787872eda616165cc70f43be093c) --- libraries/animation/src/Rig.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 86a1e629b4..712c728dcb 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -249,6 +249,7 @@ void Rig::reset(const FBXGeometry& geometry) { _rightShoulderJointIndex = _rightElbowJointIndex >= 0 ? geometry.joints.at(_rightElbowJointIndex).parentIndex : -1; if (!_animGraphURL.isEmpty()) { + _animNode.reset(); initAnimGraph(_animGraphURL); } } @@ -1619,7 +1620,7 @@ void Rig::updateFromControllerParameters(const ControllerParameters& params, flo } void Rig::initAnimGraph(const QUrl& url) { - if (_animGraphURL != url) { + if (_animGraphURL != url || !_animNode) { _animGraphURL = url; _animNode.reset();