WIP: Brush assets project #106303

Draft
Julian Eisel wants to merge 370 commits from brush-assets-project into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 20 additions and 52 deletions
Showing only changes of commit ec3e4fc7d9 - Show all commits

View File

@ -1837,55 +1837,25 @@ class _defs_weight_paint:
class _defs_paint_grease_pencil: class _defs_paint_grease_pencil:
# FIXME: Replace brush tools with code below once they are all implemented: @staticmethod
# def generate_from_brushes(context):
# @staticmethod # Though `data_block` is conceptually unnecessary with a single brush tool,
# def generate_from_brushes(context): # it's still used because many areas assume that brush tools have it set #bToolRef.
# # Though `data_block` is conceptually unnecessary with a single brush tool, tool = None
# # it's still used because many areas assume that brush tools have it set #bToolRef. if context:
# tool = None brush = context.tool_settings.gpencil_paint.brush
# if context: if brush:
# brush = context.tool_settings.gpencil_paint.brush tool = brush.gpencil_tool
# if brush: return [
# tool = brush.gpencil_tool ToolDef.from_dict(
# return [ dict(
# ToolDef.from_dict( idname="builtin.brush",
# dict( label="Brush",
# idname="builtin.brush", icon="brush.sculpt.paint",
# label="Brush", data_block=tool
# icon="brush.sculpt.paint", )
# data_block=tool )
# ) ]
# )
# ]
@ToolDef.from_fn
def draw():
return dict(
idname="builtin_brush.Draw",
label="Draw",
icon="brush.gpencil_draw.draw",
data_block='DRAW',
)
@ToolDef.from_fn
def erase():
return dict(
idname="builtin_brush.Erase",
label="Erase",
icon="brush.gpencil_draw.erase",
data_block='ERASE',
)
@ToolDef.from_fn
def tint():
return dict(
idname="builtin_brush.Tint",
label="Tint",
icon="brush.gpencil_draw.tint",
data_block='TINT',
)
class _defs_image_generic: class _defs_image_generic:
@ -3329,9 +3299,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
'PAINT_GREASE_PENCIL': [ 'PAINT_GREASE_PENCIL': [
_defs_view3d_generic.cursor, _defs_view3d_generic.cursor,
None, None,
_defs_paint_grease_pencil.draw, _defs_paint_grease_pencil.generate_from_brushes,
_defs_paint_grease_pencil.erase,
_defs_paint_grease_pencil.tint,
], ],
'PAINT_GPENCIL': [ 'PAINT_GPENCIL': [
_defs_view3d_generic.cursor, _defs_view3d_generic.cursor,