diff options
author | Janne Kangas <janne.kangas@qt.io> | 2019-06-13 14:33:07 +0300 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2019-06-17 11:49:32 +0300 |
commit | 8ec2fd30d479f36985efbcf741c3588cad1282ff (patch) | |
tree | 273bf79a1b22ff970c0934f529768a3bcf831cb8 | |
parent | abe5db305a987dc5a5d4fcdd3e6f5ee97057b426 (diff) |
Exclude image instances from timegraph
Make images explicitly not participate in timegraph. Materials are assumed
to exist always so start/end time is not relevant, but default values still
overrode parent start/end times.
Change-Id: I38a593bfb4383195965a3aa09df9f53accb4d045
Task-id: QT3DS-3669
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/runtime/Qt3DSElementSystem.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/runtime/Qt3DSElementSystem.cpp b/src/runtime/Qt3DSElementSystem.cpp index 836b65b..b4d3fbc 100644 --- a/src/runtime/Qt3DSElementSystem.cpp +++ b/src/runtime/Qt3DSElementSystem.cpp @@ -162,11 +162,17 @@ struct SElementAllocator : public qt3ds::runtime::IElementAllocator m_TempPropertyDescs.clear(); bool participatesInTimeGraph = false; GetIgnoredProperties(); + const bool isImage = inType == m_StringTable.RegisterStr("Image"); for (QT3DSU32 idx = 0, end = inPropertyDescriptions.size(); idx < end; ++idx) { QT3DSU32 nameHash = inPropertyDescriptions[idx].first.GetNameHash(); - if (nameHash == Q3DStudio::ATTRIBUTE_STARTTIME - || nameHash == Q3DStudio::ATTRIBUTE_ENDTIME) + // Make image instances explicitly not participate in the timegraph. This way their + // default start/end time does not have impact into lifetimes of their parents. + // This fixes QT3DS-3669 where image default end time overrode parent endtime when + // element active status was considered. + if ((nameHash == Q3DStudio::ATTRIBUTE_STARTTIME + || nameHash == Q3DStudio::ATTRIBUTE_ENDTIME) && !isImage) { participatesInTimeGraph = true; + } if (eastl::find(m_IgnoredProperties.begin(), m_IgnoredProperties.end(), inPropertyDescriptions[idx].first.m_Name) == m_IgnoredProperties.end()) { |