-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add copy/paste keyframe functionality to AnimationPlayer editor #3419
Comments
Are there examples of copy-pasting between tracks of different type? I couldn't come up with anything of real value. There's the obvious |
this isn't a fix but a workaround I just discovered: if you copy and paste a track you can rename it as if it had the desired target node, and it will switch over to that node. it's not ideal but for now it helps me copy and paste animation tracks between legs on a skeleton I am working on. |
Is it still impossible to reuse tracks in another node ? |
It's kind of possible. Duplicate the track (you'll have two tracks in the same node with the same name) and then rename the copy to point to the other node. Tracks are just paths to a property. If you have a node called Icon and the track is editing it's position, the track name will be "Icon:position". If you rename it to "Gun:position" it will automatically move to the Gun node. This is just a workaround though. Editor should definitely support this. |
Closing per the above comment. Thanks @CookieBadger for implementing this feature! |
Describe the project you are working on
A lively, well co-ordinated game that makes frequent use of the AnimationPlayer node.
Describe the problem or limitation you are having in your project
The AnimationPlayer is a powerful multipurpose tool for coordinating mesh and sprite animations, transitions, effects, gameplay elements, function calls and so on. The AnimationPlayer editor has some UX/UI issues around copy and paste. Frequent use of the editor will often have you in need of a copy and paste function for keyframes, wanting to copy sequences of keyframes between tracks, animations, and even other AnimationPlayers. I've, in these instances, sometimes edited the plaintext animation or AnimationPlayer resources by hand to be able to copy and paste values and times, which is easy to mess up and get wrong.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The improvements to the AnimationPlayer workflow in godotengine/godot#53689 helps to generalise the functionality of the animation player, and that entails using the editor. Being able to copy and paste keyframes between tracks, preferably with the assigned editor shortcuts for copy and paste (#955?), would improve the workflow and allow animation data to be moved around game components in a more flexible way.
This would require some UI/UX decisions, such as what to do when a copy and paste fails between two incompatible tracks: https://twitter.com/reduzio/status/1447898535115038721
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Copy and paste would need to integrate into the existing editor functionality (godotengine/godot#34892?). Currently, for example, the Duplicate shortcut (Ctrl+d) works in the editor to duplicate keyframes within a single track, rather than attempting to duplicate a node in the scene tree. Similarly, the copy and paste shortcuts should be able to:
I propose that copying and pasting from a single track, to another same-typed track of any animation is the "need to have" functionality of copy/pasting keyframes.
Copying between tracks of varying types is a "nice to have" that could help with the more generalised targeting being worked on in regards to the editor (godotengine/godot#53689) as well as syncing up animations of different components.
If a conversion takes place between compatible track types, this can be made clear to the user, via a non-intrusive info message in the animation editor UI, perhaps in the bottom toolbar, or in the editor output.
A "failed" paste, where the conversion was not possible, could alert the user via a pop up alert box, to make clear via error message that the tracks are incompatible.
Copying from multiple tracks to multiple other tracks is also "nice to have" functionality. The basic copy/paste between single compatible tracks is a huge QoL increase, imo. Adding multiple tracks and type conversions adds a smaller boost on top of that.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Feasibly you could write a tool or even external script to manipulate saved animation resources to mangle the data into other files and tracks. But it would be quite a complicated script, I imagine, and not built into the copy and paste workflow of the editor well.
Is there a reason why this should be core and not an add-on in the asset library?
This relates directly to the AnimationPlayer editor plugin functionality, and the core copy/paste functionality of the editor.
The text was updated successfully, but these errors were encountered: