diff options
author | William Reynish <billrey@me.com> | 2020-01-04 16:26:26 +0300 |
---|---|---|
committer | William Reynish <billrey@me.com> | 2020-01-04 16:26:26 +0300 |
commit | 9fec9c6a0fd1589f12da20b492a14e2801f1eb51 (patch) | |
tree | 09cf5be1c8bc661a069aba9d53e557442d7d660e /release | |
parent | 0ac41dea7e21fb5c9388f8b72b8c6b6dfb005046 (diff) |
Industry Compat keymap: Support 1-3 keys in the UV Editor when Sync Selection is enabled
This also makes it possible to hold Shift to enable multiple selection modes in Edit Mode
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py | 26 |
1 files changed, 18 insertions, 8 deletions
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 e6d68510312..13523759b95 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -180,6 +180,19 @@ def _template_items_tool_select_actions_simple(operator, *, type, value, propert ] +def _template_items_editmode_mesh_select_mode(params): + return [ + ( + "mesh.select_mode", + {"type": k, "value": 'PRESS', **key_expand, **key_extend}, + {"properties": [*prop_extend, *prop_expand, ("type", e)]} + ) + for key_expand, prop_expand in (({}, ()), ({"ctrl": True}, (("use_expand", True),))) + for key_extend, prop_extend in (({}, ()), ({"shift": True}, (("use_extend", True),))) + for k, e in (('ONE', 'VERT'), ('TWO', 'EDGE'), ('THREE', 'FACE')) + ] + + # ------------------------------------------------------------------------------ # Window, Screen, Areas, Regions @@ -541,6 +554,7 @@ def km_uv_editor(params): op_panel("TOPBAR_PT_name", {"type": 'RET', "value": 'PRESS'}, [("keep_open", False)]), ("wm.search_menu", {"type": 'TAB', "value": 'PRESS'}, None), # Selection modes. + *_template_items_editmode_mesh_select_mode(params), ("wm.context_set_enum", {"type": 'ONE', "value": 'PRESS'}, {"properties": [("data_path", 'tool_settings.uv_select_mode'), ("value", 'VERTEX')]}), ("wm.context_set_enum", {"type": 'TWO', "value": 'PRESS'}, @@ -554,6 +568,7 @@ def km_uv_editor(params): {"properties": [("extend", False), ("deselect_all", True)]}), ("uv.select", {"type": 'LEFTMOUSE', "value": 'CLICK', "shift": True}, {"properties": [("extend", True), ("deselect_all", False)]}), + ("transform.translate", {"type": "EVT_TWEAK_L", "value": 'ANY'}, None), ("uv.select_loop", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK', "shift": True}, {"properties": [("extend", True)]}), @@ -1004,14 +1019,6 @@ def km_image(params): {"properties": [("point", 'BLACK_POINT')]}), ("image.curves_point_set", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, {"properties": [("point", 'WHITE_POINT')]}), - ("object.mode_set", {"type": 'ONE', "value": 'PRESS'}, - {"properties": [("mode", 'EDIT')]}), - ("object.mode_set", {"type": 'TWO', "value": 'PRESS'}, - {"properties": [("mode", 'OBJECT')]}), - ("object.mode_set", {"type": 'THREE', "value": 'PRESS'}, - {"properties": [("mode", 'OBJECT')]}), - ("object.mode_set", {"type": 'FOUR', "value": 'PRESS'}, - {"properties": [("mode", 'OBJECT')]}), op_menu_pie("IMAGE_MT_pivot_pie", {"type": 'PERIOD', "value": 'PRESS'}), # Tools op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), @@ -3122,6 +3129,9 @@ def km_mesh(params): ("mesh.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None), ("mesh.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None), ("mesh.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None), + + *_template_items_editmode_mesh_select_mode(params), + # Hide/reveal. ("mesh.hide", {"type": 'H', "value": 'PRESS', "ctrl": True}, {"properties": [("unselected", False)]}), |