Add new animation editor keyboard shortcuts#10348
Merged
Conversation
Member
Author
|
todo: make the page up and page down keys move the current animation frame up and down in the timeline |
srietkerk
approved these changes
Jan 23, 2025
Contributor
srietkerk
left a comment
There was a problem hiding this comment.
Couple small suggestions, LGTM!
| export function advanceFrame(forwards: boolean) { | ||
| const state = store.getState(); | ||
|
|
||
| if (state.editor.isTilemap) return; |
Contributor
There was a problem hiding this comment.
Do we need to check if it's the image editor as well?
Member
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
shiftkey to affect all animation frames at the same time. for example: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
htoqso 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