Add "Go to Next/Previous Keyframe" to Animation Edit menu
This commit is contained in:
@@ -225,7 +225,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;
|
||||
}
|
||||
@@ -1646,10 +1646,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();
|
||||
}
|
||||
}
|
||||
@@ -2277,8 +2277,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