Skip to content

Add new animation editor keyboard shortcuts#10348

Merged
riknoll merged 2 commits intomasterfrom
dev/riknoll/new-animation-shortcuts
Jan 23, 2025
Merged

Add new animation editor keyboard shortcuts#10348
riknoll merged 2 commits intomasterfrom
dev/riknoll/new-animation-shortcuts

Conversation

@riknoll
Copy link
Member

@riknoll riknoll commented Jan 23, 2025

this tweaks a lot of existing shortcuts and adds a few more that are specific to the animation editor. all of the shortcuts that are affected by the marquee tool can now be combined with the shift key to affect all animation frames at the same time. for example:

new-anim-shortcuts

look at the timeline in that GIF to see all of the frames editing at once.

this also means that all of the shortcuts that were previously tied to uppercase letters have now been moved to the lowercase versions of those letters. the shifted versions will still work, but will affect all frames in animations. they are unchanged in the image/tilemap editor. also the pan tool shortcut was moved from h to q so as not to conflict with the horizontal flip shortcut. this breaks from the standard set by most image editors for pan, but i'm guessing most people use the spacebar anyhow.

finally, two new shortcuts were added for advancing the animation frame forwards and backwards

@riknoll riknoll requested a review from a team January 23, 2025 01:06
@riknoll
Copy link
Member Author

riknoll commented Jan 23, 2025

todo: make the page up and page down keys move the current animation frame up and down in the timeline

Copy link
Contributor

@srietkerk srietkerk left a comment

Choose a reason for hiding this comment

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

Couple small suggestions, LGTM!

export function advanceFrame(forwards: boolean) {
const state = store.getState();

if (state.editor.isTilemap) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to check if it's the image editor as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

that's what the frames length check does! the image editor uses the same state as the animation editor, it just has only one frame

@riknoll riknoll merged commit 48e25e0 into master Jan 23, 2025
6 checks passed
@riknoll riknoll deleted the dev/riknoll/new-animation-shortcuts branch January 23, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants