mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 04:23:09 +00:00
Fix batch exportation of pokemon models
This commit is contained in:
parent
849aa7f6c2
commit
943fae319e
1 changed files with 23 additions and 1 deletions
|
@ -16,7 +16,7 @@ using Newtonsoft.Json;
|
|||
|
||||
namespace FirstPlugin
|
||||
{
|
||||
public class GFBMDL : TreeNodeFile, IContextMenuNode, IFileFormat
|
||||
public class GFBMDL : TreeNodeFile, IContextMenuNode, IFileFormat, IExportableModel
|
||||
{
|
||||
public FileType FileType { get; set; } = FileType.Model;
|
||||
|
||||
|
@ -761,5 +761,27 @@ namespace FirstPlugin
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
public IEnumerable<STGenericObject> ExportableMeshes => Model.GenericMeshes;
|
||||
public IEnumerable<STGenericMaterial> ExportableMaterials => Model.GenericMaterials;
|
||||
public IEnumerable<STGenericTexture> ExportableTextures => TextureList;
|
||||
public STSkeleton ExportableSkeleton => Model.Skeleton;
|
||||
|
||||
public List<STGenericTexture> TextureList
|
||||
{
|
||||
get
|
||||
{
|
||||
//Export all textures that use the same archive
|
||||
List<STGenericTexture> textures = new List<STGenericTexture>();
|
||||
foreach (var bntx in PluginRuntime.bntxContainers)
|
||||
foreach (var tex in bntx.Textures.Values)
|
||||
{
|
||||
if (Model.Textures.Contains(tex.Text))
|
||||
textures.Add(tex);
|
||||
}
|
||||
|
||||
return textures;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue