summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Timeline
diff options
context:
space:
mode:
authorJanne Kangas <janne.kangas@qt.io>2017-12-15 11:53:56 +0200
committerJanne Kangas <janne.kangas@qt.io>2018-01-19 10:17:42 +0000
commit337aaa465ac78ac72ca748f0c2d4c3b6257829b8 (patch)
tree538354b89f2a96d220f1137e8fba867400fcfa9d /src/Authoring/Studio/Palettes/Timeline
parent849b12c5df97ec268c5efce27ea96daa7676e525 (diff)
[DataInput] Add UI enablers for linking DataInput and Text
Add popup for text property that allows choosing a datainput in scene to be controller for the property. DataInput toggle icon and other functionality can be enabled by adding 'Controllable="True"' parameter to textstring property in MetaData.xml Task-Id: QT3DS-337 Change-Id: I5ab25566866cb45134d36e025e21e94f98944eaf Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Timeline')
-rw-r--r--src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
index 612dd32c..609fb1d3 100644
--- a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
+++ b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
@@ -557,7 +557,11 @@ bool Qt3DSDMTimelineItemBinding::IsValidTransaction(EUserTransaction inTransacti
qt3dsdm::Qt3DSDMInstanceHandle theInstance = GetInstance();
switch (inTransaction) {
case EUserTransaction_Rename:
- return (GetObjectType() != OBJTYPE_SCENE && GetObjectType() != OBJTYPE_IMAGE);
+ // DataInput renaming is forbidden by convention. DataInput name is
+ // permanently assigned when it is added to the scene from a fixed list of
+ // available datainputs
+ return (GetObjectType() != OBJTYPE_SCENE && GetObjectType() != OBJTYPE_IMAGE
+ && GetObjectType() != OBJTYPE_DATAINPUT);
case EUserTransaction_Duplicate:
if (theInstance.Valid())
@@ -589,11 +593,13 @@ bool Qt3DSDMTimelineItemBinding::IsValidTransaction(EUserTransaction inTransacti
// component.
// This may include behavior assets which may be directly attached to the Scene.
// This is because by principal, components cannot exist on the Scene directly.
+ // DataInputs cannot reside inside component as they must be direct children
+ // of scene
qt3dsdm::Qt3DSDMInstanceHandle theParentInstance =
theBridge->GetParentInstance(theInstance);
if (theObjectType != OBJTYPE_LAYER && theObjectType != OBJTYPE_SCENE
&& theObjectType != OBJTYPE_MATERIAL && theObjectType != OBJTYPE_IMAGE
- && theObjectType != OBJTYPE_EFFECT
+ && theObjectType != OBJTYPE_EFFECT && theObjectType != OBJTYPE_DATAINPUT
&& (theParentInstance.Valid()
&& theBridge->GetObjectType(theParentInstance)
!= OBJTYPE_SCENE)) // This checks if the object is