1
0
mirror of synced 2024-12-03 03:27:23 +01:00

Make sure to unload model for combined export

This commit is contained in:
KillzXGaming 2019-06-19 20:07:42 -04:00
parent 1cc36eeabd
commit 60041c0c65
5 changed files with 10 additions and 0 deletions

Binary file not shown.

View File

@ -96,6 +96,8 @@ namespace FirstPlugin
Skeleton.bones.AddRange(((STSkeleton)model.DrawableContainer.Drawables[0]).bones);
Objects.AddRange(((Renderer)model.DrawableContainer.Drawables[1]).Meshes);
model.Unload();
}
AssimpSaver assimp = new AssimpSaver();
@ -179,6 +181,14 @@ namespace FirstPlugin
public void Unload()
{
foreach (var mesh in ((Renderer)DrawableContainer.Drawables[1]).Meshes)
{
mesh.vertices.Clear();
mesh.faces.Clear();
mesh.display = new int[0];
}
((Renderer)DrawableContainer.Drawables[1]).Meshes.Clear();
DrawableContainer.Drawables.Clear();
DrawableContainer = null;
header.Materials.Clear();