diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index d1235005..bd403e4a 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index a43f8c01..aaa50392 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index 480b6190..1fa574df 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs b/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs index 1b32b6fe..8315314b 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs @@ -97,10 +97,6 @@ namespace FirstPlugin } public static void ReadModel(FMDL model, Model mdl) { - Console.WriteLine("matcount " + mdl.Materials.Count); - Console.WriteLine("shpcount " + mdl.Shapes.Count); - Console.WriteLine("skelcount " + mdl.Skeleton.Bones.Count); - if (model == null) model = new FMDL(); model.Text = mdl.Name; @@ -659,7 +655,6 @@ namespace FirstPlugin shaderParam.PaddingLength = param.PaddingLength; reader.Seek(param.DataOffset, System.IO.SeekOrigin.Begin); - Console.WriteLine(shaderParam.Name + " " + shaderParam.Type + " " + shaderParam.HasPadding); shaderParam.ReadValue(reader, (int)param.DataSize); m.matparam.Add(param.Name, shaderParam); diff --git a/Switch_FileFormatsMain/FileFormats/Texture/BNTX.cs b/Switch_FileFormatsMain/FileFormats/Texture/BNTX.cs index a46979c5..39d40f27 100644 --- a/Switch_FileFormatsMain/FileFormats/Texture/BNTX.cs +++ b/Switch_FileFormatsMain/FileFormats/Texture/BNTX.cs @@ -166,6 +166,7 @@ namespace FirstPlugin ContextMenuStrip.Items.Add(new ToolStripMenuItem("Replace", null, Import, Keys.Control | Keys.R)); ContextMenuStrip.Items.Add(new ToolStripSeparator()); ContextMenuStrip.Items.Add(new ToolStripMenuItem("Import Texture", null, ImportTextureAction, Keys.Control | Keys.I)); + ContextMenuStrip.Items.Add(new ToolStripMenuItem("Replace Textures (From Folder)", null, ReplaceAll, Keys.Control | Keys.T)); ContextMenuStrip.Items.Add(new ToolStripMenuItem("Export All Textures", null, ExportAll, Keys.Control | Keys.A)); ContextMenuStrip.Items.Add(new ToolStripSeparator()); ContextMenuStrip.Items.Add(new ToolStripMenuItem("Rename", null, Rename, Keys.Control | Keys.N)); @@ -522,6 +523,27 @@ namespace FirstPlugin GC.Collect(); } } + + private void ReplaceAll(object sender, EventArgs args) + { + FolderSelectDialog sfd = new FolderSelectDialog(); + if (sfd.ShowDialog() == DialogResult.OK) + { + foreach (string file in System.IO.Directory.GetFiles(sfd.SelectedPath)) + { + string FileName = System.IO.Path.GetFileNameWithoutExtension(file); + + foreach (TextureData node in Textures.Values) + { + if (FileName == node.Text) + { + node.Replace(file); + } + } + } + } + } + private void ExportAll(object sender, EventArgs args) { List Formats = new List();