diff options
Diffstat (limited to 'release/scripts/presets/keyconfig/keymap_data/blender_default.py')
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 133 |
1 files changed, 101 insertions, 32 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 878c3bfb01f..ef4e1a9f77b 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), @@ -695,9 +703,12 @@ def km_user_interface(_params): ("ui.copy_data_path_button", {"type": 'C', "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, {"properties": [("full_path", True)]}), # Keyframes and drivers - ("anim.keyframe_insert_button", {"type": 'I', "value": 'PRESS'}, None), - ("anim.keyframe_delete_button", {"type": 'I', "value": 'PRESS', "alt": True}, None), - ("anim.keyframe_clear_button", {"type": 'I', "value": 'PRESS', "shift": True, "alt": True}, None), + ("anim.keyframe_insert_button", {"type": 'I', "value": 'PRESS'}, + {"properties": [("all", True)]}), + ("anim.keyframe_delete_button", {"type": 'I', "value": 'PRESS', "alt": True}, + {"properties": [("all", True)]}), + ("anim.keyframe_clear_button", {"type": 'I', "value": 'PRESS', "shift": True, "alt": True}, + {"properties": [("all", True)]}), ("anim.driver_button_add", {"type": 'D', "value": 'PRESS', "ctrl": True}, None), ("anim.driver_button_remove", {"type": 'D', "value": 'PRESS', "ctrl": True, "alt": True}, None), ("anim.keyingset_button_add", {"type": 'K', "value": 'PRESS'}, None), @@ -725,6 +736,22 @@ def km_property_editor(_params): {"properties": [("direction", 'PREV'), ], },), ("screen.space_context_cycle", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "ctrl": True}, {"properties": [("direction", 'NEXT'), ], },), + # Modifier panels + ("object.modifier_remove", {"type": 'X', "value": 'PRESS'}, {"properties": [("report", True)]}), + ("object.modifier_remove", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("report", True)]}), + ("object.modifier_copy", {"type": 'D', "value": 'PRESS', "shift": True}, None), + ("object.modifier_apply", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("report", True)]}), + # Grease pencil modifier panels + ("object.gpencil_modifier_remove", {"type": 'X', "value": 'PRESS'}, {"properties": [("report", True)]}), + ("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 @@ -834,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)]}), @@ -853,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}, @@ -1893,7 +1931,7 @@ def km_file_browser_main(params): {"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)]}), + {"properties": [("extend", True), ("open", False)]}), ("file.select", {"type": 'LEFTMOUSE', "value": 'CLICK', "shift": True}, {"properties": [("extend", True), ("fill", True), ("open", False)]}), ("file.select_walk", {"type": 'UP_ARROW', "value": 'PRESS'}, @@ -2391,7 +2429,8 @@ def km_sequencercommon(_params): ), ("wm.context_toggle", {"type": 'O', "value": 'PRESS', "shift": True}, {"properties": [("data_path", 'scene.sequence_editor.show_overlay')]}), - ("sequencer.view_toggle", {"type": 'TAB', "value": 'PRESS', "ctrl": True}, None), + ("wm.context_toggle_enum", {"type": 'TAB', "value": 'PRESS', "ctrl": True}, + {"properties": [("data_path", 'space_data.view_type'), ("value_1", 'SEQUENCER'), ("value_2", 'PREVIEW')]}), ]) if _params.select_mouse == 'LEFTMOUSE' and not _params.legacy: @@ -2463,7 +2502,7 @@ def km_sequencer(params): {"properties": [("all", False)]}), ("sequencer.gap_remove", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True}, {"properties": [("all", True)]}), - ("sequencer.gap_insert", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True}, None), + ("sequencer.gap_insert", {"type": 'EQUAL', "value": 'PRESS', "shift": True}, None), ("sequencer.snap", {"type": 'S', "value": 'PRESS', "shift": True}, None), ("sequencer.swap_inputs", {"type": 'S', "value": 'PRESS', "alt": True}, None), *( @@ -2519,14 +2558,6 @@ def km_sequencer(params): {"properties": [("side", 'LEFT')]}), ("sequencer.select_side_of_frame", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, {"properties": [("side", 'RIGHT')]}), - ("sequencer.select_side_of_frame", {"type": 'EQUAL', "value": 'PRESS'}, - {"properties": [("side", 'OVERLAP')]}), - ("sequencer.select_side_of_frame", {"type": 'LEFT_BRACKET', "value": 'PRESS', "shift": True}, - {"properties": [("side", 'LEFT'), ("extend", True)]}), - ("sequencer.select_side_of_frame", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "shift": True}, - {"properties": [("side", 'RIGHT'), ("extend", True)]}), - ("sequencer.select_side_of_frame", {"type": 'EQUAL', "value": 'PRESS', "shift": True}, - {"properties": [("side", 'OVERLAP'), ("extend", True)]}), *_template_items_context_menu("SEQUENCER_MT_context_menu", params.context_menu_event), ]) @@ -3145,7 +3176,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'}, @@ -4347,6 +4378,8 @@ def km_sculpt(params): ("object.voxel_remesh", {"type": 'R', "value": 'PRESS', "ctrl": True}, None), ("object.voxel_size_edit", {"type": 'R', "value": 'PRESS', "shift": True}, None), ("object.quadriflow_remesh", {"type": 'R', "value": 'PRESS', "ctrl": True, "alt": True}, None), + # Color + ("sculpt.sample_color", {"type": 'S', "value": 'PRESS'}, None), # Brush properties ("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, {"properties": [("scalar", 0.9)]}), @@ -4369,7 +4402,7 @@ def km_sculpt(params): # Tools ("paint.brush_select", {"type": 'X', "value": 'PRESS'}, {"properties": [("sculpt_tool", 'DRAW')]}), - ("paint.brush_select", {"type": 'S', "value": 'PRESS'}, + ("paint.brush_select", {"type": 'S', "value": 'PRESS', "shift": True}, {"properties": [("sculpt_tool", 'SMOOTH')]}), ("paint.brush_select", {"type": 'P', "value": 'PRESS'}, {"properties": [("sculpt_tool", 'PINCH')]}), @@ -4423,9 +4456,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). @@ -5177,13 +5210,13 @@ 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), ("OUTER_MITER_CHANGE", {"type": 'O', "value": 'PRESS', "any": True}, None), ("INNER_MITER_CHANGE", {"type": 'I', "value": 'PRESS', "any": True}, None), - ("CUSTOM_PROFILE_TOGGLE", {"type": 'Z', "value": 'PRESS', "any": True}, None), + ("PROFILE_TYPE_CHANGE", {"type": 'Z', "value": 'PRESS', "any": True}, None), ("VERTEX_MESH_CHANGE", {"type": 'N', "value": 'PRESS', "any": True}, None), ]) @@ -5581,6 +5614,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", @@ -5913,12 +5957,12 @@ def km_3d_view_tool_edit_mesh_extrude_region(params): ]}, ) -def km_3d_view_tool_edit_mesh_extrude_dissolve_and_intersect(params): +def km_3d_view_tool_edit_mesh_extrude_manifold(params): return ( - "3D View Tool: Edit Mesh, Extrude Dissolve and Intersect", + "3D View Tool: Edit Mesh, Extrude Manifold", {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, {"items": [ - ("mesh.extrude_region_dissolve_move_intersect", {"type": params.tool_tweak, "value": 'ANY'}, + ("mesh.extrude_manifold", {"type": params.tool_tweak, "value": 'ANY'}, {"properties": [ ("MESH_OT_extrude_region", [("use_dissolve_ortho_edges", True)]), ("TRANSFORM_OT_translate", [ @@ -6214,9 +6258,9 @@ def km_3d_view_tool_edit_curve_extrude(params): ) -def km_3d_view_tool_edit_curve_extrude_cursor(params): +def km_3d_view_tool_edit_curve_extrude_to_cursor(params): return ( - "3D View Tool: Edit Curve, Extrude Cursor", + "3D View Tool: Edit Curve, Extrude to Cursor", {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, {"items": [ ("curve.vertex_add", {"type": params.tool_mouse, "value": 'PRESS'}, None), @@ -6284,6 +6328,28 @@ def km_3d_view_tool_sculpt_cloth_filter(params): ]}, ) +def km_3d_view_tool_sculpt_color_filter(params): + return ( + "3D View Tool: Sculpt, Color Filter", + {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, + {"items": [ + ("sculpt.color_filter", {"type": params.tool_tweak, "value": 'ANY'}, + None) + ]}, + ) + +def km_3d_view_tool_sculpt_mask_by_color(params): + return ( + "3D View Tool: Sculpt, Mask By Color", + {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, + {"items": [ + ("sculpt.mask_by_color", {"type": params.tool_mouse, "value": 'ANY'}, + None), + ("sculpt.mask_by_color", {"type": params.tool_tweak, "value": 'ANY'}, + None), + ]}, + ) + def km_3d_view_tool_paint_weight_sample_weight(params): return ( "3D View Tool: Paint Weight, Sample Weight", @@ -6761,6 +6827,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), @@ -6791,7 +6858,7 @@ def generate_keymaps(params=None): km_3d_view_tool_edit_armature_extrude(params), km_3d_view_tool_edit_armature_extrude_to_cursor(params), km_3d_view_tool_edit_mesh_extrude_region(params), - km_3d_view_tool_edit_mesh_extrude_dissolve_and_intersect(params), + km_3d_view_tool_edit_mesh_extrude_manifold(params), km_3d_view_tool_edit_mesh_extrude_along_normals(params), km_3d_view_tool_edit_mesh_extrude_individual(params), km_3d_view_tool_edit_mesh_extrude_to_cursor(params), @@ -6818,12 +6885,14 @@ def generate_keymaps(params=None): km_3d_view_tool_edit_curve_tilt(params), km_3d_view_tool_edit_curve_randomize(params), km_3d_view_tool_edit_curve_extrude(params), - km_3d_view_tool_edit_curve_extrude_cursor(params), + km_3d_view_tool_edit_curve_extrude_to_cursor(params), km_3d_view_tool_sculpt_box_hide(params), km_3d_view_tool_sculpt_box_mask(params), km_3d_view_tool_sculpt_lasso_mask(params), km_3d_view_tool_sculpt_mesh_filter(params), km_3d_view_tool_sculpt_cloth_filter(params), + km_3d_view_tool_sculpt_color_filter(params), + km_3d_view_tool_sculpt_mask_by_color(params), km_3d_view_tool_paint_weight_sample_weight(params), km_3d_view_tool_paint_weight_sample_vertex_group(params), km_3d_view_tool_paint_weight_gradient(params), |