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

Implement Cut Selected Keys in AnimationPlayer #88350

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

CookieBadger
Copy link
Contributor

@CookieBadger CookieBadger commented Feb 14, 2024

Following up on #87250, I added an additional option to "cut" the selected keys, i.e. both copy and remove them at once. This follows the way that cutting is implemented in the SceneTree.
Same as copy and paste, the option is accessible both through the right-click menu and the Edit menu, as well as with the usual shortcut of CTRL+X.
While not necessarily a complex feature, the lack thereof would definitely confound some users, especially since pressing the familiar CTRL+X in hopes of cutting the selected keys (since CTRL+C, CTRL+V work as well) would remove the currently selected node in the scene if this shortcut were not implemented in the AnimationPlayer.
The implementation works both in the default and the Bezier editor.
AnimationPlayerCutKeys

@CookieBadger
Copy link
Contributor Author

This should also complete #3419.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected. Thanks a lot for improving animation editor usability 🙂

Code looks good to me at a glance, but @godotengine/animation should take a second look just in case.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Feb 16, 2024
@akien-mga akien-mga merged commit 4002ea7 into godotengine:master Feb 18, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Kartopod
Copy link

Oh my god i love you

@holzmb
Copy link

holzmb commented May 16, 2024

@CookieBadger what a legend.
one question, do you know if it would be possible to implement selection of all keyframes at certain time?
for example you want to select all keyframes across multiple tracks at exactly(or around) 1 second mark.
i think it's called master keyframe in every animation tool.
i'd literally pay you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants