added the new hand anims to the resource, and added hand reset to initAnimGraph

This commit is contained in:
Angus Antley 2019-03-27 12:00:50 -07:00
parent 02d9331603
commit d71c6c28de
13 changed files with 14 additions and 0 deletions

View file

@ -2217,6 +2217,20 @@ void Rig::initAnimGraph(const QUrl& url) {
overrideAnimation(origState.url, origState.fps, origState.loop, origState.firstFrame, origState.lastFrame);
}
if (_rightHandAnimState.clipNodeEnum != HandAnimState::None) {
// restore the right hand animation we had before reset.
HandAnimState origState = _rightHandAnimState;
_rightHandAnimState = { HandAnimState::None, "", 30.0f, false, 0.0f, 0.0f };
overrideHandAnimation(false, origState.url, origState.fps, origState.loop, origState.firstFrame, origState.lastFrame);
}
if (_leftHandAnimState.clipNodeEnum != HandAnimState::None) {
// restore the left hand animation we had before reset.
HandAnimState origState = _leftHandAnimState;
_leftHandAnimState = { HandAnimState::None, "", 30.0f, false, 0.0f, 0.0f };
overrideHandAnimation(true, origState.url, origState.fps, origState.loop, origState.firstFrame, origState.lastFrame);
}
// restore the role animations we had before reset.
for (auto& roleAnimState : _roleAnimStates) {
auto roleState = roleAnimState.second;