From 275c1dfaed5bccd67aea033c2b596eac21643182 Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Mon, 20 Aug 2018 15:52:27 +0300 Subject: Visualize in-use sub-presentations on the timeline rows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The left-most part of a timeline row is colored for rows that have a sub-presentation in-use. If a collapsed row has a descendant with a sub-presentation, it is highlighted in a different shade of the main color. Task-number: QT3DS-2100 Change-Id: Id26fb554050e5df8c635e71266ae52665d0ad836 Reviewed-by: Tomi Korpipää Reviewed-by: Miikka Heikkinen --- .../Bindings/Qt3DSDMTimelineItemBinding.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp') diff --git a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp index 99be9332..8a1b1adb 100644 --- a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp +++ b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp @@ -301,6 +301,28 @@ bool Qt3DSDMTimelineItemBinding::ComponentHasAction(bool inMaster) return false; } +bool Qt3DSDMTimelineItemBinding::hasSubpresentation() const +{ + CClientDataModelBridge *bridge(m_StudioSystem->GetClientDataModelBridge()); + IPropertySystem *propSystem = m_StudioSystem->GetPropertySystem(); + EStudioObjectType objType = GetObjectType(); + + if (objType == OBJTYPE_LAYER) { + SValue sourcePathValue; + propSystem->GetInstancePropertyValue(m_DataHandle, bridge->GetSourcePathProperty(), + sourcePathValue); + return get(sourcePathValue)->GetLength() > 0; + } else if (objType == OBJTYPE_IMAGE) { + SValue subPresValue; + propSystem->GetInstancePropertyValue(m_DataHandle, + bridge->GetSceneImage().m_SubPresentation, + subPresValue); + return get(subPresValue)->GetLength() > 0; + } + + return false; +} + ITimelineTimebar *Qt3DSDMTimelineItemBinding::GetTimebar() { if (!m_TimelineTimebar) -- cgit v1.2.3