You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-03 16:55:53 +00:00
Merge pull request #107959 from rapust/add-keyframe-shortcuts
Add "Go to Next/Previous Keyframe" to Animation Edit menu
This commit is contained in:
@@ -246,7 +246,7 @@ void AnimationPlayerEditor::_autoplay_pressed() {
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationPlayerEditor::_go_to_nearest_keyframe(bool p_backward) {
|
||||
void AnimationPlayerEditor::go_to_nearest_keyframe(bool p_backward) {
|
||||
if (_get_current().is_empty()) {
|
||||
return;
|
||||
}
|
||||
@@ -1667,10 +1667,10 @@ void AnimationPlayerEditor::shortcut_input(const Ref<InputEvent> &p_ev) {
|
||||
_play_bw_pressed();
|
||||
accept_event();
|
||||
} else if (ED_IS_SHORTCUT("animation_editor/go_to_next_keyframe", p_ev)) {
|
||||
_go_to_nearest_keyframe(false);
|
||||
go_to_nearest_keyframe(false);
|
||||
accept_event();
|
||||
} else if (ED_IS_SHORTCUT("animation_editor/go_to_previous_keyframe", p_ev)) {
|
||||
_go_to_nearest_keyframe(true);
|
||||
go_to_nearest_keyframe(true);
|
||||
accept_event();
|
||||
}
|
||||
}
|
||||
@@ -2298,8 +2298,6 @@ void fragment() {
|
||||
ED_SHORTCUT("animation_editor/play_animation_backwards", TTRC("Play Animation Backwards"), Key::A);
|
||||
ED_SHORTCUT("animation_editor/play_animation_from_start", TTRC("Play Animation from Start"), KeyModifierMask::SHIFT + Key::D);
|
||||
ED_SHORTCUT("animation_editor/play_animation_from_end", TTRC("Play Animation Backwards from End"), KeyModifierMask::SHIFT + Key::A);
|
||||
ED_SHORTCUT("animation_editor/go_to_next_keyframe", TTRC("Go to Next Keyframe"), KeyModifierMask::SHIFT + KeyModifierMask::ALT + Key::D);
|
||||
ED_SHORTCUT("animation_editor/go_to_previous_keyframe", TTRC("Go to Previous Keyframe"), KeyModifierMask::SHIFT + KeyModifierMask::ALT + Key::A);
|
||||
}
|
||||
|
||||
AnimationPlayerEditor::~AnimationPlayerEditor() {
|
||||
|
||||
Reference in New Issue
Block a user