Keymap: improve consistency for paint modes #108791
@ -3723,7 +3723,8 @@ def km_grease_pencil_stroke_edit_mode(params):
|
||||
("gpencil.dissolve", {"type": 'DEL', "value": 'PRESS', "ctrl": True}, None),
|
||||
# Animation menu
|
||||
("gpencil.blank_frame_add", {"type": 'I', "value": 'PRESS', "shift": True}, None),
|
||||
("gpencil.active_frames_delete_all", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
# Delete Animation menu
|
||||
op_menu("GPENCIL_MT_gpencil_draw_delete", {"type": 'I', "value": 'PRESS', "alt": True}),
|
||||
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
|
||||
# Separate
|
||||
("gpencil.stroke_separate", {"type": 'P', "value": 'PRESS'}, None),
|
||||
@ -3832,11 +3833,10 @@ def km_grease_pencil_stroke_paint_mode(params):
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 1.0 / 0.9)]}),
|
||||
# Draw delete menu
|
||||
op_menu("GPENCIL_MT_gpencil_draw_delete", {"type": 'X', "value": 'PRESS'}),
|
||||
# Animation menu
|
||||
("gpencil.blank_frame_add", {"type": 'I', "value": 'PRESS', "shift": True}, None),
|
||||
("gpencil.active_frames_delete_all", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
# Delete Animation menu
|
||||
op_menu("GPENCIL_MT_gpencil_draw_delete", {"type": 'I', "value": 'PRESS', "alt": True}),
|
||||
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
|
||||
# Interpolation
|
||||
op_tool_optional(
|
||||
@ -4032,18 +4032,19 @@ def km_grease_pencil_stroke_sculpt_mode(params):
|
||||
("gpencil.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
|
||||
# Display
|
||||
*_grease_pencil_display(),
|
||||
# Keyframe menu
|
||||
("gpencil.blank_frame_add", {"type": 'I', "value": 'PRESS', "shift": True}, None),
|
||||
("gpencil.active_frames_delete_all", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
|
||||
# Active layer
|
||||
op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}),
|
||||
# Active material
|
||||
op_menu("GPENCIL_MT_material_active", {"type": 'U', "value": 'PRESS'}),
|
||||
# Merge Layer
|
||||
("gpencil.layer_merge", {"type": 'M', "value": 'PRESS', "shift": True, "ctrl": True}, None),
|
||||
# Keyframe menu
|
||||
# Animation menu
|
||||
op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}),
|
||||
# Insert blank keyframe
|
||||
("gpencil.blank_frame_add", {"type": 'I', "value": 'PRESS', "shift": True}, None),
|
||||
# Delete Animation menu
|
||||
op_menu("GPENCIL_MT_gpencil_draw_delete", {"type": 'I', "value": 'PRESS', "alt": True}),
|
||||
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
|
||||
# Context menu
|
||||
*_template_items_context_panel("VIEW3D_PT_gpencil_sculpt_context_menu", params.context_menu_event),
|
||||
# Automasking Pie menu
|
||||
@ -4259,22 +4260,23 @@ def km_grease_pencil_stroke_weight_mode(params):
|
||||
{"properties": [("scalar", 1.0 / 0.9)]}),
|
||||
# Display
|
||||
*_grease_pencil_display(),
|
||||
# Keyframe menu
|
||||
("gpencil.blank_frame_add", {"type": 'I', "value": 'PRESS', "shift": True}, None),
|
||||
("gpencil.active_frames_delete_all", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
|
||||
# Active layer
|
||||
op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}),
|
||||
# Merge Layer
|
||||
("gpencil.layer_merge", {"type": 'M', "value": 'PRESS', "shift": True, "ctrl": True}, None),
|
||||
# Keyframe menu
|
||||
op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}),
|
||||
# Insert blank keyframe
|
||||
("gpencil.blank_frame_add", {"type": 'I', "value": 'PRESS', "shift": True}, None),
|
||||
# Delete Animation menu
|
||||
op_menu("GPENCIL_MT_gpencil_draw_delete", {"type": 'I', "value": 'PRESS', "alt": True}),
|
||||
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
|
||||
# Context menu
|
||||
*_template_items_context_panel("VIEW3D_PT_gpencil_weight_context_menu", params.context_menu_event),
|
||||
# Toggle Add/Subtract for weight draw tool
|
||||
("gpencil.weight_toggle_direction", {"type": 'D', "value": 'PRESS'}, None),
|
||||
# Weight sample
|
||||
("gpencil.weight_sample", {"type": params.action_mouse, "value": 'PRESS', "ctrl": True}, None),
|
||||
("gpencil.weight_sample", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
])
|
||||
|
||||
if params.select_mouse == 'LEFTMOUSE':
|
||||
@ -4378,20 +4380,23 @@ def km_grease_pencil_stroke_vertex_mode(params):
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 1.0 / 0.9)]}),
|
||||
# Color Flip
|
||||
("gpencil.tint_flip", {"type": 'X', "value": 'PRESS'}, None),
|
||||
# Display
|
||||
*_grease_pencil_display(),
|
||||
# Tools
|
||||
op_tool("builtin_brush.Draw", {"type": 'D', "value": 'PRESS'}),
|
||||
# Keyframe menu
|
||||
("gpencil.blank_frame_add", {"type": 'I', "value": 'PRESS', "shift": True}, None),
|
||||
("gpencil.active_frames_delete_all", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
|
||||
# Active layer
|
||||
op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}),
|
||||
# Merge Layer
|
||||
("gpencil.layer_merge", {"type": 'M', "value": 'PRESS', "shift": True, "ctrl": True}, None),
|
||||
# Keyframe menu
|
||||
# Animation menu
|
||||
op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}),
|
||||
# Insert blank keyframe
|
||||
("gpencil.blank_frame_add", {"type": 'I', "value": 'PRESS', "shift": True}, None),
|
||||
# Delete Animation menu
|
||||
op_menu("GPENCIL_MT_gpencil_draw_delete", {"type": 'I', "value": 'PRESS', "alt": True}),
|
||||
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
|
||||
# Vertex Paint context menu
|
||||
op_panel("VIEW3D_PT_gpencil_vertex_context_menu", params.context_menu_event),
|
||||
])
|
||||
@ -5078,9 +5083,11 @@ def km_image_paint(params):
|
||||
{"properties": [("mode", 'NORMAL')]}),
|
||||
("paint.image_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("mode", 'INVERT')]}),
|
||||
("paint.image_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'SMOOTH')]}),
|
||||
("paint.brush_colors_flip", {"type": 'X', "value": 'PRESS'}, None),
|
||||
("paint.grab_clone", {"type": 'RIGHTMOUSE', "value": 'PRESS'}, None),
|
||||
("paint.sample_color", {"type": 'S', "value": 'PRESS'}, None),
|
||||
("paint.sample_color", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
@ -5102,7 +5109,7 @@ def km_image_paint(params):
|
||||
{"properties": [("data_path", 'image_paint_object.data.use_paint_mask')]}),
|
||||
("wm.context_toggle", {"type": 'S', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.image_paint.brush.use_smooth_stroke')]}),
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS'},
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.image_paint.brush.stroke_method')]}),
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_texture_context_menu", params.context_menu_event),
|
||||
])
|
||||
@ -5126,9 +5133,11 @@ def km_vertex_paint(params):
|
||||
{"properties": [("mode", 'NORMAL')]}),
|
||||
("paint.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("mode", 'INVERT')]}),
|
||||
("paint.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'SMOOTH')]}),
|
||||
("paint.brush_colors_flip", {"type": 'X', "value": 'PRESS'}, None),
|
||||
("paint.sample_color", {"type": 'S', "value": 'PRESS'}, None),
|
||||
("paint.vertex_color_set", {"type": 'K', "value": 'PRESS', "shift": True}, None),
|
||||
("paint.sample_color", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
("paint.vertex_color_set", {"type": 'X', "value": 'PRESS', "ctrl": True}, None),
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
@ -5150,7 +5159,7 @@ def km_vertex_paint(params):
|
||||
{"properties": [("data_path", 'vertex_paint_object.data.use_paint_mask')]}),
|
||||
("wm.context_toggle", {"type": 'S', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.vertex_paint.brush.use_smooth_stroke')]}),
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS'},
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.vertex_paint.brush.stroke_method')]}),
|
||||
("paint.face_vert_reveal", {"type": 'H', "value": 'PRESS', "alt": True}, None),
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_vertex_context_menu", params.context_menu_event),
|
||||
@ -5176,15 +5185,19 @@ def km_weight_paint(params):
|
||||
)
|
||||
|
||||
items.extend([
|
||||
# Transform Actions.
|
||||
*_template_items_transform_actions(params),
|
||||
|
||||
("paint.weight_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("paint.weight_sample", {"type": params.action_mouse, "value": 'PRESS', "ctrl": True}, None),
|
||||
("paint.weight_sample_group", {"type": params.action_mouse, "value": 'PRESS', "shift": True}, None),
|
||||
("paint.weight_gradient", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
("paint.weight_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'NORMAL')]}),
|
||||
("paint.weight_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("mode", 'INVERT')]}),
|
||||
("paint.weight_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'SMOOTH')]}),
|
||||
("paint.weight_sample", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
("paint.weight_sample_group", {"type": 'X', "value": 'PRESS', "ctrl": True, "shift": True}, None),
|
||||
("paint.weight_gradient", {"type": 'A', "value": 'PRESS', "shift": True, "alt": True},
|
||||
{"properties": [("type", 'RADIAL')]}),
|
||||
("paint.weight_set", {"type": 'K', "value": 'PRESS', "shift": True}, None),
|
||||
("paint.weight_gradient", {"type": 'A', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("type", 'LINEAR')]}),
|
||||
("paint.weight_set", {"type": 'X', "value": 'PRESS', "ctrl": True}, None),
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
@ -5192,7 +5205,7 @@ def km_weight_paint(params):
|
||||
*_template_paint_radial_control("weight_paint"),
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "ctrl": True},
|
||||
radial_control_properties("weight_paint", 'weight', 'use_unified_weight')),
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS'},
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.vertex_paint.brush.stroke_method')]}),
|
||||
("wm.context_toggle", {"type": 'M', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'weight_paint_object.data.use_paint_mask')]}),
|
||||
@ -5287,9 +5300,9 @@ def km_sculpt(params):
|
||||
]}),
|
||||
# Partial Visibility Show/hide
|
||||
# Match keys from: `_template_items_hide_reveal_actions`, cannot use because arguments aren't compatible.
|
||||
("sculpt.face_set_change_visibility", {"type": 'H', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'TOGGLE')]}),
|
||||
("sculpt.face_set_change_visibility", {"type": 'H', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'TOGGLE')]}),
|
||||
("sculpt.face_set_change_visibility", {"type": 'H', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'HIDE_ACTIVE')]}),
|
||||
("sculpt.reveal_all", {"type": 'H', "value": 'PRESS', "alt": True},
|
||||
{"properties": []}),
|
||||
@ -5300,10 +5313,10 @@ def km_sculpt(params):
|
||||
{"properties": [("mode", 'SHRINK')]}),
|
||||
# Subdivision levels
|
||||
*_template_items_object_subdivision_set(),
|
||||
("object.subdivision_set", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("level", 1), ("relative", True)]}),
|
||||
("object.subdivision_set", {"type": 'PAGE_DOWN', "value": 'PRESS', "repeat": True},
|
||||
("object.subdivision_set", {"type": 'ONE', "value": 'PRESS', "alt": True, "repeat": True},
|
||||
{"properties": [("level", -1), ("relative", True)]}),
|
||||
("object.subdivision_set", {"type": 'TWO', "value": 'PRESS', "alt": True, "repeat": True},
|
||||
{"properties": [("level", 1), ("relative", True)]}),
|
||||
# Mask
|
||||
("paint.mask_flood_fill", {"type": 'M', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("mode", 'VALUE'), ("value", 0.0)]}),
|
||||
@ -5318,12 +5331,14 @@ def km_sculpt(params):
|
||||
("sculpt.dynamic_topology_toggle", {"type": 'D', "value": 'PRESS', "ctrl": True}, None),
|
||||
("sculpt.dyntopo_detail_size_edit", {"type": 'R', "value": 'PRESS'}, None),
|
||||
("sculpt.set_detail_size", {"type": 'D', "value": 'PRESS', "shift": True, "alt": True}, None),
|
||||
("sculpt.detail_flood_fill", {"type": 'R', "value": 'PRESS', "ctrl": True}, None),
|
||||
# Remesh
|
||||
("object.voxel_remesh", {"type": 'R', "value": 'PRESS', "ctrl": True}, None),
|
||||
("object.voxel_size_edit", {"type": 'R', "value": 'PRESS'}, None),
|
||||
("object.quadriflow_remesh", {"type": 'R', "value": 'PRESS', "ctrl": True, "alt": True}, None),
|
||||
# Color
|
||||
("sculpt.sample_color", {"type": 'S', "value": 'PRESS'}, None),
|
||||
("sculpt.sample_color", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
("paint.brush_colors_flip", {"type": 'X', "value": 'PRESS',}, None),
|
||||
# Brush properties
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
@ -5343,6 +5358,9 @@ def km_sculpt(params):
|
||||
{"properties": [("mode", 'SCALE'), ("texmode", 'SECONDARY')]}),
|
||||
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
{"properties": [("mode", 'ROTATION'), ("texmode", 'SECONDARY')]}),
|
||||
# Sculpt Session Pivot Point
|
||||
("sculpt.set_pivot_position", {"type": 'RIGHTMOUSE', 'value': 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'SURFACE')]}),
|
||||
# Tools
|
||||
("paint.brush_select", {"type": 'X', "value": 'PRESS'},
|
||||
{"properties": [("sculpt_tool", 'DRAW')]}),
|
||||
@ -5367,13 +5385,13 @@ def km_sculpt(params):
|
||||
("paint.brush_select", {"type": 'M', "value": 'PRESS'},
|
||||
{"properties": [("sculpt_tool", 'MASK'), ("toggle", True), ("create_missing", True)]}),
|
||||
# Menus
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS'},
|
||||
("wm.context_menu_enum", {"type": 'E', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("data_path", 'tool_settings.sculpt.brush.stroke_method')]}),
|
||||
("wm.context_toggle", {"type": 'S', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("data_path", 'tool_settings.sculpt.brush.use_smooth_stroke')]}),
|
||||
op_menu_pie("VIEW3D_MT_sculpt_mask_edit_pie", {"type": 'A', "value": 'PRESS'}),
|
||||
op_menu_pie("VIEW3D_MT_sculpt_automasking_pie", {"type": 'A', "alt": True, "value": 'PRESS'}),
|
||||
op_menu_pie("VIEW3D_MT_sculpt_face_sets_edit_pie", {"type": 'W', "value": 'PRESS'}),
|
||||
op_menu_pie("VIEW3D_MT_sculpt_face_sets_edit_pie", {"type": 'W', "alt": True, "value": 'PRESS'}),
|
||||
*_template_items_context_panel("VIEW3D_PT_sculpt_context_menu", params.context_menu_event),
|
||||
])
|
||||
|
||||
@ -5888,6 +5906,10 @@ def km_sculpt_curves(params):
|
||||
("curves.set_selection_domain", {"type": 'ONE', "value": 'PRESS'}, {"properties": [("domain", 'POINT')]}),
|
||||
("curves.set_selection_domain", {"type": 'TWO', "value": 'PRESS'}, {"properties": [("domain", 'CURVE')]}),
|
||||
*_template_paint_radial_control("curves_sculpt"),
|
||||
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 0.9)]}),
|
||||
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
|
||||
{"properties": [("scalar", 1.0 / 0.9)]}),
|
||||
*_template_items_select_actions(params, "curves.select_all"),
|
||||
("sculpt_curves.min_distance_edit", {"type": 'R', "value": 'PRESS'}, {}),
|
||||
("sculpt_curves.select_grow", {"type": 'A', "value": 'PRESS', "shift": True}, {}),
|
||||
|
Loading…
Reference in New Issue
Block a user