no tpose when switching avatars

This commit is contained in:
SamGondelman 2017-09-29 11:14:29 -07:00
parent da3d5a92d9
commit fcfac9efc0

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();