WIP: Brush assets project #106303
|
@ -157,29 +157,24 @@ class BrushSelectPanel(BrushPanel):
|
||||||
col = row.column()
|
col = row.column()
|
||||||
col.menu("VIEW3D_MT_brush_context_menu", icon='DOWNARROW_HLT', text="")
|
col.menu("VIEW3D_MT_brush_context_menu", icon='DOWNARROW_HLT', text="")
|
||||||
|
|
||||||
header, panel = layout.panel("customize", default_closed=True)
|
# TODO: Need actual check if this is an asset from library.
|
||||||
header.label(text="Customize")
|
# TODO: why is brush.asset_data None for these?
|
||||||
if panel:
|
is_linked = brush.library
|
||||||
panel.use_property_split = True
|
is_override = brush.override_library and brush.override_library.reference
|
||||||
panel.use_property_decorate = False
|
is_asset_brush = is_linked or is_override
|
||||||
|
|
||||||
# icon
|
if not is_asset_brush:
|
||||||
col = panel.column(heading="Custom Icon", align=True)
|
# Legacy custom icon, mostly replaced by asset preview.
|
||||||
|
layout.use_property_split = True
|
||||||
|
layout.use_property_decorate = False
|
||||||
|
|
||||||
|
col = layout.column(heading="Custom Icon", align=True)
|
||||||
row = col.row()
|
row = col.row()
|
||||||
row.prop(brush, "use_custom_icon", text="")
|
row.prop(brush, "use_custom_icon", text="")
|
||||||
sub = row.row()
|
sub = row.row()
|
||||||
sub.active = brush.use_custom_icon
|
sub.active = brush.use_custom_icon
|
||||||
sub.prop(brush, "icon_filepath", text="")
|
sub.prop(brush, "icon_filepath", text="")
|
||||||
|
|
||||||
# brush paint modes
|
|
||||||
col = panel.column(heading="Modes", align=True)
|
|
||||||
col.prop(brush, "use_paint_sculpt", text="Sculpt")
|
|
||||||
col.prop(brush, "use_paint_uv_sculpt", text="UV Sculpt")
|
|
||||||
col.prop(brush, "use_paint_vertex", text="Vertex Paint")
|
|
||||||
col.prop(brush, "use_paint_weight", text="Weight Paint")
|
|
||||||
col.prop(brush, "use_paint_image", text="Texture Paint")
|
|
||||||
col.prop(brush, "use_paint_sculpt_curves", text="Sculpt Curves")
|
|
||||||
|
|
||||||
|
|
||||||
class ColorPalettePanel(BrushPanel):
|
class ColorPalettePanel(BrushPanel):
|
||||||
bl_label = "Color Palette"
|
bl_label = "Color Palette"
|
||||||
|
@ -1109,6 +1104,21 @@ def brush_settings_advanced(layout, context, brush, popover=False):
|
||||||
if use_frontface:
|
if use_frontface:
|
||||||
layout.prop(brush, "use_frontface", text="Front Faces Only")
|
layout.prop(brush, "use_frontface", text="Front Faces Only")
|
||||||
|
|
||||||
|
# Brush modes
|
||||||
|
header, panel = layout.panel("modes", default_closed=True)
|
||||||
|
header.label(text="Modes")
|
||||||
|
if panel:
|
||||||
|
panel.use_property_split = True
|
||||||
|
panel.use_property_decorate = False
|
||||||
|
|
||||||
|
col = panel.column(align=True)
|
||||||
|
col.prop(brush, "use_paint_sculpt", text="Sculpt")
|
||||||
|
col.prop(brush, "use_paint_uv_sculpt", text="UV Sculpt")
|
||||||
|
col.prop(brush, "use_paint_vertex", text="Vertex Paint")
|
||||||
|
col.prop(brush, "use_paint_weight", text="Weight Paint")
|
||||||
|
col.prop(brush, "use_paint_image", text="Texture Paint")
|
||||||
|
col.prop(brush, "use_paint_sculpt_curves", text="Sculpt Curves")
|
||||||
|
|
||||||
|
|
||||||
def draw_color_settings(context, layout, brush, color_type=False):
|
def draw_color_settings(context, layout, brush, color_type=False):
|
||||||
"""Draw color wheel and gradient settings."""
|
"""Draw color wheel and gradient settings."""
|
||||||
|
|
Loading…
Reference in New Issue