diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-06 06:45:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-06 06:54:05 +0300 |
commit | ba95cf6234af1255a794e02f831e0924ddfc1f46 (patch) | |
tree | b2f9529556bfb2ea1c5730f9ddca121bb5d2ee8d /release/scripts | |
parent | 8e2a21e8624df8df5ac42e8c5f6d196068d30d73 (diff) |
Keymap: remove selection from the common sequencer map
Needed for further changes as selection behaves differently
in the preview region.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 650ade4d111..c1db5128151 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -2685,9 +2685,6 @@ def km_sequencercommon(params): ("wm.context_toggle_enum", {"type": 'TAB', "value": 'PRESS', "ctrl": True}, {"properties": [("data_path", 'space_data.view_type'), ("value_1", 'SEQUENCER'), ("value_2", 'PREVIEW')]}), ("sequencer.refresh_all", {"type": 'R', "value": 'PRESS', "ctrl": True}, None), - ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS'}, None), - ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True}, - {"properties": [("extend", True)]}), ]) if params.select_mouse == 'LEFTMOUSE' and not params.legacy: @@ -2770,6 +2767,11 @@ def km_sequencer(params): for i in range(10) ) ), + *_template_sequencer_select( + type=params.select_mouse, + value=params.select_mouse_value_fallback, + legacy=params.legacy, + ), ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "alt": True}, {"properties": [("linked_handle", True)]}), ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True}, @@ -2828,6 +2830,12 @@ def km_sequencerpreview(params): ) items.extend([ + # Selection. + *_template_sequencer_select( + type=params.select_mouse, + value=params.select_mouse_value_fallback, + legacy=params.legacy, + ), ("sequencer.view_all_preview", {"type": 'HOME', "value": 'PRESS'}, None), ("sequencer.view_all_preview", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None), ("sequencer.view_ghost_border", {"type": 'O', "value": 'PRESS'}, None), @@ -4637,6 +4645,26 @@ def _template_uv_select_for_fallback(params, fallback): return [] +def _template_sequencer_select(*, type, value, legacy): + # FIXME. + legacy = True + return [( + "sequencer.select", + {"type": type, "value": value, **{m: True for m in mods}}, + {"properties": [(c, True) for c in props]}, + ) for props, mods in ( + (("deselect_all",) if not legacy else (), ()), + (("extend",), ("shift",)), + # TODO: + # (("center", "object"), ("ctrl",)), + # (("enumerate",), ("alt",)), + # (("toggle", "center"), ("shift", "ctrl")), + # (("center", "enumerate"), ("ctrl", "alt")), + # (("toggle", "enumerate"), ("shift", "alt")), + # (("toggle", "center", "enumerate"), ("shift", "ctrl", "alt")), + )] + + def km_image_paint(params): items = [] keymap = ( |