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 --- release/scripts/presets/keyconfig/keymap_data/blender_default.py | 4 ++-- .../scripts/presets/keyconfig/keymap_data/industry_compatible_data.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'release') diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index d3990851e2c..d6a75c0209e 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1563,7 +1563,7 @@ def km_graph_editor(params): ("graph.sample", {"type": 'O', "value": 'PRESS', "shift": True, "alt": True}, None), ("graph.bake", {"type": 'C', "value": 'PRESS', "alt": True}, None), op_menu("GRAPH_MT_delete", {"type": 'X', "value": 'PRESS'}), - op_menu("GRAPH_MT_delete", {"type": 'DEL', "value": 'PRESS'}), + ("graph.delete", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("confirm", False)]}), ("graph.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True}, None), ("graph.keyframe_insert", {"type": 'I', "value": 'PRESS'}, None), ("graph.click_insert", {"type": params.action_mouse, "value": 'CLICK', "ctrl": True}, @@ -2113,7 +2113,7 @@ def km_dopesheet(params): ("action.keyframe_type", {"type": 'R', "value": 'PRESS'}, None), ("action.sample", {"type": 'O', "value": 'PRESS', "shift": True, "alt": True}, None), op_menu("DOPESHEET_MT_delete", {"type": 'X', "value": 'PRESS'}), - op_menu("DOPESHEET_MT_delete", {"type": 'DEL', "value": 'PRESS'}), + ("action.delete", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("confirm", False)]}), ("action.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True}, None), ("action.keyframe_insert", {"type": 'I', "value": 'PRESS'}, None), ("action.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None), diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py index 4b8a470a3ae..3a59f6fd8b9 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -929,7 +929,7 @@ def km_graph_editor(params): ("graph.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None), ("graph.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None), op_menu("GRAPH_MT_delete", {"type": 'BACK_SPACE', "value": 'PRESS'}), - op_menu("GRAPH_MT_delete", {"type": 'DEL', "value": 'PRESS'}), + ("graph.delete", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("confirm", False)]}), *_template_items_context_menu("GRAPH_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), ("graph.duplicate_move", {"type": 'D', "value": 'PRESS', "ctrl": True}, None), ("graph.keyframe_insert", {"type": 'S', "value": 'PRESS'}, None), @@ -1416,7 +1416,7 @@ def km_dopesheet(params): op_menu_pie("DOPESHEET_MT_snap_pie", {"type": 'X', "value": 'PRESS', "shift": True}), *_template_items_context_menu("DOPESHEET_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), op_menu("DOPESHEET_MT_delete", {"type": 'BACK_SPACE', "value": 'PRESS'}), - op_menu("DOPESHEET_MT_delete", {"type": 'DEL', "value": 'PRESS'}), + ("action.delete", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("confirm", False)]}), ("action.duplicate_move", {"type": 'D', "value": 'PRESS', "ctrl": True}, None), ("action.keyframe_insert", {"type": 'S', "value": 'PRESS'}, None), ("action.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None), -- cgit v1.2.3