1
0
mirror of synced 2025-01-31 12:23:52 +01:00

Fix duplicate meshes

This commit is contained in:
KillzXGaming 2019-05-04 15:53:05 -04:00
parent 50b8697432
commit 7cec448cd0
4 changed files with 8 additions and 12 deletions

Binary file not shown.

View File

@ -80,6 +80,7 @@ namespace Switch_Toolbox.Library
if (scene.RootNode != null)
{
BuildNode(scene.RootNode, ref identity);
Console.WriteLine($"BuildNode Mesh Count " + scene.MeshCount);
}
else
{
@ -112,19 +113,11 @@ namespace Switch_Toolbox.Library
STConsole.WriteLine($"Scale {worldTK.ExtractScale()}");
}
foreach (int index in parent.MeshIndices)
int Index = 0;
foreach (Mesh msh in scene.Meshes)
{
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++;
}
objects.Add(CreateGenericObject(msh, Index, Matrix4.Identity));
Index++;
}
foreach (Node child in parent.Children)
@ -138,6 +131,8 @@ namespace Switch_Toolbox.Library
processNode();
Console.WriteLine("Scene object coun " + objects.Count);
var idenity = Matrix4x4.Identity;
BuildSkeletonNodes(scene.RootNode, BoneNames, skeleton, ref idenity);
skeleton.update();
@ -157,6 +152,7 @@ namespace Switch_Toolbox.Library
foreach (var tex in scene.Textures)
{
}
}
public Animations.Animation CreateGenericAnimation(Assimp.Animation animation)
{