summaryrefslogtreecommitdiffstats
path: root/src/animation/backend/clipblendvalue.cpp
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2019-09-20 07:59:48 +0100
committerMike Krus <mike.krus@kdab.com>2019-09-20 11:10:16 +0100
commit6d65beef4118e896980ba881e270e5da50a1299a (patch)
tree8c2ccbbfa0ad99c86a0c138f695806287d18c225 /src/animation/backend/clipblendvalue.cpp
parentd17f9ebe8db0ee7e365535523739f6cc5f36fdce (diff)
Update QClipBlendValue to use direct sync
Change-Id: I14add80f1519ec3047f7e5e925136230dec6874b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/animation/backend/clipblendvalue.cpp')
-rw-r--r--src/animation/backend/clipblendvalue.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/animation/backend/clipblendvalue.cpp b/src/animation/backend/clipblendvalue.cpp
index 5685d5191..e1586953b 100644
--- a/src/animation/backend/clipblendvalue.cpp
+++ b/src/animation/backend/clipblendvalue.cpp
@@ -54,22 +54,14 @@ ClipBlendValue::~ClipBlendValue()
{
}
-void ClipBlendValue::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change)
+void ClipBlendValue::syncFromFrontEnd(const Qt3DCore::QNode *frontEnd, bool firstTime)
{
- ClipBlendNode::initializeFromPeer(change);
- const auto creationChange
- = qSharedPointerCast<QClipBlendNodeCreatedChange<QClipBlendValueData>>(change);
- const Qt3DAnimation::QClipBlendValueData data = creationChange->data;
- m_clipId = data.clipId;
-}
+ BackendNode::syncFromFrontEnd(frontEnd, firstTime);
+ const QClipBlendValue *node = qobject_cast<const QClipBlendValue *>(frontEnd);
+ if (!node)
+ return;
-void ClipBlendValue::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
-{
- if (e->type() == Qt3DCore::PropertyUpdated) {
- Qt3DCore::QPropertyUpdatedChangePtr change = qSharedPointerCast<Qt3DCore::QPropertyUpdatedChange>(e);
- if (change->propertyName() == QByteArrayLiteral("clip"))
- m_clipId = change->value().value<Qt3DCore::QNodeId>();
- }
+ m_clipId = Qt3DCore::qIdForNode(node->clip());
}
ClipResults ClipBlendValue::doBlend(const QVector<ClipResults> &blendData) const