diff options
Diffstat (limited to 'release/scripts/presets')
5 files changed, 809 insertions, 57 deletions
diff --git a/release/scripts/presets/gpencil_material/fill_only.py b/release/scripts/presets/gpencil_material/fill_only.py index c60811d25bc..57d5dc3b860 100644 --- a/release/scripts/presets/gpencil_material/fill_only.py +++ b/release/scripts/presets/gpencil_material/fill_only.py @@ -7,8 +7,6 @@ gpcolor.stroke_style = 'SOLID' gpcolor.color = (0.0, 0.0, 0.0, 0.0) gpcolor.stroke_image = None gpcolor.pixel_size = 100.0 -gpcolor.use_stroke_pattern = False -gpcolor.use_stroke_texture_mix = False gpcolor.mix_stroke_factor = 0.0 gpcolor.alignment_mode = 'PATH' gpcolor.fill_style = 'SOLID' @@ -18,18 +16,11 @@ gpcolor.gradient_type = 'LINEAR' gpcolor.mix_color = (1.0, 1.0, 1.0, 0.2) gpcolor.mix_factor = 0.0 gpcolor.flip = False -gpcolor.pattern_shift = (0.0, 0.0) -gpcolor.pattern_scale = (1.0, 1.0) -gpcolor.pattern_radius = 0.5 -gpcolor.pattern_angle = 0.0 -gpcolor.pattern_gridsize = 0.1 -gpcolor.use_fill_pattern = False gpcolor.texture_offset = (0.0, 0.0) gpcolor.texture_scale = (1.0, 1.0) gpcolor.texture_angle = 0.0 gpcolor.texture_opacity = 1.0 gpcolor.texture_clamp = False -gpcolor.use_fill_texture_mix = False gpcolor.mix_factor = 0.0 gpcolor.show_stroke = False gpcolor.show_fill = True diff --git a/release/scripts/presets/gpencil_material/stroke_and_fill.py b/release/scripts/presets/gpencil_material/stroke_and_fill.py index ee18eeb0114..eff728a7857 100644 --- a/release/scripts/presets/gpencil_material/stroke_and_fill.py +++ b/release/scripts/presets/gpencil_material/stroke_and_fill.py @@ -7,8 +7,6 @@ gpcolor.stroke_style = 'SOLID' gpcolor.color = (0.0, 0.0, 0.0, 1.0) gpcolor.stroke_image = None gpcolor.pixel_size = 100.0 -gpcolor.use_stroke_pattern = False -gpcolor.use_stroke_texture_mix = False gpcolor.mix_stroke_factor = 0.0 gpcolor.alignment_mode = 'PATH' gpcolor.fill_style = 'SOLID' @@ -18,18 +16,11 @@ gpcolor.gradient_type = 'LINEAR' gpcolor.mix_color = (1.0, 1.0, 1.0, 0.2) gpcolor.mix_factor = 0.0 gpcolor.flip = False -gpcolor.pattern_shift = (0.0, 0.0) -gpcolor.pattern_scale = (1.0, 1.0) -gpcolor.pattern_radius = 0.5 -gpcolor.pattern_angle = 0.0 -gpcolor.pattern_gridsize = 0.1 -gpcolor.use_fill_pattern = False gpcolor.texture_offset = (0.0, 0.0) gpcolor.texture_scale = (1.0, 1.0) gpcolor.texture_angle = 0.0 gpcolor.texture_opacity = 1.0 gpcolor.texture_clamp = False -gpcolor.use_fill_texture_mix = False gpcolor.mix_factor = 0.0 gpcolor.show_stroke = True gpcolor.show_fill = True diff --git a/release/scripts/presets/gpencil_material/stroke_only.py b/release/scripts/presets/gpencil_material/stroke_only.py index 3ca05c6a073..1724a62bffc 100644 --- a/release/scripts/presets/gpencil_material/stroke_only.py +++ b/release/scripts/presets/gpencil_material/stroke_only.py @@ -7,8 +7,6 @@ gpcolor.stroke_style = 'SOLID' gpcolor.color = (0.0, 0.0, 0.0, 1.0) gpcolor.stroke_image = None gpcolor.pixel_size = 100.0 -gpcolor.use_stroke_pattern = False -gpcolor.use_stroke_texture_mix = False gpcolor.mix_stroke_factor = 0.0 gpcolor.alignment_mode = 'PATH' gpcolor.fill_style = 'SOLID' @@ -18,18 +16,11 @@ gpcolor.gradient_type = 'LINEAR' gpcolor.mix_color = (1.0, 1.0, 1.0, 0.2) gpcolor.mix_factor = 0.0 gpcolor.flip = False -gpcolor.pattern_shift = (0.0, 0.0) -gpcolor.pattern_scale = (1.0, 1.0) -gpcolor.pattern_radius = 0.5 -gpcolor.pattern_angle = 0.0 -gpcolor.pattern_gridsize = 0.1 -gpcolor.use_fill_pattern = False gpcolor.texture_offset = (0.0, 0.0) gpcolor.texture_scale = (1.0, 1.0) gpcolor.texture_angle = 0.0 gpcolor.texture_opacity = 1.0 gpcolor.texture_clamp = False -gpcolor.use_fill_texture_mix = False gpcolor.mix_factor = 0.0 gpcolor.show_stroke = True gpcolor.show_fill = False diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 5aff2a75e03..bf1ff0604ad 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -3168,6 +3168,10 @@ def km_grease_pencil_stroke_edit_mode(params): {"properties": [("mode", 1)]}), ("gpencil.selectmode_toggle", {"type": 'THREE', "value": 'PRESS'}, {"properties": [("mode", 2)]}), + # Active layer + op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}), + # Keyframe menu + op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}), # Context menu *_template_items_context_menu("VIEW3D_MT_gpencil_edit_context_menu", params.context_menu_event), ]) @@ -3211,6 +3215,10 @@ def km_grease_pencil_stroke_paint_mode(params): {"properties": [("unselected", False)]}), ("gpencil.hide", {"type": 'H', "value": 'PRESS', "shift": True}, {"properties": [("unselected", True)]}), + # Active layer + op_menu("GPENCIL_MT_layer_active", {"type": 'Y', "value": 'PRESS'}), + # Keyframe menu + op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}), # Draw context menu *_template_items_context_panel("VIEW3D_PT_gpencil_draw_context_menu", params.context_menu_event), ]) @@ -3322,6 +3330,25 @@ def km_grease_pencil_stroke_paint_fill(params): return keymap +def km_grease_pencil_stroke_paint_tint(params): + items = [] + keymap = ( + "Grease Pencil Stroke Paint (Tint)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + def km_grease_pencil_stroke_sculpt_mode(params): items = [] keymap = ( @@ -3336,14 +3363,22 @@ def km_grease_pencil_stroke_sculpt_mode(params): # Brush strength ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, - {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt.brush.strength')]}), + {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt_paint.brush.strength')]}), # Brush size ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, - {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt.brush.size')]}), + {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt_paint.brush.size')]}), # Copy ("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'}), + # Keyframe menu + op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}), # Context menu *_template_items_context_panel("VIEW3D_PT_gpencil_sculpt_context_menu", params.context_menu_event), ]) @@ -3351,28 +3386,385 @@ def km_grease_pencil_stroke_sculpt_mode(params): return keymap -def km_grease_pencil_stroke_weight_mode(_params): +def km_grease_pencil_stroke_sculpt_smooth(_params): items = [] keymap = ( - "Grease Pencil Stroke Weight Mode", + "Grease Pencil Stroke Sculpt (Smooth)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_thickness(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Thickness)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_strength(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Strength)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_grab(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Grab)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_push(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Push)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_twist(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Twist)", {"space_type": 'EMPTY', "region_type": 'WINDOW'}, {"items": items}, ) items.extend([ - # Painting + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, {"properties": [("wait_for_input", False)]}), ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_pinch(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Pinch)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_randomize(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Randomize)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_clone(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Clone)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_weight_mode(params): + items = [] + keymap = ( + "Grease Pencil Stroke Weight Mode", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ # Brush strength ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, - {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt.weight_brush.strength')]}), - # Brush sze + {"properties": [("data_path_primary", 'tool_settings.gpencil_weight_paint.brush.strength')]}), + # Brush size ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, - {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt.weight_brush.size')]}), + {"properties": [("data_path_primary", 'tool_settings.gpencil_weight_paint.brush.size')]}), # 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'}), + # Keyframe menu + op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}), + # Context menu + *_template_items_context_panel("VIEW3D_PT_gpencil_weight_context_menu", params.context_menu_event), + ]) + + return keymap + + +def km_grease_pencil_stroke_weight_draw(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Weight (Draw)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Draw + ("gpencil.weight_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_vertex_mode(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex Mode", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Selection + *_grease_pencil_selection(params), + # Brush strength + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), + # Display + *_grease_pencil_display(), + # Tools + op_tool("builtin_brush.Draw", {"type": 'D', "value": 'PRESS'}), + op_tool("builtin_brush.Blur", {"type": 'F', "value": 'PRESS'}), + op_tool("builtin_brush.Average", {"type": 'E', "value": 'PRESS'}), + op_tool("builtin.brush.Smear", {"type": 'K', "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'}), + # Keyframe menu + op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}), + # Vertex Paint context menu + op_panel("VIEW3D_PT_gpencil_vertex_context_menu", params.context_menu_event), + ]) + + return keymap + + +def km_grease_pencil_stroke_vertex_draw(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex (Draw)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + # Brush strength + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_vertex_blur(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex (Blur)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + # Brush strength + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_vertex_average(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex (Average)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + # Brush strength + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_vertex_smear(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex (Smear)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + # Brush strength + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_vertex_replace(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex (Replace)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), ]) return keymap @@ -6053,18 +6445,13 @@ def km_3d_view_tool_edit_gpencil_to_sphere(params): ) -# Also used for weight paint. -def km_3d_view_tool_sculpt_gpencil_paint(_params): +def km_3d_view_tool_edit_gpencil_transform_fill(params): return ( - "3D View Tool: Sculpt Gpencil, Paint", + "3D View Tool: Edit Gpencil, Transform Fill", {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, {"items": [ - ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, - {"properties": [("wait_for_input", False)]}), - ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, - {"properties": [("wait_for_input", False)]}), - ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, - {"properties": [("wait_for_input", False)]}), + ("gpencil.transform_fill", {"type": params.tool_tweak, "value": 'ANY'}, + {"properties": [("release_confirm", True)]}), ]}, ) @@ -6201,8 +6588,25 @@ def generate_keymaps(params=None): km_grease_pencil_stroke_paint_draw_brush(params), km_grease_pencil_stroke_paint_erase(params), km_grease_pencil_stroke_paint_fill(params), + km_grease_pencil_stroke_paint_tint(params), km_grease_pencil_stroke_sculpt_mode(params), + km_grease_pencil_stroke_sculpt_smooth(params), + km_grease_pencil_stroke_sculpt_thickness(params), + km_grease_pencil_stroke_sculpt_strength(params), + km_grease_pencil_stroke_sculpt_grab(params), + km_grease_pencil_stroke_sculpt_push(params), + km_grease_pencil_stroke_sculpt_twist(params), + km_grease_pencil_stroke_sculpt_pinch(params), + km_grease_pencil_stroke_sculpt_randomize(params), + km_grease_pencil_stroke_sculpt_clone(params), km_grease_pencil_stroke_weight_mode(params), + km_grease_pencil_stroke_weight_draw(params), + km_grease_pencil_stroke_vertex_mode(params), + km_grease_pencil_stroke_vertex_draw(params), + km_grease_pencil_stroke_vertex_blur(params), + km_grease_pencil_stroke_vertex_average(params), + km_grease_pencil_stroke_vertex_smear(params), + km_grease_pencil_stroke_vertex_replace(params), km_face_mask(params), km_weight_paint_vertex_selection(params), km_pose(params), @@ -6345,7 +6749,7 @@ def generate_keymaps(params=None): km_3d_view_tool_edit_gpencil_bend(params), km_3d_view_tool_edit_gpencil_shear(params), km_3d_view_tool_edit_gpencil_to_sphere(params), - km_3d_view_tool_sculpt_gpencil_paint(params), + km_3d_view_tool_edit_gpencil_transform_fill(params), km_3d_view_tool_sculpt_gpencil_select(params), km_3d_view_tool_sculpt_gpencil_select_box(params), km_3d_view_tool_sculpt_gpencil_select_circle(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 b0b7c542df3..18acbb54b34 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -2364,6 +2364,10 @@ def km_grease_pencil_stroke_paint_mode(params): 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'}), + # Active layer + op_menu("GPENCIL_MT_layer_active", {"type": 'M', "value": 'PRESS'}), + # Keyframe menu + op_menu("VIEW3D_MT_gpencil_animation", {"type": 'I', "value": 'PRESS'}), ]) return keymap @@ -2470,6 +2474,25 @@ def km_grease_pencil_stroke_paint_fill(params): return keymap +def km_grease_pencil_stroke_paint_tint(params): + items = [] + keymap = ( + "Grease Pencil Stroke Paint (Tint)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + def km_grease_pencil_stroke_sculpt_mode(params): items = [] keymap = ( @@ -2481,30 +2504,246 @@ def km_grease_pencil_stroke_sculpt_mode(params): items.extend([ # Selection *_grease_pencil_selection(params), - # Painting + + # Brush strength + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt_paint.brush.strength')]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt_paint.brush.size')]}), + # Copy + ("gpencil.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None), + # Display + *_grease_pencil_display(), + # Context menu + op_panel("VIEW3D_PT_gpencil_sculpt_context_menu", params.context_menu_event), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_smooth(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Smooth)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, {"properties": [("wait_for_input", False)]}), ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, {"properties": [("wait_for_input", False)]}), ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_thickness(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Thickness)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_strength(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Strength)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_grab(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Grab)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_push(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Push)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_twist(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Twist)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_pinch(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Pinch)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_randomize(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Randomize)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_sculpt_clone(_params): + items = [] + keymap = ( + "Grease Pencil Stroke Sculpt (Clone)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_weight_mode(params): + items = [] + keymap = ( + "Grease Pencil Stroke Weight Mode", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ # Brush strength - ("wm.radial_control", {"type": 'U', "value": 'PRESS'}, - {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt.brush.strength')]}), + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_weight_paint.brush.strength')]}), # Brush size ("wm.radial_control", {"type": 'S', "value": 'PRESS'}, {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt.brush.size')]}), # Context menu - *_template_items_context_panel("VIEW3D_PT_gpencil_sculpt_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), + *_template_items_context_panel("VIEW3D_PT_gpencil_weight_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), ]) return keymap -def km_grease_pencil_stroke_weight_mode(params): +def km_grease_pencil_stroke_weight_draw(_params): items = [] keymap = ( - "Grease Pencil Stroke Weight Mode", + "Grease Pencil Stroke Weight (Draw)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + ("gpencil.weight_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_vertex_mode(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex Mode", {"space_type": 'EMPTY', "region_type": 'WINDOW'}, {"items": items}, ) @@ -2512,22 +2751,141 @@ def km_grease_pencil_stroke_weight_mode(params): items.extend([ # Selection *_grease_pencil_selection(params), - # Painting - ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + # Brush strength + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), + # Display + *_grease_pencil_display(), + # Tools + op_tool("builtin_brush.Draw", {"type": 'D', "value": 'PRESS'}), + op_tool("builtin_brush.Blur", {"type": 'F', "value": 'PRESS'}), + op_tool("builtin_brush.Average", {"type": 'E', "value": 'PRESS'}), + op_tool("builtin.brush.Smear", {"type": 'K', "value": 'PRESS'}), + op_tool("builtin.brush.Replace", {"type": 'R', "value": 'PRESS'}), + # Vertex Paint context menu + op_panel("VIEW3D_PT_gpencil_vertex_context_menu", params.context_menu_event), + ]) + + return keymap + +def km_grease_pencil_stroke_vertex_draw(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex (Draw)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, {"properties": [("wait_for_input", False)]}), - ("gpencil.sculpt_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + # Brush strength + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_vertex_blur(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex (Blur)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + # Brush strength + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_vertex_average(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex (Average)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("wait_for_input", False)]}), + # Brush strength + ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), + ]) + + return keymap + + +def km_grease_pencil_stroke_vertex_smear(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex (Smear)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, {"properties": [("wait_for_input", False)]}), # Brush strength ("wm.radial_control", {"type": 'U', "value": 'PRESS', "shift": True}, - {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt.weight_brush.strength')]}), - # Brush size. + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}), + # Brush size ("wm.radial_control", {"type": 'S', "value": 'PRESS'}, - {"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt.weight_brush.size')]}), + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), ]) return keymap +def km_grease_pencil_stroke_vertex_replace(params): + items = [] + keymap = ( + "Grease Pencil Stroke Vertex (Replace)", + {"space_type": 'EMPTY', "region_type": 'WINDOW'}, + {"items": items}, + ) + + items.extend([ + # Tint + ("gpencil.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"properties": [("wait_for_input", False)]}), + # Brush size + ("wm.radial_control", {"type": 'F', "value": 'PRESS'}, + {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}), + ]) + + return keymap + def km_face_mask(params): items = [] keymap = ( @@ -3679,8 +4037,25 @@ def generate_keymaps_impl(params=None): km_grease_pencil_stroke_paint_draw_brush(params), km_grease_pencil_stroke_paint_erase(params), km_grease_pencil_stroke_paint_fill(params), + km_grease_pencil_stroke_paint_tint(params), km_grease_pencil_stroke_sculpt_mode(params), + km_grease_pencil_stroke_sculpt_smooth(params), + km_grease_pencil_stroke_sculpt_thickness(params), + km_grease_pencil_stroke_sculpt_strength(params), + km_grease_pencil_stroke_sculpt_grab(params), + km_grease_pencil_stroke_sculpt_push(params), + km_grease_pencil_stroke_sculpt_twist(params), + km_grease_pencil_stroke_sculpt_pinch(params), + km_grease_pencil_stroke_sculpt_randomize(params), + km_grease_pencil_stroke_sculpt_clone(params), km_grease_pencil_stroke_weight_mode(params), + km_grease_pencil_stroke_weight_draw(params), + km_grease_pencil_stroke_vertex_mode(params), + km_grease_pencil_stroke_vertex_draw(params), + km_grease_pencil_stroke_vertex_blur(params), + km_grease_pencil_stroke_vertex_average(params), + km_grease_pencil_stroke_vertex_smear(params), + km_grease_pencil_stroke_vertex_replace(params), km_face_mask(params), km_weight_paint_vertex_selection(params), km_pose(params), |