summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSean Harmer <sh@theharmers.co.uk>2017-08-31 15:57:12 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-09-26 10:53:08 +0000
commit3aefe68f281f1815dcb6ca73751d17b470429a0f (patch)
treeb8a4d2f874c144681b2e69c65e500a31e46c1bd0 /src
parent72e80520d36802672eca1e93bc6c6019e6f5ffc3 (diff)
Fix gathering clip value node ids
This correctly handles the case where the blend tree consists of a single value node. Added test case to catch it. Change-Id: I8982d2081748866d163f107a4513bd2d17feb83a Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/animation/backend/animationutils.cpp4
-rw-r--r--src/animation/backend/clipblendvalue_p.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/animation/backend/animationutils.cpp b/src/animation/backend/animationutils.cpp
index c12ad99f7..1583a7fd7 100644
--- a/src/animation/backend/animationutils.cpp
+++ b/src/animation/backend/animationutils.cpp
@@ -467,6 +467,10 @@ QVector<Qt3DCore::QNodeId> gatherValueNodesToEvaluate(Handler *handler,
ClipBlendNodeVisitor::VisitOnlyDependencies);
auto func = [&clipIds, nodeManager] (ClipBlendNode *blendNode) {
+ // Check if this is a value node itself
+ if (blendNode->blendType() == ClipBlendNode::ValueType)
+ clipIds.append(blendNode->peerId());
+
const auto dependencyIds = blendNode->currentDependencyIds();
for (const auto dependencyId : dependencyIds) {
// Look up the blend node and if it's a value type (clip),
diff --git a/src/animation/backend/clipblendvalue_p.h b/src/animation/backend/clipblendvalue_p.h
index 6da800f98..5ff8d2b0f 100644
--- a/src/animation/backend/clipblendvalue_p.h
+++ b/src/animation/backend/clipblendvalue_p.h
@@ -73,7 +73,7 @@ public:
inline QVector<Qt3DCore::QNodeId> currentDependencyIds() const Q_DECL_OVERRIDE
{
- return { m_clipId };
+ return {};
}
double duration() const Q_DECL_OVERRIDE;