diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-08-27 16:54:01 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-10-03 09:01:51 +0000 |
commit | 725e61a7c4651dc754c1a8318f193314e946cd07 (patch) | |
tree | e87af224908bd4ec246653f0f3a40e0ef8c47fc1 /src | |
parent | 9ac2134767af0d35711f3f4df82216f27d83b8b0 (diff) |
Update render aspect skeleton's local poses
This is the receiving side of the changes sent by the animation aspect.
Not much to do as everything is already in place.
Change-Id: I36a79868d28bab0cf71a176b175e5ea42727979a
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/render/geometry/skeleton.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/render/geometry/skeleton.cpp b/src/render/geometry/skeleton.cpp index 485069e2a..075936f37 100644 --- a/src/render/geometry/skeleton.cpp +++ b/src/render/geometry/skeleton.cpp @@ -118,7 +118,12 @@ void Skeleton::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) switch (e->type()) { case Qt3DCore::PropertyUpdated: { const auto change = qSharedPointerCast<QPropertyUpdatedChange>(e); - if (change->propertyName() == QByteArrayLiteral("source")) { + if (change->propertyName() == QByteArrayLiteral("localPoses")) { + // When the animation aspect sends us a new set of local poses, all we + // need to do is copy them into place. The existing jobs will then update + // the skinning matrix palette. + m_skeletonData.localPoses = change->value().value<QVector<Qt3DCore::Sqt>>(); + } else if (change->propertyName() == QByteArrayLiteral("source")) { Q_ASSERT(m_dataType == File); const auto source = change->value().toUrl(); if (source != m_source) { |