Support loading txtg into gui and exporting them

This commit is contained in:
KillzXGaming 2023-05-30 20:27:57 -04:00
parent 357b8b2bc9
commit 46162e5379
2 changed files with 10 additions and 0 deletions

View file

@ -835,7 +835,15 @@ namespace FirstPlugin
}
if (isMeshCodec)
{
MeshCodec.PrepareTexToGo(resFile);
STTextureFolder texfolder = new STTextureFolder("TexToGo");
this.Nodes.Add(texfolder);
foreach (var tex in MeshCodec.TextureList)
{
texfolder.Nodes.Add(tex);
}
}
DrawableContainer.Drawables.Add(BFRESRender);

View file

@ -588,6 +588,8 @@ namespace Bfres.Structs
if (ftexCont.ResourceNodes.ContainsKey(texref))
textures.Add((FTEX)ftexCont.ResourceNodes[texref]);
}
if (PluginRuntime.TextureCache.ContainsKey(texref))
textures.Add(PluginRuntime.TextureCache[texref]);
}
return textures;