1
0
mirror of synced 2024-11-30 18:24:39 +01:00

Adjust assimp mesh selector again

This commit is contained in:
KillzXGaming 2020-03-25 15:15:56 -04:00
parent 98153abbf8
commit 5fa20a4dee

View File

@ -28,8 +28,8 @@ namespace Toolbox.Library
foreach (Mesh msh in assimp.scene.Meshes)
{
if (msh.MaterialIndex != -1 && assimp.materials.Count > msh.MaterialIndex)
listView1.Items.Add($"{msh.Name}_{assimp.materials[msh.MaterialIndex].Name}");
if (msh.MaterialIndex != -1 && assimp.scene.MaterialCount > msh.MaterialIndex)
listView1.Items.Add($"{msh.Name}_{assimp.scene.Materials[msh.MaterialIndex].Name}");
else
listView1.Items.Add(msh.Name);
}