Updated ConvertMaterials function to assign appopriate material index when using material references.

This commit is contained in:
Justice Colby
2022-11-21 15:49:48 -08:00
parent b3daec65a0
commit 371d5c78f4

View File

@@ -580,7 +580,7 @@ void XFileImporter::ConvertMaterials( aiScene* pScene, std::vector<XFile::Materi
aiString name;
pScene->mMaterials[b]->Get( AI_MATKEY_NAME, name);
if( strcmp( name.C_Str(), oldMat.mName.data()) == 0 ) {
oldMat.sceneIndex = a;
oldMat.sceneIndex = b;
break;
}
}