summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2019-10-04 13:50:34 +0300
committerAntti Määttä <antti.maatta@qt.io>2019-10-04 14:27:57 +0300
commit0582de9c1063ec5d83f3ee931925e1d8a276d3b6 (patch)
tree4de68e228f03883a3a0a851216f5319958ad1dcc
parent431ade2ff8b8874ac7812b7a19b791844b1056c3 (diff)
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 <miikka.heikkinen@qt.io>
-rw-r--r--src/datamodel/Qt3DSMetadata.cpp11
1 files 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<SMetaDataLoadWarning> 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;