diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 66f80d12..d5a92fa2 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 b1bac2dc..4734b994 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 91c0b06c..261d3ee3 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/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index 05f93d52..1c517455 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 ebfab1ed..d73dfe61 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/Animation/SEANIM.cs b/Switch_Toolbox_Library/FileFormats/Animation/SEANIM.cs index d1e645ae..68f3b408 100644 --- a/Switch_Toolbox_Library/FileFormats/Animation/SEANIM.cs +++ b/Switch_Toolbox_Library/FileFormats/Animation/SEANIM.cs @@ -44,19 +44,22 @@ namespace Switch_Toolbox.Library.Animations var rotationnKeys = seanim.AnimationRotationKeys[bone]; foreach (SEAnimFrame animFrame in rotationnKeys) { + var quat = ((SELib.Utilities.Quaternion)animFrame.Data); + var euler = STMath.ToEulerAngles(quat.X, quat.Y, quat.Z, quat.W); + boneAnim.XROT.Keys.Add(new Animation.KeyFrame() { - Value = (float)((SELib.Utilities.Vector3)animFrame.Data).X, + Value = euler.X, Frame = animFrame.Frame, }); boneAnim.YROT.Keys.Add(new Animation.KeyFrame() { - Value = (float)((SELib.Utilities.Vector3)animFrame.Data).Y, + Value = euler.Y, Frame = animFrame.Frame, }); boneAnim.ZROT.Keys.Add(new Animation.KeyFrame() { - Value = (float)((SELib.Utilities.Vector3)animFrame.Data).Z, + Value = euler.Z, Frame = animFrame.Frame, }); } @@ -66,26 +69,41 @@ namespace Switch_Toolbox.Library.Animations var scaleKeys = seanim.AnimationRotationKeys[bone]; foreach (SEAnimFrame animFrame in scaleKeys) { - var quat = ((SELib.Utilities.Quaternion)animFrame.Data); - var euler = STMath.ToEulerAngles(quat.X, quat.Y, quat.Z, quat.W); - boneAnim.XSCA.Keys.Add(new Animation.KeyFrame() { - Value = euler.X, + Value = (float)((SELib.Utilities.Vector3)animFrame.Data).X, Frame = animFrame.Frame, }); boneAnim.YSCA.Keys.Add(new Animation.KeyFrame() { - Value = euler.Y, + Value = (float)((SELib.Utilities.Vector3)animFrame.Data).Y, Frame = animFrame.Frame, }); boneAnim.ZSCA.Keys.Add(new Animation.KeyFrame() { - Value = euler.Z, + Value = (float)((SELib.Utilities.Vector3)animFrame.Data).Z, Frame = animFrame.Frame, }); } } + else + { + boneAnim.XSCA.Keys.Add(new Animation.KeyFrame() + { + Value = 1, + Frame = 0, + }); + boneAnim.YSCA.Keys.Add(new Animation.KeyFrame() + { + Value = 1, + Frame = 0, + }); + boneAnim.ZSCA.Keys.Add(new Animation.KeyFrame() + { + Value = 1, + Frame = 0, + }); + } }