diff options
author | Antti Määttä <antti.maatta@qt.io> | 2020-04-22 15:18:48 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2020-04-27 06:56:46 +0300 |
commit | d8b7fcb3bef9df848677ac4c2b3ede75346daa9b (patch) | |
tree | 12af2d50ebf671da430eea067af701e6d952291c | |
parent | 753bd9118a95a3b1ce6516f30fe7974746e7cdab (diff) |
Store dynamic object default texture paths to the UIP
Set the default texture path from effects/materials to the graph object so
that they are read by the runtime during initial loading.
Task-number: QT3DS-4037
Change-Id: I61df38223d003102e6b82bc27f6885493c88f9f4
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r-- | src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp index 9ef85efd..8f053a47 100644 --- a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp +++ b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp @@ -4265,6 +4265,15 @@ public: m_DataCore.SetInstancePropertyValue(inDynamic, theInfo.m_Property, theRef); } } + } else if (theInfo.m_CompleteType == CompleteMetaDataType::Texture + && GetValueType(theInfo.m_DefaultValue) == DataModelDataType::String) { + SValue value; + m_DataCore.GetInstancePropertyValue(inDynamic, theInfo.m_Property, value); + // Set default value to the instance + if (!value.empty()) { + m_DataCore.SetInstancePropertyValue(inDynamicInstance, theInfo.m_Property, + value); + } } } } @@ -4568,6 +4577,8 @@ public: theParentInstance, inParent, inSlide, m_DataCore, m_SlideSystem, m_Bridge.GetObjectDefinitions(), m_AssetGraph, m_MetaData, inTargetId)); + ApplyDynamicMetaData(retval, theParentInstance); + if (inStartTime != -1) SetStartTime(retval, inStartTime); |