Merge pull request #11515 from SamGondelman/threePose3

Fix Local T-Pose
This commit is contained in:
Sam Gondelman 2017-10-03 13:52:38 -07:00 committed by GitHub
commit 10e85e7ab0
2 changed files with 4 additions and 1 deletions

View file

@ -1620,13 +1620,14 @@ void Rig::updateFromControllerParameters(const ControllerParameters& params, flo
}
void Rig::initAnimGraph(const QUrl& url) {
if (_animGraphURL != url || !_animNode) {
if (_animGraphURL != url || (!_animNode && !_animLoading)) {
_animGraphURL = url;
_animNode.reset();
// load the anim graph
_animLoader.reset(new AnimNodeLoader(url));
_animLoading = true;
connect(_animLoader.get(), &AnimNodeLoader::success, [this](AnimNode::Pointer nodeIn) {
_animNode = nodeIn;
_animNode->setSkeleton(_animSkeleton);
@ -1637,6 +1638,7 @@ void Rig::initAnimGraph(const QUrl& url) {
_userAnimState = { UserAnimState::None, "", 30.0f, false, 0.0f, 0.0f };
overrideAnimation(origState.url, origState.fps, origState.loop, origState.firstFrame, origState.lastFrame);
}
_animLoading = false;
emit onLoadComplete();
});

View file

@ -303,6 +303,7 @@ protected:
std::shared_ptr<AnimNode> _animNode;
std::shared_ptr<AnimSkeleton> _animSkeleton;
std::unique_ptr<AnimNodeLoader> _animLoader;
bool _animLoading { false };
AnimVariantMap _animVars;
enum class RigRole {
Idle = 0,