diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-10-07 17:49:54 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2018-01-18 11:55:00 +0000 |
commit | b2b7616786af7041f9d1db15511df48c68847ad6 (patch) | |
tree | 99d052da5636891a52bfa58beab71f5f0dc41fa0 /src/animation/backend/findrunningclipanimatorsjob.cpp | |
parent | 1ddff1b53ea19c965f187d947fdaed428d1ad05a (diff) |
Wrap up the format describing source clip and formatted results
We need more information that just the source indices to be able to
properly describe the transformation from the raw evaluation
results of a clip, through to the formatted layout later consumed by
the MappingData objects.
The playback of a QClipAnimator still works but it seems that the
process for properly blending animations is more complicated than
previously thought. We cannot simply assume a default value of 0 for
all channel components. If a clip has a channel missing but the user
has still requested that this channel be evaluated (by way of a mapping
or a subset of clips having matching channel data), then we must provide
sensible defaults for those channel components. This deficiency will be
dealt with in a following commit.
Change-Id: I7d7d0f7ce19c545629bb347e1132fc4ed6a59d0d
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/animation/backend/findrunningclipanimatorsjob.cpp')
-rw-r--r-- | src/animation/backend/findrunningclipanimatorsjob.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/animation/backend/findrunningclipanimatorsjob.cpp b/src/animation/backend/findrunningclipanimatorsjob.cpp index 16b84359e..291f369f6 100644 --- a/src/animation/backend/findrunningclipanimatorsjob.cpp +++ b/src/animation/backend/findrunningclipanimatorsjob.cpp @@ -81,19 +81,20 @@ void FindRunningClipAnimatorsJob::run() const QVector<ChannelNameAndType> channelNamesAndTypes = buildRequiredChannelsAndTypes(m_handler, mapper); - QVector<ComponentIndices> channelComponentIndices + const QVector<ComponentIndices> channelComponentIndices = assignChannelComponentIndices(channelNamesAndTypes); const AnimationClip *clip = m_handler->animationClipLoaderManager()->lookupResource(clipAnimator->clipId()); Q_ASSERT(clip); - const ComponentIndices formatIndices = generateClipFormatIndices(channelNamesAndTypes, - channelComponentIndices, - clip); - clipAnimator->setFormatIndices(formatIndices); + const ClipFormat format = generateClipFormatIndices(channelNamesAndTypes, + channelComponentIndices, + clip); + clipAnimator->setClipFormat(format); const QVector<MappingData> mappingData = buildPropertyMappings(channelMappings, channelNamesAndTypes, - channelComponentIndices); + format.formattedComponentIndices, + format.sourceClipMask); clipAnimator->setMappingData(mappingData); } |