UI: remove grease pencil icons
Grease pencil tool now uses an icon for each tool, previously it mapped icons to tool icons which is now not needed because for each tool a different brush can be selected which has it's own icon.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -45,7 +45,6 @@ def generate_from_brushes_tool_slots_ex(
|
||||
brush_category_attr,
|
||||
brush_category_layout,
|
||||
# Optional
|
||||
icon_fn=None,
|
||||
tooldef_keywords={},
|
||||
):
|
||||
# Categories
|
||||
@@ -55,18 +54,12 @@ def generate_from_brushes_tool_slots_ex(
|
||||
if brush is None:
|
||||
continue
|
||||
category = getattr(brush, brush_category_attr)
|
||||
|
||||
if icon_fn is not None:
|
||||
icon_id = icon_fn(brush)
|
||||
else:
|
||||
icon_id = category.lower()
|
||||
|
||||
name = brush.name
|
||||
brush_categories.setdefault(category, []).append(
|
||||
ToolDef.from_dict(
|
||||
dict(
|
||||
text=name,
|
||||
icon=icon_prefix + icon_id,
|
||||
icon=icon_prefix + category.lower(),
|
||||
data_block=name,
|
||||
**tooldef_keywords,
|
||||
)
|
||||
@@ -1385,23 +1378,9 @@ class _defs_gpencil_paint:
|
||||
def draw_settings(context, layout, tool):
|
||||
_defs_gpencil_paint.draw_settings_common(context, layout, tool)
|
||||
|
||||
def icon_fn(brush):
|
||||
return {
|
||||
'PENCIL': 'draw_pencil',
|
||||
'PEN': 'draw_pen',
|
||||
'INK': 'draw_ink',
|
||||
'INKNOISE': 'draw_noise',
|
||||
'BLOCK': 'draw_block',
|
||||
'MARKER': 'draw_marker',
|
||||
'FILL': 'draw_fill',
|
||||
'SOFT': 'draw.eraser_soft',
|
||||
'HARD': 'draw.eraser_hard',
|
||||
'STROKE': 'draw.eraser_stroke',
|
||||
}[brush.gpencil_settings.gp_icon]
|
||||
|
||||
return generate_from_brushes_tool_slots_ex(
|
||||
context, context.tool_settings.gpencil_paint,
|
||||
icon_prefix="brush.gpencil.",
|
||||
icon_prefix="brush.gpencil_draw.",
|
||||
brush_category_attr="gpencil_tool",
|
||||
brush_category_layout=(
|
||||
('DRAW',),
|
||||
@@ -1412,11 +1391,9 @@ class _defs_gpencil_paint:
|
||||
operator="gpencil.draw",
|
||||
draw_settings=draw_settings,
|
||||
),
|
||||
icon_fn=icon_fn,
|
||||
)
|
||||
|
||||
|
||||
|
||||
class _defs_gpencil_edit:
|
||||
@ToolDef.from_fn
|
||||
def bend():
|
||||
|
||||
@@ -605,16 +605,9 @@ set(ICON_NAMES
|
||||
# This section is maintained by the updating script, keep BEGIN/END comments.
|
||||
set_property(GLOBAL PROPERTY ICON_GEOM_NAMES
|
||||
# BEGIN ICON_GEOM_NAMES
|
||||
brush.gpencil.draw.eraser_hard
|
||||
brush.gpencil.draw.eraser_soft
|
||||
brush.gpencil.draw.eraser_stroke
|
||||
brush.gpencil.draw_block
|
||||
brush.gpencil.draw_fill
|
||||
brush.gpencil.draw_ink
|
||||
brush.gpencil.draw_marker
|
||||
brush.gpencil.draw_noise
|
||||
brush.gpencil.draw_pen
|
||||
brush.gpencil.draw_pencil
|
||||
brush.gpencil_draw.draw
|
||||
brush.gpencil_draw.erase
|
||||
brush.gpencil_draw.fill
|
||||
brush.paint_texture.airbrush
|
||||
brush.paint_texture.clone
|
||||
brush.paint_texture.draw
|
||||
|
||||
Reference in New Issue
Block a user