1
0
mirror of synced 2024-11-13 18:50:50 +01:00

Allow bfres/bntx to batch export properly

This commit is contained in:
KillzXGaming 2019-11-10 12:46:46 -05:00
parent 616a2604c4
commit 678cbb7bdb
2 changed files with 25 additions and 4 deletions

View File

@ -20,7 +20,7 @@ using OpenTK;
namespace FirstPlugin
{
public class BFRES : BFRESWrapper, IFileFormat
public class BFRES : BFRESWrapper, IFileFormat, ITextureContainer
{
public FileType FileType { get; set; } = FileType.Resource;
@ -50,6 +50,14 @@ namespace FirstPlugin
}
}
public bool DisplayIcons => false;
public List<STGenericTexture> TextureList
{
get { return GetTextures(); }
set { }
}
public override string ExportFilter => Utils.GetAllFilters(new BFRES());
//Stores the skeleton and models in this
@ -909,6 +917,22 @@ namespace FirstPlugin
return null;
}
public List<STGenericTexture> GetTextures()
{
List<STGenericTexture> textures = new List<STGenericTexture>();
foreach (TreeNode folder in Nodes)
{
if (folder is BFRESGroupNode && ((BFRESGroupNode)folder).Type == BRESGroupType.Textures)
{
foreach (STGenericTexture node in folder.Nodes)
textures.Add(node);
}
}
return textures;
}
public ResFile resFile = null;
public ResU.ResFile resFileU = null;

View File

@ -64,9 +64,6 @@ namespace FirstPlugin
{
get
{
if (!LoadIcons)
return new List<STGenericTexture>();
List<STGenericTexture> textures = new List<STGenericTexture>();
foreach (STGenericTexture node in Nodes)
textures.Add(node);