From 0582de9c1063ec5d83f3ee931925e1d8a276d3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20M=C3=A4=C3=A4tt=C3=A4?= Date: Fri, 4 Oct 2019 13:50:34 +0300 Subject: Fix deferred loading of images after id change The effect system needs to use the class id instead of class name just like custom materials already do so that the uip parser can find the effect metadata. Task-number: QT3DS-3974 Change-Id: Ife5cf8a90e57d01126b25317f2c569ab24bc7766 Reviewed-by: Miikka Heikkinen --- src/datamodel/Qt3DSMetadata.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/datamodel/Qt3DSMetadata.cpp b/src/datamodel/Qt3DSMetadata.cpp index a179bf6..83cefa7 100644 --- a/src/datamodel/Qt3DSMetadata.cpp +++ b/src/datamodel/Qt3DSMetadata.cpp @@ -831,11 +831,11 @@ public: } bool LoadEffectXMLFile(const char *inType, const char *inId, const char *inName, - const char *inSourcePath) override + const char *inSourcePath) override { const wchar_t *theType(Convert0(inType)); const wchar_t *theId(Convert1(inId)); - const wchar_t *theName(Convert2(inName)); + Q_UNUSED(inName) if (m_IdToHandleMap.find(theId) != m_IdToHandleMap.end()) return true; @@ -847,7 +847,7 @@ public: if (theStream) { std::vector warnings; bool success = m_NewMetaData->LoadEffectXMLFromSourcePath( - inSourcePath, theMaster, theName, warnings, *theStream); + inSourcePath, theMaster, theId, warnings, *theStream); (void)success; QT3DS_ASSERT(success); return success; @@ -856,12 +856,11 @@ public: } bool LoadMaterialXMLFile(const char *inType, const char *inId, const char *inName, - const char *inSourcePath) override + const char *inSourcePath) override { const wchar_t *theType(Convert0(inType)); const wchar_t *theId(Convert1(inId)); - const wchar_t *theName(Convert2(inName)); - (void)theName; + Q_UNUSED(inName) if (m_IdToHandleMap.find(theId) != m_IdToHandleMap.end()) return true; -- cgit v1.2.3