diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 4f1a61b4..a07cb900 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 62048ede..3a249bd4 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 e32f0614..c88c80a0 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/GUI/BFRES/ParamAnim/AnimParamEditor.cs b/Switch_FileFormatsMain/GUI/BFRES/ParamAnim/AnimParamEditor.cs index 2fcaaca3..d6da317c 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/ParamAnim/AnimParamEditor.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/ParamAnim/AnimParamEditor.cs @@ -83,18 +83,23 @@ namespace FirstPlugin.Forms { if (IsKeyed(paramAnim, Frame)) { - /* var item1 = new ListViewItem($"{Frame}"); + var item1 = new ListViewItem($"{Frame}"); listViewCustom1.Items.Add(item1); foreach (var track in paramAnim.Values) { - var keyFrame = track.GetKeyFrame(Frame); + var keyFrame = track.GetKeyFrame(Frame, false); - if (track.AnimDataOffset == (uint)TexSRT.Mode) - item1.SubItems.Add(((uint)keyFrame.Value).ToString()); + if (keyFrame != null) + { + if (track.AnimDataOffset == (uint)TexSRT.Mode) + item1.SubItems.Add(((uint)keyFrame.Value).ToString()); + else + item1.SubItems.Add(keyFrame.Value.ToString()); + } else - item1.SubItems.Add(keyFrame.Value.ToString()); - }*/ + item1.SubItems.Add(""); + } } } } @@ -110,15 +115,19 @@ namespace FirstPlugin.Forms { if (IsKeyed(paramAnim, Frame)) { - /* var item1 = new ListViewItem($"{Frame}"); + var item1 = new ListViewItem($"{Frame}"); listViewCustom1.Items.Add(item1); foreach (var track in paramAnim.Values) { var keyFrame = track.GetKeyFrame(Frame); - item1.SubItems.Add(keyFrame.Value.ToString()); - }*/ + if (keyFrame != null) + item1.SubItems.Add(keyFrame.Value.ToString()); + else + item1.SubItems.Add(""); + + } } } } @@ -128,7 +137,7 @@ namespace FirstPlugin.Forms { foreach (var track in paramKeyGroup.Values) { - if (track.GetKeyFrame(Frame).IsKeyed == true) + if (track.GetKeyFrame(Frame, false) != null && track.GetKeyFrame(Frame).IsKeyed == true) return true; } diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index e17ba8f5..5abff60e 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 b2e9dac3..9948a55f 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/Animations/Animation.cs b/Switch_Toolbox_Library/Animations/Animation.cs index 13a8c2d5..e555391f 100644 --- a/Switch_Toolbox_Library/Animations/Animation.cs +++ b/Switch_Toolbox_Library/Animations/Animation.cs @@ -137,8 +137,6 @@ namespace Switch_Toolbox.Library.Animations public bool HasKeyedFrames(float frame) { - return false; - return (XPOS.HasAnimation() && XPOS.GetKeyFrame(frame).IsKeyed || YPOS.HasAnimation() && YPOS.GetKeyFrame(frame).IsKeyed || ZPOS.HasAnimation() && ZPOS.GetKeyFrame(frame).IsKeyed || @@ -291,7 +289,7 @@ namespace Switch_Toolbox.Library.Animations } } - public KeyFrame GetKeyFrame(float frame) + public KeyFrame GetKeyFrame(float frame, bool InsertNewKey = true) { KeyFrame key = null; int i; @@ -308,7 +306,7 @@ namespace Switch_Toolbox.Library.Animations } } - if (key == null) + if (key == null && InsertNewKey) { key = new KeyFrame(); key.Frame = frame;