diff options
author | William Reynish <billrey@me.com> | 2019-12-08 07:05:31 +0300 |
---|---|---|
committer | William Reynish <billrey@me.com> | 2019-12-08 07:05:31 +0300 |
commit | d82d19904b66a7ca2d0c181045a9a16d6504a54c (patch) | |
tree | 988bb3f656bd7d90314d257d7caf82e03f6c588c | |
parent | 416e66c7fe211e7e21d0d4fad987d4219c191f71 (diff) |
Industry Compat keymap: Support tool cycling for all tool shortcuts
This makes is so repeated key presses will cycle the tools in the same slot in the toolbar.
Users can tap Q repeatedly to switch selection tools, or press Ctrl-E repeatedly to enable the various Extrude tools, etc.
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py | 112 |
1 files changed, 56 insertions, 56 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 6c2d89233ce..d7ba10495f4 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -128,15 +128,15 @@ def _template_items_gizmo_tweak_value_drag(): def _template_items_basic_tools(*, connected=False): return [ - op_tool("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), - op_tool("builtin.move", {"type": 'W', "value": 'PRESS'}), - op_tool("builtin.rotate", {"type": 'E', "value": 'PRESS'}), - op_tool("builtin.scale", {"type": 'R', "value": 'PRESS'}), - op_tool("builtin.transform", {"type": 'T', "value": 'PRESS'}), - op_tool("builtin.scale_cage", {"type": 'R', "value": 'PRESS', "shift": True}), - op_tool("builtin.annotate", {"type": 'D', "value": 'PRESS'}), - op_tool("builtin.measure", {"type": 'M', "value": 'PRESS'}), - op_tool("builtin.cursor", {"type": 'C', "value": 'PRESS'}), + op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), + op_tool_cycle("builtin.move", {"type": 'W', "value": 'PRESS'}), + op_tool_cycle("builtin.rotate", {"type": 'E', "value": 'PRESS'}), + op_tool_cycle("builtin.scale", {"type": 'R', "value": 'PRESS'}), + op_tool_cycle("builtin.transform", {"type": 'T', "value": 'PRESS'}), + op_tool_cycle("builtin.scale_cage", {"type": 'R', "value": 'PRESS', "shift": True}), + op_tool_cycle("builtin.annotate", {"type": 'D', "value": 'PRESS'}), + op_tool_cycle("builtin.measure", {"type": 'M', "value": 'PRESS'}), + op_tool_cycle("builtin.cursor", {"type": 'C', "value": 'PRESS'}), ] def _template_items_tool_select(params, operator, cursor_operator): @@ -567,13 +567,13 @@ def km_uv_editor(params): ("wm.context_toggle", {"type": 'X', "value": 'PRESS'}, {"properties": [("data_path", 'tool_settings.use_snap')]}), # Tools - op_tool("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), - op_tool("builtin.move", {"type": 'W', "value": 'PRESS'}), - op_tool("builtin.rotate", {"type": 'E', "value": 'PRESS'}), - op_tool("builtin.scale", {"type": 'R', "value": 'PRESS'}), - op_tool("builtin.transform", {"type": 'T', "value": 'PRESS'}), - op_tool("builtin.cursor", {"type": 'C', "value": 'PRESS'}), - op_tool("builtin.annotate", {"type": 'D', "value": 'PRESS'}), + op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), + op_tool_cycle("builtin.move", {"type": 'W', "value": 'PRESS'}), + op_tool_cycle("builtin.rotate", {"type": 'E', "value": 'PRESS'}), + op_tool_cycle("builtin.scale", {"type": 'R', "value": 'PRESS'}), + op_tool_cycle("builtin.transform", {"type": 'T', "value": 'PRESS'}), + op_tool_cycle("builtin.cursor", {"type": 'C', "value": 'PRESS'}), + op_tool_cycle("builtin.annotate", {"type": 'D', "value": 'PRESS'}), ]) return keymap @@ -1004,13 +1004,13 @@ def km_image(params): {"properties": [("mode", 'OBJECT')]}), op_menu_pie("IMAGE_MT_pivot_pie", {"type": 'PERIOD', "value": 'PRESS'}), # Tools - op_tool("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), - op_tool("builtin.transform", {"type": 'W', "value": 'PRESS'}), - op_tool("builtin.transform", {"type": 'E', "value": 'PRESS'}), - op_tool("builtin.transform", {"type": 'R', "value": 'PRESS'}), - op_tool("builtin.cursor", {"type": 'C', "value": 'PRESS'}), - op_tool("builtin.annotate", {"type": 'D', "value": 'PRESS'}), - op_tool("builtin.sample", {"type": 'I', "value": 'PRESS'}), + op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), + op_tool_cycle("builtin.transform", {"type": 'W', "value": 'PRESS'}), + op_tool_cycle("builtin.transform", {"type": 'E', "value": 'PRESS'}), + op_tool_cycle("builtin.transform", {"type": 'R', "value": 'PRESS'}), + op_tool_cycle("builtin.cursor", {"type": 'C', "value": 'PRESS'}), + op_tool_cycle("builtin.annotate", {"type": 'D', "value": 'PRESS'}), + op_tool_cycle("builtin.sample", {"type": 'I', "value": 'PRESS'}), ]) @@ -2360,11 +2360,11 @@ def km_grease_pencil_stroke_paint_mode(params): op_menu("GPENCIL_MT_gpencil_draw_delete", {"type": 'BACK_SPACE', "value": 'PRESS'}), op_menu("GPENCIL_MT_gpencil_draw_delete", {"type": 'DEL', "value": 'PRESS'}), # Tools - op_tool("builtin_brush.Draw", {"type": 'D', "value": 'PRESS'}), - op_tool("builtin_brush.Fill", {"type": 'F', "value": 'PRESS'}), - op_tool("builtin_brush.Erase", {"type": 'E', "value": 'PRESS'}), - op_tool("builtin.cutter", {"type": 'K', "value": 'PRESS'}), - op_tool("builtin.cursor", {"type": 'C', "value": 'PRESS'}), + op_tool_cycle("builtin_brush.Draw", {"type": 'D', "value": 'PRESS'}), + op_tool_cycle("builtin_brush.Fill", {"type": 'F', "value": 'PRESS'}), + op_tool_cycle("builtin_brush.Erase", {"type": 'E', "value": 'PRESS'}), + op_tool_cycle("builtin.cutter", {"type": 'K', "value": 'PRESS'}), + op_tool_cycle("builtin.cursor", {"type": 'C', "value": 'PRESS'}), ]) return keymap @@ -2627,13 +2627,13 @@ def km_pose(params): ("anim.keying_set_active_set", {"type": 'S', "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, None), op_menu("VIEW3D_MT_pose_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), # Tools - op_tool("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), - op_tool("builtin.move", {"type": 'W', "value": 'PRESS'}), - op_tool("builtin.rotate", {"type": 'E', "value": 'PRESS'}), - op_tool("builtin.scale", {"type": 'R', "value": 'PRESS'}), - op_tool("builtin.scale_cage", {"type": 'R', "value": 'PRESS', "shift": True}), - op_tool("builtin.transform", {"type": 'T', "value": 'PRESS'}), - op_tool("builtin.measure", {"type": 'M', "value": 'PRESS'}), + op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), + op_tool_cycle("builtin.move", {"type": 'W', "value": 'PRESS'}), + op_tool_cycle("builtin.rotate", {"type": 'E', "value": 'PRESS'}), + op_tool_cycle("builtin.scale", {"type": 'R', "value": 'PRESS'}), + op_tool_cycle("builtin.scale_cage", {"type": 'R', "value": 'PRESS', "shift": True}), + op_tool_cycle("builtin.transform", {"type": 'T', "value": 'PRESS'}), + op_tool_cycle("builtin.measure", {"type": 'M', "value": 'PRESS'}), ]) @@ -2780,9 +2780,9 @@ def km_curve(params): {"properties": [("data_path", 'tool_settings.use_proportional_edit')]}), # Tools *_template_items_basic_tools(), - op_tool("builtin.extrude", {"type": 'E', "value": 'PRESS', "ctrl": True}), - op_tool("builtin.tilt", {"type": 'Y', "value": 'PRESS'}), - op_tool("builtin.radius", {"type": 'U', "value": 'PRESS'}), + op_tool_cycle("builtin.extrude", {"type": 'E', "value": 'PRESS', "ctrl": True}), + op_tool_cycle("builtin.tilt", {"type": 'Y', "value": 'PRESS'}), + op_tool_cycle("builtin.radius", {"type": 'U', "value": 'PRESS'}), ]) @@ -2885,7 +2885,7 @@ def km_image_paint(params): {"properties": [("image_tool", 'SOFTEN')]}), ("paint.brush_select", {"type": 'G', "value": 'PRESS'}, {"properties": [("image_tool", 'FILL')]}), - op_tool("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), + op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), ]) return keymap @@ -2933,7 +2933,7 @@ def km_vertex_paint(params): {"properties": [("vertex_tool", 'DRAW')]}), ("paint.brush_select", {"type": 'B', "value": 'PRESS'}, {"properties": [("vertex_tool", 'BLUR')]}), - op_tool("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), + op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), ]) return keymap @@ -2969,8 +2969,8 @@ def km_weight_paint(params): {"properties": [("weight_tool", 'DRAW')]}), ("paint.brush_select", {"type": 'B', "value": 'PRESS'}, {"properties": [("weight_tool", 'BLUR')]}), - op_tool("builtin.sample_weight", {"type": 'I', "value": 'PRESS'}), - op_tool("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), + op_tool_cycle("builtin.sample_weight", {"type": 'I', "value": 'PRESS'}), + op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), ]) return keymap @@ -3128,11 +3128,11 @@ def km_mesh(params): op_menu("VIEW3D_MT_edit_mesh_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), #Tools *_template_items_basic_tools(), - op_tool("builtin.bevel", {"type": 'B', "value": 'PRESS', "ctrl": True}), - op_tool("builtin.inset_faces", {"type": 'I', "value": 'PRESS'}), - op_tool("builtin.extrude_region", {"type": 'E', "value": 'PRESS', "ctrl": True}), - op_tool("builtin.knife", {"type": 'K', "value": 'PRESS'}), - op_tool("builtin.loop_cut", {"type": 'C', "value": 'PRESS', "alt": True}), + op_tool_cycle("builtin.bevel", {"type": 'B', "value": 'PRESS', "ctrl": True}), + op_tool_cycle("builtin.inset_faces", {"type": 'I', "value": 'PRESS'}), + op_tool_cycle("builtin.extrude_region", {"type": 'E', "value": 'PRESS', "ctrl": True}), + op_tool_cycle("builtin.knife", {"type": 'K', "value": 'PRESS'}), + op_tool_cycle("builtin.loop_cut", {"type": 'C', "value": 'PRESS', "alt": True}), ]) @@ -3191,8 +3191,8 @@ def km_armature(params): op_menu("VIEW3D_MT_armature_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), # Tools. *_template_items_basic_tools(), - op_tool("builtin.roll", {"type": 'Y', "value": 'PRESS'}), - op_tool("builtin.extrude", {"type": 'E', "value": 'PRESS', "ctrl": True}), + op_tool_cycle("builtin.roll", {"type": 'Y', "value": 'PRESS'}), + op_tool_cycle("builtin.extrude", {"type": 'E', "value": 'PRESS', "ctrl": True}), ]) @@ -3252,13 +3252,13 @@ def km_lattice(params): ("wm.context_toggle", {"type": 'B', "value": 'PRESS'}, {"properties": [("data_path", 'tool_settings.use_proportional_edit')]}), # Tools - op_tool("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), - op_tool("builtin.move", {"type": 'W', "value": 'PRESS'}), - op_tool("builtin.rotate", {"type": 'E', "value": 'PRESS'}), - op_tool("builtin.scale", {"type": 'R', "value": 'PRESS'}), - op_tool("builtin.scale_cage", {"type": 'R', "value": 'PRESS', "shift": True}), - op_tool("builtin.transform", {"type": 'T', "value": 'PRESS'}), - op_tool("builtin.measure", {"type": 'M', "value": 'PRESS'}), + op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}), + op_tool_cycle("builtin.move", {"type": 'W', "value": 'PRESS'}), + op_tool_cycle("builtin.rotate", {"type": 'E', "value": 'PRESS'}), + op_tool_cycle("builtin.scale", {"type": 'R', "value": 'PRESS'}), + op_tool_cycle("builtin.scale_cage", {"type": 'R', "value": 'PRESS', "shift": True}), + op_tool_cycle("builtin.transform", {"type": 'T', "value": 'PRESS'}), + op_tool_cycle("builtin.measure", {"type": 'M', "value": 'PRESS'}), ]) return keymap |