Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFBMDL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace FirstPlugin
{
public class GFBMDL : TreeNodeFile, IContextMenuNode, IFileFormat
public class GFBMDL : TreeNodeFile, IContextMenuNode, IFileFormat, IExportableModel
{
public FileType FileType { get; set; } = FileType.Model;

Expand Down Expand Up @@ -761,5 +761,27 @@ public void Unload()
{

}

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;
}
}
}
}