diff --git a/Plugins/CafeLibrary/Bfres/Editing/Nodes/SceneAnimFolder.cs b/Plugins/CafeLibrary/Bfres/Editing/Nodes/SceneAnimFolder.cs index 34939ef..fe81ccc 100644 --- a/Plugins/CafeLibrary/Bfres/Editing/Nodes/SceneAnimFolder.cs +++ b/Plugins/CafeLibrary/Bfres/Editing/Nodes/SceneAnimFolder.cs @@ -109,6 +109,8 @@ public MenuItemModel[] GetContextMenuItems() new MenuItemModel(""), new MenuItemModel("Rename", () => this.ActivateRename = true), new MenuItemModel(""), + new MenuItemModel("Add Camera Anim", AddCameraAnim), + new MenuItemModel(""), new MenuItemModel("Delete", DeleteAction) }; } @@ -143,6 +145,16 @@ private void ReplaceAction() } } + private void AddCameraAnim() + { + var anim = new CameraAnim() { Name = "CameraAnim" }; + anim.Name = Utils.RenameDuplicateString(anim.Name, SceneAnim.CameraAnims.Keys.Select(x => x).ToList()); + SceneAnim.CameraAnims.Add(anim.Name, anim); + + var an = new BfresCameraAnim(ResFile, SceneAnim, anim); + this.AddChild(an.UINode); + } + private void DeleteAction() { int result = TinyFileDialog.MessageBoxInfoYesNo("Are you sure you want to remove these animations? Operation cannot be undone.");