1
0
mirror of synced 2024-11-12 02:00:50 +01:00

Gfmdl and gfpak fixes.

Check gfbmdl textures list on export for exporting active bntx files.
Dispose file formats properly for gfbmdl
This commit is contained in:
KillzXGaming 2019-11-27 12:32:19 -05:00
parent a6246ace11
commit 45a0ada32e
3 changed files with 19 additions and 1 deletions

View File

@ -111,7 +111,17 @@ namespace FirstPlugin
public void Unload()
{
foreach (var file in files)
{
if (file.FileFormat != null)
file.FileFormat.Unload();
file.FileData = null;
}
files.Clear();
GC.SuppressFinalize(this);
}
public void Save(System.IO.Stream stream)

View File

@ -218,7 +218,12 @@ namespace FirstPlugin
public void Unload()
{
foreach (var file in files)
{
if (file.FileFormat != null)
file.FileFormat.Unload();
file.FileData = null;
}
files.Clear();

View File

@ -179,7 +179,10 @@ namespace FirstPlugin
var textures = new List<STGenericTexture>();
foreach (var bntx in PluginRuntime.bntxContainers)
foreach (var tex in bntx.Textures.Values)
textures.Add(tex);
{
if (Model.Textures.Contains(tex.Text))
textures.Add(tex);
}
DAE.Export(fileName, settings, model, textures, Model.Skeleton);
}