diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-16 02:41:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-16 02:51:33 +0300 |
commit | b24de94c29237586470ec061312f64780097ba74 (patch) | |
tree | 6405363285c5a462ff6494d55d3efef14f77a4f7 /release | |
parent | a915da221fa838dbdb846120c9ef8c0b381c3dfe (diff) |
Cleanup: de-duplicate 3d view select items
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 85 |
1 files changed, 13 insertions, 72 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index bbd5e2565ff..2914cde9e63 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -887,78 +887,19 @@ def km_view3d(params): ("view3d.view_axis", {"type": 'NDOF_BUTTON_TOP', "value": 'PRESS', "shift": True}, {"properties": [("type", 'TOP'), ("align_active", True)]}), # Selection. - ("view3d.select", {"type": params.select_mouse, "value": params.select_mouse_value}, - {"properties": [ - ("extend", False), - ("deselect", False), - ("toggle", False), - ("center", False), - ("enumerate", False), - ("object", False), - ], },), - ("view3d.select", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True}, - {"properties": [ - ("extend", False), - ("deselect", False), - ("toggle", True), - ("center", False), - ("enumerate", False), - ("object", False), - ], },), - ("view3d.select", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True}, - {"properties": [ - ("extend", False), - ("deselect", False), - ("toggle", False), - ("center", True), - ("enumerate", False), - ("object", True), - ], },), - ("view3d.select", {"type": params.select_mouse, "value": params.select_mouse_value, "alt": True}, - {"properties": [ - ("extend", False), - ("deselect", False), - ("toggle", False), - ("center", False), - ("enumerate", True), - ("object", False), - ], },), - ("view3d.select", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "ctrl": True}, - {"properties": [ - ("extend", True), - ("deselect", False), - ("toggle", True), - ("center", True), - ("enumerate", False), - ("object", False), - ], },), - ("view3d.select", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True, "alt": True}, - {"properties": [ - ("extend", False), - ("deselect", False), - ("toggle", False), - ("center", True), - ("enumerate", True), - ("object", False), - ], },), - ("view3d.select", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "alt": True}, - {"properties": [ - ("extend", False), - ("deselect", False), - ("toggle", True), - ("center", False), - ("enumerate", True), - ("object", False), - ], },), - ("view3d.select", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "ctrl": True, "alt": True}, - {"properties": [ - ("extend", False), - ("deselect", False), - ("toggle", True), - ("center", True), - ("enumerate", True), - ("object", False), - ], },), + *(("view3d.select", + {"type": params.select_mouse, "value": params.select_mouse_value, **{m: True for m in mods}}, + {"properties": [(c, True) for c in props]}, + ) for props, mods in ( + ((), ()), + (("toggle",), ("shift",)), + (("center", "object"), ("ctrl",)), + (("enumerate",), ("alt",)), + (("extend", "toggle", "center"), ("shift", "ctrl")), + (("center", "enumerate"), ("ctrl", "alt")), + (("toggle", "enumerate"), ("shift", "alt")), + (("toggle", "center", "enumerate"), ("shift", "ctrl", "alt")), + )), ("view3d.select_box", {"type": 'B', "value": 'PRESS'}, None), ("view3d.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True}, {"properties": [("mode", 'ADD')]}), |