Keymap: support default shortcut to toggle overlays in all space-types

UV Editor, Image Editor & Sequencer didn't have a shortcut for toggling
overlays. Use the same shortcut as the 3D viewport.

Ref D16959
This commit is contained in:
b-init 2023-02-07 16:54:06 +11:00 committed by Campbell Barton
parent 622cad7073
commit 7e8153b07d
Notes: blender-bot 2023-07-10 10:12:37 +02:00
Referenced by issue #102924, Some editors don't have shortcut assigned for overlay popover
1 changed files with 6 additions and 0 deletions

View File

@ -1299,6 +1299,8 @@ def km_uv_editor(params):
{"properties": [("data_path", 'tool_settings.snap_uv_element')]}),
("wm.context_toggle", {"type": 'ACCENT_GRAVE', "value": 'PRESS', "ctrl": True},
{"properties": [("data_path", 'space_data.show_gizmo')]}),
("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True},
{"properties": [("data_path", "space_data.overlay.show_overlays")]}),
*_template_items_context_menu("IMAGE_MT_uvs_context_menu", params.context_menu_event),
])
@ -1968,6 +1970,8 @@ def km_image(params):
("image.clear_render_border", {"type": 'B', "value": 'PRESS', "ctrl": True, "alt": True}, None),
("wm.context_toggle", {"type": 'ACCENT_GRAVE', "value": 'PRESS', "ctrl": True},
{"properties": [("data_path", 'space_data.show_gizmo')]}),
("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True},
{"properties": [("data_path", "space_data.overlay.show_overlays")]}),
*_template_items_context_menu("IMAGE_MT_mask_context_menu", params.context_menu_event),
])
@ -2914,6 +2918,8 @@ def km_sequencer(params):
{"properties": [("side", 'RIGHT')]}),
("wm.context_toggle", {"type": 'TAB', "value": 'PRESS', "shift": True},
{"properties": [("data_path", 'tool_settings.use_snap_sequencer')]}),
("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True},
{"properties": [("data_path", "space_data.show_overlays")]}),
*_template_items_context_menu("SEQUENCER_MT_context_menu", params.context_menu_event),
])