diff options
author | Määttä Antti <antti.maatta@qt.io> | 2018-02-21 09:20:50 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-02-23 13:26:47 +0000 |
commit | 3a91970f6914348cf0c9205f2fece409261c30c6 (patch) | |
tree | 1f51293f222577179846f31bdb945849506e194e | |
parent | 30cd24ed10019aca2ef03babc3e35a85a599b0f1 (diff) |
Fix effect and custom material stringlist properties
The current implementation appends ./ at the beginning of all string
properties for effects and materials. Append it only for texture
properties.
Task-number: QT3DS-1193
Change-Id: Idf02ed0c42c1568b67b5bc57e1497836e94c67ef
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r-- | src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp index 3b7194c7..9c29ab64 100644 --- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp @@ -936,6 +936,8 @@ void InspectorControlModel::setPropertyValue(long instance, int handle, const QV // to both rejecting invalid and resetting the original value here. const auto studio = g_StudioApp.GetCore()->GetDoc()->GetStudioSystem(); EStudioObjectType theType = studio->GetClientDataModelBridge()->GetObjectType(instance); + qt3dsdm::AdditionalMetaDataType::Value additionalType + = studio->GetPropertySystem()->GetAdditionalMetaDataType(instance, handle); if (theType == EStudioObjectType::OBJTYPE_CAMERA && studio->GetPropertySystem()->GetName(handle) == Q3DStudio::CString("scale")) { @@ -946,7 +948,8 @@ void InspectorControlModel::setPropertyValue(long instance, int handle, const QV if ((theType == EStudioObjectType::OBJTYPE_CUSTOMMATERIAL || theType == EStudioObjectType::OBJTYPE_EFFECT) && studio->GetPropertySystem()->GetDataType(handle) - == qt3dsdm::DataModelDataType::String) { + == qt3dsdm::DataModelDataType::String + && additionalType == qt3dsdm::AdditionalMetaDataType::Texture) { // force . at the beginning of the url QString x = value.toString(); QUrl url(x); |