WIP: Keymap: Draw, Sculpt & Paint Mode Consistency #110535
|
@ -3715,13 +3715,12 @@ def km_grease_pencil_stroke_edit_mode(params):
|
|||
{"properties": [("TRANSFORM_OT_translate", [("alt_navigation", params.use_alt_navigation)])]}),
|
||||
(op_tool_cycle, "builtin.extrude"), params),
|
||||
# Delete
|
||||
op_menu("VIEW3D_MT_edit_gpencil_delete", {"type": 'X', "value": 'PRESS'}),
|
||||
op_menu("VIEW3D_MT_edit_gpencil_delete", {"type": 'DEL', "value": 'PRESS'}),
|
||||
("gpencil.dissolve", {"type": 'X', "value": 'PRESS', "ctrl": True}, None),
|
||||
("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),
|
||||
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),
|
||||
|
@ -3830,11 +3829,9 @@ 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),
|
||||
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(
|
||||
|
@ -4008,7 +4005,7 @@ def km_grease_pencil_stroke_sculpt_mode(params):
|
|||
*_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),
|
||||
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),
|
||||
# Active layer
|
||||
op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}),
|
||||
|
@ -4235,7 +4232,7 @@ def km_grease_pencil_stroke_weight_mode(params):
|
|||
*_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),
|
||||
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),
|
||||
# Active layer
|
||||
op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}),
|
||||
|
@ -4248,7 +4245,7 @@ def km_grease_pencil_stroke_weight_mode(params):
|
|||
# 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':
|
||||
|
@ -4352,11 +4349,11 @@ 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)]}),
|
||||
("gpencil.tint_flip", {"type": 'X', "value": 'PRESS'}, 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'}),
|
||||
|
@ -5010,9 +5007,11 @@ def km_image_paint(params):
|
|||
("paint.image_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("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},
|
||||
|
@ -5057,9 +5056,11 @@ def km_vertex_paint(params):
|
|||
("paint.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("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},
|
||||
|
@ -5081,7 +5082,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),
|
||||
|
@ -5112,11 +5113,17 @@ def km_weight_paint(params):
|
|||
*_template_items_transform_actions(params, use_mirror=True),
|
||||
|
||||
("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', "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', "shift": True, "ctrl": True}, None),
|
||||
("paint.weight_gradient", {"type": 'A', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("type", 'LINEAR')]}),
|
||||
("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_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},
|
||||
|
@ -5124,7 +5131,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')]}),
|
||||
|
@ -5261,9 +5268,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": []}),
|
||||
|
@ -5274,10 +5281,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)]}),
|
||||
|
@ -5288,22 +5295,31 @@ def km_sculpt(params):
|
|||
("paint.mask_lasso_gesture", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, None),
|
||||
# Dynamic topology
|
||||
("sculpt.dyntopo_detail_size_edit", {"type": 'R', "value": 'PRESS'}, 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),
|
||||
# Color
|
||||
("sculpt.sample_color", {"type": 'S', "value": 'PRESS'}, None),
|
||||
("paint.brush_colors_flip", {"type": 'X', "value": 'PRESS'}, None),
|
||||
("sculpt.sample_color", {"type": 'X', "value": 'PRESS', "shift": True}, None),
|
||||
# Brush properties
|
||||
("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_paint_radial_control("sculpt", rotation=True),
|
||||
|
||||
("sculpt.set_pivot_position", {"type": 'RIGHTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'SURFACE')]}),
|
||||
|
||||
# Stencil
|
||||
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS'},
|
||||
{"properties": [("mode", 'TRANSLATION')]}),
|
||||
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("mode", 'SCALE')]}),
|
||||
|
||||
# TODO: map this to another key?
|
||||
# ("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS', "shift": True},
|
||||
# {"properties": [("mode", 'SCALE')]}),
|
||||
|
||||
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("mode", 'ROTATION')]}),
|
||||
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS', "alt": True},
|
||||
|
@ -5313,13 +5329,13 @@ def km_sculpt(params):
|
|||
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS', "ctrl": True, "alt": True},
|
||||
{"properties": [("mode", 'ROTATION'), ("texmode", 'SECONDARY')]}),
|
||||
# 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', "value": 'PRESS', "alt": True}),
|
||||
*_template_items_context_panel("VIEW3D_PT_sculpt_context_menu", params.context_menu_event),
|
||||
])
|
||||
|
||||
|
@ -5349,6 +5365,11 @@ def km_sculpt_curves(params):
|
|||
*_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}, {}),
|
||||
# TODO: validate this works as expected.
|
||||
("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)]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
|
|
Loading…
Reference in New Issue