summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJari Karppinen <jari.karppinen@qt.io>2019-06-19 13:48:29 +0300
committerJari Karppinen <jari.karppinen@qt.io>2019-06-19 13:48:29 +0300
commitb04e20c05278267a168b07cabfd74a67e33539de (patch)
tree12d2b9a4fcb5a6288788847112b153925e808441 /src
parentc31b28180b8bd0c1cbcbad7874b653d31ce2d920 (diff)
Ignore start time in time graph node if it hasn't been set
Animated custom materials only have the endtime attribute in .uip files. This causes the start time in time graph nodes not to be updated. The value is left as the default QT3DS_MAX_U32 which causes the element to be excluded from animation. Task-number: QT3DS-3682 Change-Id: I6eec94ea222d4d830d4e793429c37888e9f097e5 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/Qt3DSActivationManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/runtime/Qt3DSActivationManager.cpp b/src/runtime/Qt3DSActivationManager.cpp
index 3d05274..1449f6e 100644
--- a/src/runtime/Qt3DSActivationManager.cpp
+++ b/src/runtime/Qt3DSActivationManager.cpp
@@ -45,6 +45,7 @@
#include "foundation/Qt3DSMutex.h"
#include "foundation/Qt3DSSync.h"
#include "Qt3DSRenderThreadPool.h"
+#include "foundation/Qt3DSSimpleTypes.h"
using namespace qt3ds::runtime;
using namespace qt3ds::runtime::element;
@@ -405,7 +406,9 @@ struct STimeContext
if (inNode.DoesParticipateInTimeGraph()) {
UpdateNodeElementInformation(inNode);
if (inNode.IsUserActive()) {
- inGlobalMin = NVMax(inNode.m_ActivationManagerNode.m_StartTime, inGlobalMin);
+ // Start time does not get updated if the element doesn't have ATTRIBUTE_STARTTIME.
+ if (inNode.m_ActivationManagerNode.m_StartTime != QT3DS_MAX_U32)
+ inGlobalMin = NVMax(inNode.m_ActivationManagerNode.m_StartTime, inGlobalMin);
inGlobalMax = NVMin(inNode.m_ActivationManagerNode.m_StopTime, inGlobalMax);
if (inGlobalMin < inGlobalMax) {
GetTimeEventForTime(inGlobalMin, STimeEvent::Start)