summaryrefslogtreecommitdiffstats
path: root/src/animation/backend/channelmapping.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-08-26 14:53:20 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-09-02 18:10:31 +0000
commitbbb9b6c25650fc17868c47d9c82501f9068dd158 (patch)
treee70e6658ad0efc1f654a1045caa5a39d3c6a31fa /src/animation/backend/channelmapping.cpp
parent9a14388cd5f3e509658e8ec1a1c582f9215f53ca (diff)
Extend buildRequiredChannelsAndTypes to handle indexed targets
Specifically, this is needed for animating joints of a skeleton. If we later find other such indexed targets we can rename the jointIndex member to something more generic. For now this naming helps with reasoning as there are many kinds of index in play within the animation system. Change-Id: I348f255ee622aa11f26e5a3c1055bf5c12071c17 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/animation/backend/channelmapping.cpp')
-rw-r--r--src/animation/backend/channelmapping.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/animation/backend/channelmapping.cpp b/src/animation/backend/channelmapping.cpp
index bf5be8383..417c10a1a 100644
--- a/src/animation/backend/channelmapping.cpp
+++ b/src/animation/backend/channelmapping.cpp
@@ -74,6 +74,7 @@ void ChannelMapping::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePt
m_propertyName = data.propertyName;
m_callback = data.callback;
m_callbackFlags = data.callbackFlags;
+ m_mappingType = ChannelMappingType;
break;
}
@@ -81,11 +82,13 @@ void ChannelMapping::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePt
const auto typedChange = qSharedPointerCast<QChannelMappingCreatedChange<QSkeletonMappingData>>(change);
const auto &data = typedChange->data;
m_skeletonId = data.skeletonId;
+ m_mappingType = SkeletonMappingType;
break;
}
case QChannelMappingCreatedChangeBase::CallbackMapping: {
// TODO: Refactor callback support out of QChannelMapping and into its own type
+ m_mappingType = CallbackMappingType;
break;
}
}