From 357b8b2bc98229c29e6203d76aacda27f805544e Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Sun, 28 May 2023 17:01:52 -0400 Subject: [PATCH] Load txtg texture in material UI --- .../GUI/BFRES/Materials/SamplerEditor.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/File_Format_Library/GUI/BFRES/Materials/SamplerEditor.cs b/File_Format_Library/GUI/BFRES/Materials/SamplerEditor.cs index dd78411a..2d374336 100644 --- a/File_Format_Library/GUI/BFRES/Materials/SamplerEditor.cs +++ b/File_Format_Library/GUI/BFRES/Materials/SamplerEditor.cs @@ -289,6 +289,17 @@ namespace FirstPlugin.Forms Thread.Start(); } } + + if (PluginRuntime.TextureCache.ContainsKey(name)) + { + Thread = new Thread((ThreadStart)(() => + { + textureBP.Image = Toolbox.Library.Imaging.GetLoadingImage(); + textureBP.Image = PluginRuntime.TextureCache[name].GetBitmap(); + })); + Thread.Start(); + } + foreach (BFRESGroupNode ftexCont in PluginRuntime.ftexContainers) { if (ftexCont.ResourceNodes.ContainsKey(name))