mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 16:18:03 +02:00
Merge pull request #11515 from SamGondelman/threePose3
Fix Local T-Pose
This commit is contained in:
commit
10e85e7ab0
2 changed files with 4 additions and 1 deletions
|
@ -1620,13 +1620,14 @@ void Rig::updateFromControllerParameters(const ControllerParameters& params, flo
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rig::initAnimGraph(const QUrl& url) {
|
void Rig::initAnimGraph(const QUrl& url) {
|
||||||
if (_animGraphURL != url || !_animNode) {
|
if (_animGraphURL != url || (!_animNode && !_animLoading)) {
|
||||||
_animGraphURL = url;
|
_animGraphURL = url;
|
||||||
|
|
||||||
_animNode.reset();
|
_animNode.reset();
|
||||||
|
|
||||||
// load the anim graph
|
// load the anim graph
|
||||||
_animLoader.reset(new AnimNodeLoader(url));
|
_animLoader.reset(new AnimNodeLoader(url));
|
||||||
|
_animLoading = true;
|
||||||
connect(_animLoader.get(), &AnimNodeLoader::success, [this](AnimNode::Pointer nodeIn) {
|
connect(_animLoader.get(), &AnimNodeLoader::success, [this](AnimNode::Pointer nodeIn) {
|
||||||
_animNode = nodeIn;
|
_animNode = nodeIn;
|
||||||
_animNode->setSkeleton(_animSkeleton);
|
_animNode->setSkeleton(_animSkeleton);
|
||||||
|
@ -1637,6 +1638,7 @@ void Rig::initAnimGraph(const QUrl& url) {
|
||||||
_userAnimState = { UserAnimState::None, "", 30.0f, false, 0.0f, 0.0f };
|
_userAnimState = { UserAnimState::None, "", 30.0f, false, 0.0f, 0.0f };
|
||||||
overrideAnimation(origState.url, origState.fps, origState.loop, origState.firstFrame, origState.lastFrame);
|
overrideAnimation(origState.url, origState.fps, origState.loop, origState.firstFrame, origState.lastFrame);
|
||||||
}
|
}
|
||||||
|
_animLoading = false;
|
||||||
|
|
||||||
emit onLoadComplete();
|
emit onLoadComplete();
|
||||||
});
|
});
|
||||||
|
|
|
@ -303,6 +303,7 @@ protected:
|
||||||
std::shared_ptr<AnimNode> _animNode;
|
std::shared_ptr<AnimNode> _animNode;
|
||||||
std::shared_ptr<AnimSkeleton> _animSkeleton;
|
std::shared_ptr<AnimSkeleton> _animSkeleton;
|
||||||
std::unique_ptr<AnimNodeLoader> _animLoader;
|
std::unique_ptr<AnimNodeLoader> _animLoader;
|
||||||
|
bool _animLoading { false };
|
||||||
AnimVariantMap _animVars;
|
AnimVariantMap _animVars;
|
||||||
enum class RigRole {
|
enum class RigRole {
|
||||||
Idle = 0,
|
Idle = 0,
|
||||||
|
|
Loading…
Reference in a new issue