From 8ec2fd30d479f36985efbcf741c3588cad1282ff Mon Sep 17 00:00:00 2001 From: Janne Kangas Date: Thu, 13 Jun 2019 14:33:07 +0300 Subject: 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 --- src/runtime/Qt3DSElementSystem.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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()) { -- cgit v1.2.3