diff options
Diffstat (limited to 'src/animation/backend/blendedclipanimator.cpp')
-rw-r--r-- | src/animation/backend/blendedclipanimator.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/animation/backend/blendedclipanimator.cpp b/src/animation/backend/blendedclipanimator.cpp index 46b3b87fa..ec0a5027a 100644 --- a/src/animation/backend/blendedclipanimator.cpp +++ b/src/animation/backend/blendedclipanimator.cpp @@ -60,6 +60,7 @@ void BlendedClipAnimator::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeB const QBlendedClipAnimatorData &data = typedChange->data; m_blendTreeRootId = data.blendTreeRootId; m_mapperId = data.mapperId; + m_clockId = data.clockId; m_running = data.running; m_loops = data.loops; setDirty(Handler::BlendedClipAnimatorDirty); @@ -71,6 +72,7 @@ void BlendedClipAnimator::cleanup() m_handler = nullptr; m_blendTreeRootId = Qt3DCore::QNodeId(); m_mapperId = Qt3DCore::QNodeId(); + m_clockId = Qt3DCore::QNodeId(); m_running = false; m_startGlobalTime = 0; m_currentLoop = 0; @@ -89,6 +91,12 @@ void BlendedClipAnimator::setMapperId(Qt3DCore::QNodeId mapperId) setDirty(Handler::BlendedClipAnimatorDirty); } +void BlendedClipAnimator::setClockId(Qt3DCore::QNodeId clockId) +{ + m_clockId = clockId; + setDirty(Handler::BlendedClipAnimatorDirty); +} + void BlendedClipAnimator::setRunning(bool running) { m_running = running; @@ -130,6 +138,8 @@ void BlendedClipAnimator::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) setBlendTreeRootId(change->value().value<Qt3DCore::QNodeId>()); else if (change->propertyName() == QByteArrayLiteral("channelMapper")) setMapperId(change->value().value<Qt3DCore::QNodeId>()); + else if (change->propertyName() == QByteArrayLiteral("clock")) + setClockId(change->value().value<Qt3DCore::QNodeId>()); else if (change->propertyName() == QByteArrayLiteral("running")) setRunning(change->value().toBool()); else if (change->propertyName() == QByteArrayLiteral("loops")) |