summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
diff options
context:
space:
mode:
authorAndras Mantia <andras@kdab.com>2017-12-08 21:49:28 +0200
committerJames Turner <james.turner@kdab.com>2017-12-20 09:37:03 +0000
commit8c448e6dd019c31bc6e62a553dc6a09dde133225 (patch)
tree6fc8e55beca8c3f990db9c7eae81137828a5c746 /src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
parent08244f744474c788831983a5ff33f5bde91352cb (diff)
Show animated properties in the timeline tree
Dynamic adding/removing of the properties is not supported yet. Change-Id: I0171f476a0287d8b682915209cc18e567fe70608 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp20
1 files changed, 15 insertions, 5 deletions
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)