From 371d5c78f494af360333c6246e9ff91c3d2520f6 Mon Sep 17 00:00:00 2001 From: Justice Colby Date: Mon, 21 Nov 2022 15:49:48 -0800 Subject: [PATCH] Updated ConvertMaterials function to assign appopriate material index when using material references. --- code/AssetLib/X/XFileImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/X/XFileImporter.cpp b/code/AssetLib/X/XFileImporter.cpp index b96b041aa..d777eee32 100644 --- a/code/AssetLib/X/XFileImporter.cpp +++ b/code/AssetLib/X/XFileImporter.cpp @@ -580,7 +580,7 @@ void XFileImporter::ConvertMaterials( aiScene* pScene, std::vectormMaterials[b]->Get( AI_MATKEY_NAME, name); if( strcmp( name.C_Str(), oldMat.mName.data()) == 0 ) { - oldMat.sceneIndex = a; + oldMat.sceneIndex = b; break; } }