diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 01aea96b..a392d1bf 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 27493e12..bec12bb7 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-shm b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm index 28f325e7..d109b183 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index ba89407e..53d2e13b 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/FSKL.cs b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSKL.cs index 38d7d340..b5a2f935 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSKL.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSKL.cs @@ -259,6 +259,7 @@ namespace Bfres.Structs { ResU.Bone bone = new ResU.Bone(); bone.Import(FileName, GetResFileU()); + bone.ParentIndex = -1; BfresWiiU.ReadBone(bn, bone, false); } @@ -266,6 +267,7 @@ namespace Bfres.Structs { Bone bone = new Bone(); bone.Import(FileName); + bone.ParentIndex = -1; BfresSwitch.ReadBone(bn, bone, false); } @@ -541,10 +543,12 @@ namespace Bfres.Structs BoneU = new ResU.Bone(); BoneU.Import(ofd.FileName, GetResFileU()); BoneU.Name = CheckDuplicateBoneNames(BoneU.Name); - BfresWiiU.ReadBone(bn, BoneU, false); + Nodes.Add(bn); skeletonParent.bones.Add(bn); + + BoneU.ParentIndex = (short)bn.parentIndex; ((FSKL)skeletonParent).AddBone(BoneU); } else @@ -552,10 +556,12 @@ namespace Bfres.Structs Bone = new Bone(); Bone.Import(ofd.FileName); Bone.Name = CheckDuplicateBoneNames(Bone.Name); - BfresSwitch.ReadBone(bn, Bone, false); + Nodes.Add(bn); skeletonParent.bones.Add(bn); + + BoneU.ParentIndex = (short)bn.parentIndex; ((FSKL)skeletonParent).AddBone(Bone); } } diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index 8157596f..1c2eea62 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index 1c57b93c..0f24febf 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 2d091609..9a56bc47 100644 --- a/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs +++ b/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs @@ -13,6 +13,8 @@ namespace Switch_Toolbox.Library { public class AssimpData { + public bool UseTransformMatrix = true; + public Scene scene; public List objects = new List(); @@ -79,10 +81,14 @@ namespace Switch_Toolbox.Library } private void BuildNode(Node parent, ref Matrix4x4 rootTransform) { - Matrix4x4 trafo = parent.Transform; - Matrix4x4 world = trafo * rootTransform; - Matrix4 worldTK = AssimpHelper.TKMatrix(world); - + Matrix4x4 world = rootTransform; + Matrix4 worldTK = Matrix4.Identity; + if (UseTransformMatrix) + { + Matrix4x4 trafo = parent.Transform; + world = trafo * rootTransform; + worldTK = AssimpHelper.TKMatrix(world); + } if (parent.MeshCount > 0) { diff --git a/Toolbox/Lib/KCLExt.dll b/Toolbox/Lib/KCLExt.dll index 7e916b74..c6610002 100644 Binary files a/Toolbox/Lib/KCLExt.dll and b/Toolbox/Lib/KCLExt.dll differ diff --git a/Toolbox/Lib/KCLExt.pdb b/Toolbox/Lib/KCLExt.pdb index 1be91be8..a0d819eb 100644 Binary files a/Toolbox/Lib/KCLExt.pdb and b/Toolbox/Lib/KCLExt.pdb differ