From 8c448e6dd019c31bc6e62a553dc6a09dde133225 Mon Sep 17 00:00:00 2001 From: Andras Mantia Date: Fri, 8 Dec 2017 21:49:28 +0200 Subject: Show animated properties in the timeline tree Dynamic adding/removing of the properties is not supported yet. Change-Id: I0171f476a0287d8b682915209cc18e567fe70608 Reviewed-by: Miikka Heikkinen --- .../Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (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 c15e4ed0..11fa0504 100644 --- a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp +++ b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp @@ -873,12 +873,12 @@ Qt3DSDMTimelineItemBinding::GetOrCreatePropertyBinding(Qt3DSDMPropertyHandle inP * @param inAppend true to skip the check to find where to insert. ( true if this is a * loading/initializing step, where the call is already done in order ) */ -void Qt3DSDMTimelineItemBinding::AddPropertyRow(Qt3DSDMPropertyHandle inPropertyHandle, - bool inAppend /*= false */) +CPropertyRow *Qt3DSDMTimelineItemBinding::AddPropertyRow(Qt3DSDMPropertyHandle inPropertyHandle, + bool inAppend /*= false */) { ITimelineItemProperty *theTimelineProperty = GetPropertyBinding(inPropertyHandle); if (theTimelineProperty && theTimelineProperty->GetRow()) // if created, bail - return; + return {}; if (!theTimelineProperty) theTimelineProperty = GetOrCreatePropertyBinding(inPropertyHandle); @@ -909,12 +909,22 @@ void Qt3DSDMTimelineItemBinding::AddPropertyRow(Qt3DSDMPropertyHandle inProperty } } } + + CPropertyRow *propertyRow = nullptr; // Create a new property row - m_TransMgr->CreateNewPropertyRow(theTimelineProperty, m_Row, - theNextProperty ? theNextProperty->GetRow() : nullptr); + if (m_createUIRow) { + propertyRow = m_TransMgr->CreateNewPropertyRow(theTimelineProperty, m_Row, + theNextProperty ? theNextProperty->GetRow() : nullptr); + } else { + propertyRow = new CPropertyRow(theTimelineProperty, m_Row); + m_Row->AddPropertyRow(propertyRow, theNextProperty ? theNextProperty->GetRow() : nullptr); + theTimelineProperty->Bind(propertyRow); + } // Update keyframes AddKeyframes(theTimelineProperty); + + return propertyRow; } void Qt3DSDMTimelineItemBinding::RemovePropertyRow(Qt3DSDMPropertyHandle inPropertyHandle) -- cgit v1.2.3