1
0
mirror of synced 2025-02-22 13:20:23 +01:00

Show exceptions for assimp errors

This commit is contained in:
KillzXGaming 2019-04-30 16:39:10 -04:00
parent e8e40b8296
commit e19100d6fa
5 changed files with 13 additions and 1 deletions

Binary file not shown.

View File

@ -57,11 +57,13 @@ namespace Switch_Toolbox.Library
{ {
MessageBox.Show($"Failed to load assimp! Make sure you have Assimp32.dll next to the program!"); MessageBox.Show($"Failed to load assimp! Make sure you have Assimp32.dll next to the program!");
} }
Console.WriteLine(e); else
MessageBox.Show($"{e.ToString()}");
} }
} }
public void processNode() public void processNode()
{ {
Console.WriteLine($"Mesh Count " + scene.MeshCount);
Matrix4x4 identity = Matrix4x4.Identity; Matrix4x4 identity = Matrix4x4.Identity;
if (scene.RootNode != null) if (scene.RootNode != null)
{ {
@ -103,6 +105,16 @@ namespace Switch_Toolbox.Library
objects.Add(CreateGenericObject(scene.Meshes[index], index, worldTK)); objects.Add(CreateGenericObject(scene.Meshes[index], index, worldTK));
} }
if (objects.Count <= 0)
{
int Index = 0;
foreach (Mesh msh in scene.Meshes)
{
objects.Add(CreateGenericObject(msh, Index, Matrix4.Identity));
Index++;
}
}
foreach (Node child in parent.Children) foreach (Node child in parent.Children)
BuildNode(child, ref world); BuildNode(child, ref world);
} }