summaryrefslogtreecommitdiffstats
path: root/src/animation/backend/animationutils.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-08-26 17:31:10 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-09-02 18:10:40 +0000
commit88d63171992f957ddbc6e46b094504ac2ea9aeba (patch)
treee94fe4d7c8c00ebafd1fbd9c5974a6170a7349b0 /src/animation/backend/animationutils.cpp
parentbbc14b772c323476a5cc41c1da06921f4e3dbf3e (diff)
Extend generateClipFormatIndices() to handle jointIndex
AnimationClip now matches on name and jointIndex if jointIndex is valid. Change-Id: Id2b3f41bf465a847048537583fc244743c0d026b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/animation/backend/animationutils.cpp')
-rw-r--r--src/animation/backend/animationutils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/animation/backend/animationutils.cpp b/src/animation/backend/animationutils.cpp
index 8fe31bc24..f421a8025 100644
--- a/src/animation/backend/animationutils.cpp
+++ b/src/animation/backend/animationutils.cpp
@@ -577,7 +577,8 @@ ComponentIndices generateClipFormatIndices(const QVector<ChannelNameAndType> &ta
for (int i = 0; i < channelCount; ++i) {
// Find the index of the channel from the clip
const ChannelNameAndType &targetChannel = targetChannels[i];
- const int clipChannelIndex = clip->channelIndex(targetChannel.name);
+ const int clipChannelIndex = clip->channelIndex(targetChannel.name,
+ targetChannel.jointIndex);
// TODO: Ensure channel in the clip has enough components to map to the type.
// Requires some improvements to the clip data structure first.