Skip to content
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

Disable cut/copy/paste shortcuts when selecting keys in an animation track #3475

Closed
MagdielM opened this issue Oct 28, 2021 · 4 comments
Closed

Comments

@MagdielM
Copy link

Describe the project you are working on

A 3D prototype with animations authored in-engine.

Describe the problem or limitation you are having in your project

Currently there is no support for copying and pasting individual keys in an animation track. This is understandable, but it also means that using the cut/copy/paste shortcuts performs these operations on the selected node rather than in the animation, which is very unintuitive. Several times I've cut the entire AnimationPlayer out of a scene while trying to cut and paste selected keys out of habit, and most recently I've lost an entire set of animations because I accidentally cut the node out of the tree and saved the scene, and my editor crashed shortly after (unrelated).

Describe the feature / enhancement and how it helps to overcome the problem or limitation

The shortcuts can be quite simply disabled when keys are selected in the animation editor. Perhaps a quick warning can also be displayed, telling the user that the shortcuts do nothing for animation keys. The point is that they should not cut the entire node when used while keys are selected.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

The shortcuts do nothing when animation keys are selected, or warn the user that they have no effect.

If this enhancement will not be used often, can it be worked around with a few lines of script?

The workaround would be to simply be more careful, but this is less a workaround and more just ignoring the issue.

Is there a reason why this should be core and not an add-on in the asset library?

Addons can't modify the behavior of built-in editor windows, and even if they could, Godot's UX is important, and improving it probably shouldn't be delegated to external tools.

@Calinou
Copy link
Member

Calinou commented Oct 28, 2021

Related to #3419.

This is difficult to do in 3.x correctly due to how editor input propagation is done1. In master, it may be easier but we still want the node duplication shortcuts to work even if the scene tree dock isn't currently focused.

Footnotes

  1. Implementing copy-paste for animation keyframes may incidentally resolve this. If that's actually the case, we could implement dummy shortcuts whose only purpose is to intercept the inputs and mark them as handled.

@MagdielM
Copy link
Author

MagdielM commented Oct 28, 2021

Implementing copy-paste for animation keyframes may incidentally resolve this. If that's actually the case, we could implement dummy shortcuts whose only purpose is to intercept the inputs and mark them as handled.

Yeah, this sounds like the most appropriate solution. The crux of the issue is that the shortcuts currently behave very unintuitively (you select a keyframe, use the cut shortcut and suddenly the AnimationPlayer is gone), so having them do what most users would expect (cut, copy or paste the keyframe) would pretty much solve this.

@CookieBadger
Copy link

CookieBadger commented Feb 18, 2024

From 4.3 onward, this should no longer be an issue anymore, as all related shortcuts have been implemented in #87250 and #88350, and therefore the shortcuts input cannot propagate up to the scene tree. Hence, this issue can be closed.

@Calinou
Copy link
Member

Calinou commented Feb 19, 2024

Closing per the above comment.

@Calinou Calinou closed this as completed Feb 19, 2024
@Calinou Calinou added this to the 4.3 milestone Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants