diff --git a/libraries/animation/src/Flow.cpp b/libraries/animation/src/Flow.cpp index 9fb0306fa3..3bb80b9375 100644 --- a/libraries/animation/src/Flow.cpp +++ b/libraries/animation/src/Flow.cpp @@ -460,16 +460,12 @@ void Flow::calculateConstraints(const std::shared_ptr& skeleton, if (!skeleton) { return; } - int rightHandIndex = -1; auto flowPrefix = FLOW_JOINT_PREFIX.toUpper(); auto simPrefix = SIM_JOINT_PREFIX.toUpper(); std::vector handsIndices; for (int i = 0; i < skeleton->getNumJoints(); i++) { auto name = skeleton->getJointName(i); - if (name == "RightHand") { - rightHandIndex = i; - } if (std::find(HAND_COLLISION_JOINTS.begin(), HAND_COLLISION_JOINTS.end(), name) != HAND_COLLISION_JOINTS.end()) { handsIndices.push_back(i); } diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 7a00a8ecf2..4d5488cad2 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -1910,13 +1910,6 @@ void Rig::initAnimGraph(const QUrl& url) { connect(_networkLoader.get(), &AnimNodeLoader::error, [networkUrl](int error, QString str) { qCritical(animation) << "Error loading: code = " << error << "str =" << str; }); - - connect(this, &Rig::onLoadComplete, [&]() { - _internalFlow.setActive(false); - _internalFlow.cleanUp(); - _networkFlow.setActive(false); - _networkFlow.cleanUp(); - }); } } diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index 260e25009e..f61ae28db4 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -1158,6 +1158,7 @@ void Model::setURL(const QUrl& url) { resource->setLoadPriority(this, _loadingPriority); _renderWatcher.setResource(resource); } + _rig.initFlow(false); onInvalidate(); }