diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-02-22 15:23:33 +0000 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-02-24 20:41:44 +0000 |
commit | 3624ddb7beeff87196cf1ccc6684dd05457945e1 (patch) | |
tree | 5b3e53c861528fa07bc8122b7a6a954821952a7e /src/animation/backend/lerpclipblend.cpp | |
parent | 28938073a228a38c2a5beccdb3357b5a8c172def (diff) |
Add startClip and endClip properties to QLerpClipBlend
Task-number: QTBUG-58904
Change-Id: I67a28b5f311d0065e8ca81df692de33ef1aeefcf
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Diffstat (limited to 'src/animation/backend/lerpclipblend.cpp')
-rw-r--r-- | src/animation/backend/lerpclipblend.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/animation/backend/lerpclipblend.cpp b/src/animation/backend/lerpclipblend.cpp index 1121f0324..7e10a5174 100644 --- a/src/animation/backend/lerpclipblend.cpp +++ b/src/animation/backend/lerpclipblend.cpp @@ -47,6 +47,8 @@ namespace Animation { LerpClipBlend::LerpClipBlend() : ClipBlendNode(ClipBlendNode::LerpBlendType) + , m_startClipId() + , m_endClipId() , m_blendFactor(0.0f) { } @@ -61,6 +63,10 @@ void LerpClipBlend::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Qt3DCore::QPropertyUpdatedChangePtr change = qSharedPointerCast<Qt3DCore::QPropertyUpdatedChange>(e); if (change->propertyName() == QByteArrayLiteral("blendFactor")) m_blendFactor = change->value().toFloat(); + else if (change->propertyName() == QByteArrayLiteral("startClip")) + m_startClipId = change->value().value<Qt3DCore::QNodeId>(); + else if (change->propertyName() == QByteArrayLiteral("endClip")) + m_endClipId = change->value().value<Qt3DCore::QNodeId>(); } } @@ -74,6 +80,8 @@ void LerpClipBlend::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr ClipBlendNode::initializeFromPeer(change); const auto creationChangeData = qSharedPointerCast<Qt3DAnimation::QClipBlendNodeCreatedChange<Qt3DAnimation::QLerpClipBlendData>>(change); const Qt3DAnimation::QLerpClipBlendData cloneData = creationChangeData->data; + m_startClipId = cloneData.startClipId; + m_endClipId = cloneData.endClipId; m_blendFactor = cloneData.blendFactor; } |