Merge pull request #11492 from SamGondelman/tPose

Fix getting stuck in T-Pose on avatar switch
This commit is contained in:
Sam Gateau 2017-09-29 13:37:31 -07:00 committed by GitHub
commit fb5fd346ff

View file

@ -249,6 +249,7 @@ void Rig::reset(const FBXGeometry& geometry) {
_rightShoulderJointIndex = _rightElbowJointIndex >= 0 ? geometry.joints.at(_rightElbowJointIndex).parentIndex : -1; _rightShoulderJointIndex = _rightElbowJointIndex >= 0 ? geometry.joints.at(_rightElbowJointIndex).parentIndex : -1;
if (!_animGraphURL.isEmpty()) { if (!_animGraphURL.isEmpty()) {
_animNode.reset();
initAnimGraph(_animGraphURL); initAnimGraph(_animGraphURL);
} }
} }
@ -1619,7 +1620,7 @@ void Rig::updateFromControllerParameters(const ControllerParameters& params, flo
} }
void Rig::initAnimGraph(const QUrl& url) { void Rig::initAnimGraph(const QUrl& url) {
if (_animGraphURL != url) { if (_animGraphURL != url || !_animNode) {
_animGraphURL = url; _animGraphURL = url;
_animNode.reset(); _animNode.reset();