浏览代码

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

Justice Colby 2 年之前
父节点
当前提交
371d5c78f4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      code/AssetLib/X/XFileImporter.cpp

+ 1 - 1
code/AssetLib/X/XFileImporter.cpp

@@ -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;
                 }
             }