Grease Pencil: Bring back eraser and fill tools (now using brush assets)

Followup to a38c96b92c, which implemented the necessary sculpt, paint and
tool-system changes. All this commit has to do is bring back the tool
definitions.

The brush assets project merged all brush based tools into a single, "Brush"
tool. After feedback, we want to bring back some of the previous brush based
tools. For example in grease pencil draw mode, not having an eraser or fill tool
available, and having to go through all the brush assets instead made the
workflow more cumbersome, and features less discoverable (an eraser tool in the
toolbar is quite easy to find, a brush deep down in the asset library may not
be).

Pull Request: https://projects.blender.org/blender/blender/pulls/125449/files
This commit is contained in:
Julian Eisel
2024-09-20 18:13:19 +02:00
parent a38c96b92c
commit a79f9100a6

View File

@@ -1963,6 +1963,26 @@ class _defs_weight_paint:
class _defs_grease_pencil_paint:
@ToolDef.from_fn
def fill():
return dict(
idname="builtin_brush.Fill",
label="Fill",
icon="brush.gpencil_draw.fill",
brush_type='FILL',
options={'USE_BRUSHES'},
)
@ToolDef.from_fn
def erase():
return dict(
idname="builtin_brush.Erase",
label="Erase",
icon="brush.gpencil_draw.erase",
brush_type='ERASE',
options={'USE_BRUSHES'},
)
@ToolDef.from_fn
def trim():
def draw_settings(context, layout, _tool):
@@ -3640,6 +3660,9 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
_defs_view3d_generic.cursor,
None,
_brush_tool,
_defs_grease_pencil_paint.fill,
_defs_grease_pencil_paint.erase,
None,
_defs_grease_pencil_paint.trim,
None,
_defs_grease_pencil_paint.eyedropper,