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:
@@ -7322,6 +7322,13 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
|
||||
goto_prev_step(false);
|
||||
} break;
|
||||
|
||||
case EDIT_GOTO_NEXT_KEYFRAME: {
|
||||
AnimationPlayerEditor::get_singleton()->go_to_nearest_keyframe(false);
|
||||
} break;
|
||||
case EDIT_GOTO_PREV_KEYFRAME: {
|
||||
AnimationPlayerEditor::get_singleton()->go_to_nearest_keyframe(true);
|
||||
} break;
|
||||
|
||||
case EDIT_APPLY_RESET: {
|
||||
AnimationPlayerEditor::get_singleton()->get_player()->apply_reset(true);
|
||||
} break;
|
||||
@@ -8152,6 +8159,9 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
||||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/goto_next_step", TTRC("Go to Next Step"), KeyModifierMask::CMD_OR_CTRL | Key::RIGHT), EDIT_GOTO_NEXT_STEP);
|
||||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/goto_prev_step", TTRC("Go to Previous Step"), KeyModifierMask::CMD_OR_CTRL | Key::LEFT), EDIT_GOTO_PREV_STEP);
|
||||
edit->get_popup()->add_separator();
|
||||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/go_to_next_keyframe", TTRC("Go to Next Keyframe"), KeyModifierMask::SHIFT | KeyModifierMask::ALT | Key::D), EDIT_GOTO_NEXT_KEYFRAME);
|
||||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/go_to_previous_keyframe", TTRC("Go to Previous Keyframe"), KeyModifierMask::SHIFT | KeyModifierMask::ALT | Key::A), EDIT_GOTO_PREV_KEYFRAME);
|
||||
edit->get_popup()->add_separator();
|
||||
edit->get_popup()->add_shortcut(ED_SHORTCUT("animation_editor/apply_reset", TTRC("Apply Reset")), EDIT_APPLY_RESET);
|
||||
edit->get_popup()->add_separator();
|
||||
edit->get_popup()->add_item(TTR("Bake Animation..."), EDIT_BAKE_ANIMATION);
|
||||
|
||||
Reference in New Issue
Block a user