From 290b6d7ef327d963084792b65f7d8c79810b5e1f Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 26 Nov 2020 15:30:45 +0100 Subject: Fix T70316: Custom "Delete Keyframes" shortcut still requires confirmation Deleting keyframes in the dopesheet or graph editor always required confirmation, even if used ouside of the "Delete" menus. Now add a "confirm" option [same as for deleting objects], which can be disabled for immediate keyframe deletion. This will also change the default behavior and bring this in line with how object deletion works so there is one shortcut for bringing up the menu/confirmation and another shortcut to delete immediately without requiring confirmation / another click: - Blender Default keymap: "X" for menu, "Del" for immediate - Industry Compatible: "Backspace" for menu, "Del" for immediate Maniphest Tasks: T70316 Differential Revision: https://developer.blender.org/D9651 --- source/blender/editors/space_action/action_edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_action') diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 403dbf11d44..f731fe23b7c 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -1036,12 +1036,13 @@ void ACTION_OT_delete(wmOperatorType *ot) ot->description = "Remove all selected keyframes"; /* api callbacks */ - ot->invoke = WM_operator_confirm; + ot->invoke = WM_operator_confirm_or_exec; ot->exec = actkeys_delete_exec; ot->poll = ED_operator_action_active; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; + WM_operator_properties_confirm_or_exec(ot); } /* ******************** Clean Keyframes Operator ************************* */ -- cgit v1.2.3