diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 76093765..74eeb6c6 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 035a576a..6ff8f477 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 1a06f72f..78e29a14 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/Bfres Structs/SubFiles/FMDL.cs b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs index b66c2247..01d111bd 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs @@ -867,12 +867,14 @@ namespace Bfres.Structs shape.vertexAttributes = settings.CreateNewAttributes(); shape.BoneIndex = obj.BoneIndex; + STConsole.WriteLine(Text + " " + obj.MaterialIndex); + if (UseMats) shape.MaterialIndex = obj.MaterialIndex + MatStartIndex; else shape.MaterialIndex = 0; - if (materials.Count >= shape.MaterialIndex) + if (shape.MaterialIndex >= materials.Count) shape.MaterialIndex = 0; shape.Text = obj.ObjectName; diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll index 15add017..9d3ec534 100644 Binary files a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll and b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll differ diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb index 63cc5976..a9373a68 100644 Binary files a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb and b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index 5814fb4b..d425a02c 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache differ diff --git a/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs b/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs index a0e8d414..3ff3ef2c 100644 --- a/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs +++ b/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs @@ -204,6 +204,8 @@ namespace Switch_Toolbox.Library matTex.wrapModeS = SetWrapMode(tex.WrapModeU); matTex.wrapModeT = SetWrapMode(tex.WrapModeV); + STConsole.WriteLine($"Getting assimp texture slot {matTex.Name} Type {matTex.Type}"); + return matTex; } private int SetWrapMode(TextureWrapMode wrap)