summaryrefslogtreecommitdiffstats
path: root/src/animation/backend/clipblendvalue.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-10-08 11:01:30 +0100
committerSean Harmer <sean.harmer@kdab.com>2018-01-22 09:45:15 +0000
commitea12f3be4b6b4e5d117bad6d5446ca8517905c0b (patch)
tree280a38bf62cd1b545b8092f967502ca917e4e8ce /src/animation/backend/clipblendvalue.cpp
parentf91ee783c5704b0d55da0d96dacf6eca8933e748 (diff)
Generate default channel values as needed
Change-Id: I20871448ba10cf6459b156d00bebdf7a7c8a319b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/animation/backend/clipblendvalue.cpp')
-rw-r--r--src/animation/backend/clipblendvalue.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/animation/backend/clipblendvalue.cpp b/src/animation/backend/clipblendvalue.cpp
index c1de1fea7..5685d5191 100644
--- a/src/animation/backend/clipblendvalue.cpp
+++ b/src/animation/backend/clipblendvalue.cpp
@@ -102,12 +102,16 @@ void ClipBlendValue::setClipFormat(Qt3DCore::QNodeId animatorId, const ClipForma
}
}
-ClipFormat ClipBlendValue::clipFormat(Qt3DCore::QNodeId animatorId)
+ClipFormat &ClipBlendValue::clipFormat(Qt3DCore::QNodeId animatorId)
{
const int animatorIndex = m_animatorIds.indexOf(animatorId);
- if (animatorIndex != -1)
- return m_clipFormats[animatorIndex];
- return ClipFormat();
+ return m_clipFormats[animatorIndex];
+}
+
+const ClipFormat &ClipBlendValue::clipFormat(Qt3DCore::QNodeId animatorId) const
+{
+ const int animatorIndex = m_animatorIds.indexOf(animatorId);
+ return m_clipFormats[animatorIndex];
}
} // namespace Animation