diff options
Diffstat (limited to 'release/scripts/presets/keyconfig')
3 files changed, 68 insertions, 19 deletions
diff --git a/release/scripts/presets/keyconfig/blender.py b/release/scripts/presets/keyconfig/blender.py index 0bff9974aaa..cbdd01b3cbe 100644 --- a/release/scripts/presets/keyconfig/blender.py +++ b/release/scripts/presets/keyconfig/blender.py @@ -54,6 +54,15 @@ class Prefs(bpy.types.KeyConfigPreferences): default='PLAY', update=update_fn, ) + use_alt_click_leader: BoolProperty( + name="Alt Click Tool Prompt", + description=( + "Tapping Alt (without pressing any other keys) shows a prompt in the status-bar\n" + "prompting a second keystroke to activate the tool" + ), + default=False, + update=update_fn, + ) use_select_all_toggle: BoolProperty( name="Select All Toggles", description=( @@ -164,13 +173,16 @@ class Prefs(bpy.types.KeyConfigPreferences): col = layout.column() col.row().prop(self, "select_mouse", text="Select with Mouse Button", expand=True) col.row().prop(self, "spacebar_action", text="Spacebar Action", expand=True) + if is_select_left: col.row().prop(self, "gizmo_action", text="Activate Gizmo Event", expand=True) # Checkboxes sub-layout. col = layout.column() sub = col.column(align=True) - sub.prop(self, "use_select_all_toggle") + row = sub.row() + row.prop(self, "use_select_all_toggle") + row.prop(self, "use_alt_click_leader") # 3DView settings. col = layout.column() @@ -217,6 +229,7 @@ def load(): kc_prefs.select_mouse == 'LEFT' and kc_prefs.gizmo_action == 'DRAG' ), + use_alt_click_leader=kc_prefs.use_alt_click_leader, use_pie_click_drag=kc_prefs.use_pie_click_drag, ), ) diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 4b037f209bb..efa4b9b00a0 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -52,6 +52,8 @@ class Params: "use_v3d_shade_ex_pie", # Swap orbit/pan keys (for 2D workflows). "use_v3d_mmb_pan", + # Alt click to access tools. + "use_alt_click_leader", # Experimental option. "use_pie_click_drag", "v3d_tilde_action", @@ -73,6 +75,7 @@ class Params: use_v3d_tab_menu=False, use_v3d_shade_ex_pie=False, use_v3d_mmb_pan=False, + use_alt_click_leader=False, use_pie_click_drag=False, v3d_tilde_action='VIEW', v3d_alt_mmb_drag_action='RELATIVE', @@ -126,6 +129,7 @@ class Params: self.v3d_tilde_action = v3d_tilde_action self.v3d_alt_mmb_drag_action = v3d_alt_mmb_drag_action + self.use_alt_click_leader = use_alt_click_leader self.use_pie_click_drag = use_pie_click_drag if not use_pie_click_drag: self.pie_value = 'PRESS' @@ -449,11 +453,15 @@ def km_window(params): op_menu("TOPBAR_MT_file_context_menu", {"type": 'F4', "value": 'PRESS'}), # Pass through when when no tool-system exists or the fallback isn't available. ("wm.toolbar_fallback_pie", {"type": 'W', "value": 'PRESS', "alt": True}, None), - # Alt as "Leader-Key". - ("wm.toolbar_prompt", {"type": 'LEFT_ALT', "value": 'CLICK'}, None), - ("wm.toolbar_prompt", {"type": 'RIGHT_ALT', "value": 'CLICK'}, None), ]) + if params.use_alt_click_leader: + items.extend([ + # Alt as "Leader-Key". + ("wm.toolbar_prompt", {"type": 'LEFT_ALT', "value": 'CLICK'}, None), + ("wm.toolbar_prompt", {"type": 'RIGHT_ALT', "value": 'CLICK'}, None), + ]) + if params.spacebar_action == 'TOOL': items.append( ("wm.toolbar", {"type": 'SPACE', "value": 'PRESS'}, None), @@ -738,6 +746,12 @@ def km_property_editor(_params): ("object.gpencil_modifier_remove", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("report", True)]}), ("object.gpencil_modifier_copy", {"type": 'D', "value": 'PRESS', "shift": True}, None), ("object.gpencil_modifier_apply", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("report", True)]}), + # ShaderFX panels + ("object.shaderfx_remove", {"type": 'X', "value": 'PRESS'}, {"properties": [("report", True)]}), + ("object.shaderfx_remove", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("report", True)]}), + # Constraint panels + ("constraint.delete", {"type": 'X', "value": 'PRESS'}, {"properties": [("report", True)]}), + ("constraint.delete", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("report", True)]}), ]) return keymap @@ -847,6 +861,14 @@ def km_uv_editor(params): {"properties": [("extend", False)]}), ("uv.select_loop", {"type": params.select_mouse, "value": params.select_mouse_value, "shift": True, "alt": True}, {"properties": [("extend", True)]}), + ("uv.select_edge_ring", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True, "alt": True}, + {"properties": [("extend", False)]}), + ("uv.select_edge_ring", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True, "shift": True, "alt": True}, + {"properties": [("extend", True)]}), + ("uv.shortest_path_pick", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True}, + {"properties": [("use_fill", False)]}), + ("uv.shortest_path_pick", {"type": params.select_mouse, "value": params.select_mouse_value, "ctrl": True, "shift": True}, + {"properties": [("use_fill", True)]}), ("uv.select_split", {"type": 'Y', "value": 'PRESS'}, None), ("uv.select_box", {"type": 'B', "value": 'PRESS'}, {"properties": [("pinned", False)]}), @@ -866,8 +888,11 @@ def km_uv_editor(params): ("uv.select_less", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True}, None), *_template_items_select_actions(params, "uv.select_all"), ("uv.select_pinned", {"type": 'P', "value": 'PRESS', "shift": True}, None), - op_menu("IMAGE_MT_uvs_weldalign", {"type": 'W', "value": 'PRESS', "shift": True}), - ("uv.stitch", {"type": 'V', "value": 'PRESS'}, None), + op_menu("IMAGE_MT_uvs_merge", {"type": 'M', "value": 'PRESS'}), + op_menu("IMAGE_MT_uvs_split", {"type": 'M', "value": 'PRESS', "alt": True}), + op_menu("IMAGE_MT_uvs_align", {"type": 'W', "value": 'PRESS', "shift": True}), + ("uv.stitch", {"type": 'V', "value": 'PRESS', "alt": True}, None), + ("uv.rip_move", {"type": 'V', "value": 'PRESS'}, None), ("uv.pin", {"type": 'P', "value": 'PRESS'}, {"properties": [("clear", False)]}), ("uv.pin", {"type": 'P', "value": 'PRESS', "alt": True}, @@ -1902,9 +1927,8 @@ def km_file_browser_main(params): ("file.execute", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, {"properties": [("need_active", True)]}), ("file.refresh", {"type": 'NUMPAD_PERIOD', "value": 'PRESS'}, None), - ("file.select", {"type": 'LEFTMOUSE', "value": 'CLICK'}, + ("file.select", {"type": 'LEFTMOUSE', "value": 'PRESS'}, {"properties": [("open", False), ("deselect_all", not params.legacy)]}), - ("file.select", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, None), ("file.select", {"type": 'LEFTMOUSE', "value": 'CLICK', "ctrl": True}, {"properties": [("extend", True), ("open", False)]}), ("file.select", {"type": 'LEFTMOUSE', "value": 'CLICK', "shift": True}, @@ -3151,7 +3175,7 @@ def km_grease_pencil_stroke_edit_mode(params): ("gpencil.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None), ("gpencil.paste", {"type": 'V', "value": 'PRESS', "ctrl": True}, None), # Snap - op_menu("GPENCIL_MT_snap", {"type": 'S', "value": 'PRESS', "shift": True}), + op_menu_pie("GPENCIL_MT_snap_pie", {"type": 'S', "value": 'PRESS', "shift": True}), # Show/hide ("gpencil.reveal", {"type": 'H', "value": 'PRESS', "alt": True}, None), ("gpencil.hide", {"type": 'H', "value": 'PRESS'}, @@ -4431,9 +4455,9 @@ def km_mesh(params): {"properties": [("TRANSFORM_OT_edge_slide", [("release_confirm", False), ],)]}), ("mesh.inset", {"type": 'I', "value": 'PRESS'}, None), ("mesh.bevel", {"type": 'B', "value": 'PRESS', "ctrl": True}, - {"properties": [("vertex_only", False)]}), + {"properties": [("affect", 'EDGES')]}), ("mesh.bevel", {"type": 'B', "value": 'PRESS', "shift": True, "ctrl": True}, - {"properties": [("vertex_only", True)]}), + {"properties": [("affect", 'VERTICES')]}), # Selection modes. *_template_items_editmode_mesh_select_mode(params), # Loop Select with alt. Double click in case MMB emulation is on (below). @@ -4508,6 +4532,8 @@ def km_mesh(params): ("mesh.dissolve_mode", {"type": 'DEL', "value": 'PRESS', "ctrl": True}, None), ("mesh.knife_tool", {"type": 'K', "value": 'PRESS'}, {"properties": [("use_occlude_geometry", True), ("only_selected", False)]}), + ("mesh.knife_tool", {"type": 'K', "value": 'PRESS', "shift": True}, + {"properties": [("use_occlude_geometry", False), ("only_selected", True)]}), ("object.vertex_parent_set", {"type": 'P', "value": 'PRESS', "ctrl": True}, None), # Menus. op_menu("VIEW3D_MT_edit_mesh_faces", {"type": 'F', "value": 'PRESS', "ctrl": True}), @@ -4543,8 +4569,6 @@ def km_mesh(params): ("mesh.faces_select_linked_flat", {"type": 'F', "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, None), ("mesh.spin", {"type": 'R', "value": 'PRESS', "alt": True}, None), ("mesh.beautify_fill", {"type": 'F', "value": 'PRESS', "shift": True, "alt": True}, None), - ("mesh.knife_tool", {"type": 'K', "value": 'PRESS', "shift": True}, - {"properties": [("use_occlude_geometry", False), ("only_selected", True)]}), *_template_items_object_subdivision_set(), ]) @@ -5185,7 +5209,7 @@ def km_bevel_modal_map(_params): ("SEGMENTS_DOWN", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "any": True}, None), ("OFFSET_MODE_CHANGE", {"type": 'M', "value": 'PRESS', "any": True}, None), ("CLAMP_OVERLAP_TOGGLE", {"type": 'C', "value": 'PRESS', "any": True}, None), - ("VERTEX_ONLY_TOGGLE", {"type": 'V', "value": 'PRESS', "any": True}, None), + ("AFFECT_CHANGE", {"type": 'V', "value": 'PRESS', "any": True}, None), ("HARDEN_NORMALS_TOGGLE", {"type": 'H', "value": 'PRESS', "any": True}, None), ("MARK_SEAM_TOGGLE", {"type": 'U', "value": 'PRESS', "any": True}, None), ("MARK_SHARP_TOGGLE", {"type": 'K', "value": 'PRESS', "any": True}, None), @@ -5589,6 +5613,17 @@ def km_image_editor_tool_uv_select_lasso(params): ) +def km_image_editor_tool_uv_rip_region(params): + return ( + "Image Editor Tool: Uv, Rip Region", + {"space_type": 'IMAGE_EDITOR', "region_type": 'WINDOW'}, + {"items": [ + ("uv.rip_move", {"type": params.tool_tweak, "value": 'ANY'}, + {"properties": [("TRANSFORM_OT_translate", [("release_confirm", True)])]}), + ]}, + ) + + def km_image_editor_tool_uv_sculpt_stroke(params): return ( "Image Editor Tool: Uv, Sculpt Stroke", @@ -6252,10 +6287,10 @@ def km_3d_view_tool_sculpt_box_mask(params): "3D View Tool: Sculpt, Box Mask", {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, {"items": [ - ("view3d.select_box", {"type": params.tool_tweak, "value": 'ANY'}, - {"properties": [("mode", 'ADD')]}), - ("view3d.select_box", {"type": params.tool_tweak, "value": 'ANY', "ctrl": True}, - {"properties": [("mode", 'SUB')]}), + ("paint.mask_box_gesture", {"type": params.tool_tweak, "value": 'ANY'}, + {"properties": [("value", 1.0)]}), + ("paint.mask_box_gesture", {"type": params.tool_tweak, "value": 'ANY', "ctrl": True}, + {"properties": [("value", 0.0)]}), ]}, ) @@ -6791,6 +6826,7 @@ def generate_keymaps(params=None): km_image_editor_tool_uv_select_box(params), km_image_editor_tool_uv_select_circle(params), km_image_editor_tool_uv_select_lasso(params), + km_image_editor_tool_uv_rip_region(params), km_image_editor_tool_uv_sculpt_stroke(params), km_image_editor_tool_uv_move(params), km_image_editor_tool_uv_rotate(params), 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 f275d892abe..eedf07935c8 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -2316,7 +2316,7 @@ def km_grease_pencil_stroke_edit_mode(params): ("gpencil.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None), ("gpencil.paste", {"type": 'V', "value": 'PRESS', "ctrl": True}, None), # Snap - op_menu("GPENCIL_MT_snap", {"type": 'X', "value": 'PRESS', "shift": True}), + op_menu_pie("GPENCIL_MT_snap_pie", {"type": 'X', "value": 'PRESS', "shift": True}), # Show/hide ("gpencil.reveal", {"type": 'H', "value": 'PRESS', "alt": True}, None), ("gpencil.hide", {"type": 'H', "value": 'PRESS', "ctrl": True}, |