From 3a91970f6914348cf0c9205f2fece409261c30c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A4=C3=A4tt=C3=A4=20Antti?= Date: Wed, 21 Feb 2018 09:20:50 +0200 Subject: Fix effect and custom material stringlist properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tomi Korpipää --- src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3