Make sure to unload model for combined export
This commit is contained in:
parent
1cc36eeabd
commit
60041c0c65
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -96,6 +96,8 @@ namespace FirstPlugin
|
|||||||
|
|
||||||
Skeleton.bones.AddRange(((STSkeleton)model.DrawableContainer.Drawables[0]).bones);
|
Skeleton.bones.AddRange(((STSkeleton)model.DrawableContainer.Drawables[0]).bones);
|
||||||
Objects.AddRange(((Renderer)model.DrawableContainer.Drawables[1]).Meshes);
|
Objects.AddRange(((Renderer)model.DrawableContainer.Drawables[1]).Meshes);
|
||||||
|
|
||||||
|
model.Unload();
|
||||||
}
|
}
|
||||||
|
|
||||||
AssimpSaver assimp = new AssimpSaver();
|
AssimpSaver assimp = new AssimpSaver();
|
||||||
@ -179,6 +181,14 @@ namespace FirstPlugin
|
|||||||
|
|
||||||
public void Unload()
|
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.Drawables.Clear();
|
||||||
DrawableContainer = null;
|
DrawableContainer = null;
|
||||||
header.Materials.Clear();
|
header.Materials.Clear();
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user