summaryrefslogtreecommitdiffstats
path: root/src/runtime/Qt3DSElementSystem.h
diff options
context:
space:
mode:
authorJanne Kangas <janne.kangas@qt.io>2019-07-26 14:49:10 +0300
committerJanne Kangas <janne.kangas@qt.io>2019-09-11 09:06:10 +0300
commit025beb76e9abfba594870ee480448a1fa0a3ca09 (patch)
tree65b853dd156ab33000d6bfba1373760730011b40 /src/runtime/Qt3DSElementSystem.h
parent5665b3264179f97eabe92e77afbd7a3eaaf743f0 (diff)
Make visibility setting for elements in master slide persistent
Make datainput-driven visibility setting persistent over slide changes, for elements that are on master slide. This prevents slide initial value from overriding the user set visibility. Override takes place at first DI-driven visibility change. Change-Id: I799872ebd9834df9e74dd1e5e53a59c57e02255f Task-id: QT3DS-3925 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/runtime/Qt3DSElementSystem.h')
-rw-r--r--src/runtime/Qt3DSElementSystem.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/runtime/Qt3DSElementSystem.h b/src/runtime/Qt3DSElementSystem.h
index 15895c0..2784420 100644
--- a/src/runtime/Qt3DSElementSystem.h
+++ b/src/runtime/Qt3DSElementSystem.h
@@ -201,7 +201,10 @@ namespace runtime {
{
return this->operator&(Q3DStudio::ELEMENTFLAG_EXPLICITACTIVE);
}
-
+ bool IsControlledActive() const
+ {
+ return this->operator&(Q3DStudio::ELEMENTFLAG_CONTROLLED_ACTIVE);
+ }
void SetActive(bool inValue)
{
clearOrSet(inValue, Q3DStudio::ELEMENTFLAG_GLOBALACTIVE);
@@ -283,6 +286,7 @@ namespace runtime {
SElement *m_Parent; ///< Parent element in activity graph
SElement *m_Sibling; ///< Next sibling element in activity graph
SElement *m_Child; ///< First child element in activity graph
+ bool m_OnMaster = false;
void *m_Association; ///< Link to associated asset in scene
Q3DStudio::IPresentation *m_BelongedPresentation;
SActivationManagerNode m_ActivationManagerNode;
@@ -429,6 +433,13 @@ namespace runtime {
}
bool IsExplicitActive() const { return m_Flags.IsExplicitActive(); }
+ void SetControlledActive(bool inValue)
+ {
+ SetFlag(Q3DStudio::ELEMENTFLAG_CONTROLLED_ACTIVE, inValue);
+ }
+
+ bool IsControlledActive() const { return m_Flags.IsControlledActive(); }
+
// Flag set by the activity manager.
void SetActive(bool inValue) { SetFlag(Q3DStudio::ELEMENTFLAG_GLOBALACTIVE, inValue); }
bool GetActive() const { return m_Flags.IsActive(); }