Disable the old-school Rig::inverseKinematics during reset.

This commit is contained in:
Howard Stearns 2015-09-24 15:33:52 -07:00
parent 426ccabba7
commit 266c69fc70
3 changed files with 4 additions and 1 deletions

View file

@ -156,6 +156,7 @@ void MyAvatar::reset() {
bool isRig = _rig->getEnableRig();
bool isGraph = _rig->getEnableAnimGraph();
qApp->setRawAvatarUpdateThreading(false);
_rig->disableHands = true;
setEnableRigAnimations(true);
_skeletonModel.simulate(0.1f); // non-zero
setEnableRigAnimations(false);
@ -167,6 +168,7 @@ void MyAvatar::reset() {
setEnableAnimGraph(true);
Menu::getInstance()->setIsOptionChecked(MenuOption::EnableAnimGraph, true);
}
_rig->disableHands = false;
qApp->setRawAvatarUpdateThreading();
}

View file

@ -738,7 +738,7 @@ void Rig::inverseKinematics(int endIndex, glm::vec3 targetPosition, const glm::q
return;
}
if (_enableAnimGraph && _animSkeleton) {
if (disableHands || (_enableAnimGraph && _animSkeleton)) {
// the hand data goes through a different path: Rig::updateFromHandParameters() --> early-exit
return;
}

View file

@ -193,6 +193,7 @@ public:
AnimNode::ConstPointer getAnimNode() const { return _animNode; }
AnimSkeleton::ConstPointer getAnimSkeleton() const { return _animSkeleton; }
bool disableHands {false}; // should go away with rig animation (and Rig::inverseKinematics)
protected: