mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-16 01:37:55 +00:00
Show exceptions for assimp errors
This commit is contained in:
parent
e8e40b8296
commit
e19100d6fa
5 changed files with 13 additions and 1 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -57,11 +57,13 @@ namespace Switch_Toolbox.Library
|
|||
{
|
||||
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()
|
||||
{
|
||||
Console.WriteLine($"Mesh Count " + scene.MeshCount);
|
||||
Matrix4x4 identity = Matrix4x4.Identity;
|
||||
if (scene.RootNode != null)
|
||||
{
|
||||
|
@ -103,6 +105,16 @@ namespace Switch_Toolbox.Library
|
|||
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)
|
||||
BuildNode(child, ref world);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue