Fix Show Brush button being missing from the UI for paint modes, the feature was
already implemented, it's in the Appearance panel now. Also added that panel to the image editor now since it's relevant there too.
This commit is contained in:
@@ -882,6 +882,35 @@ class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
|
||||
row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'
|
||||
|
||||
|
||||
class IMAGE_PT_tools_brush_appearance(BrushButtonsPanel, Panel):
|
||||
bl_label = "Appearance"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
toolsettings = context.tool_settings.image_paint
|
||||
brush = toolsettings.brush
|
||||
|
||||
if brush is None: # unlikely but can happen
|
||||
layout.label(text="Brush Unset")
|
||||
return
|
||||
|
||||
col = layout.column()
|
||||
col.prop(toolsettings, "show_brush");
|
||||
|
||||
col = col.column()
|
||||
col.prop(brush, "cursor_color_add", text="")
|
||||
col.active = toolsettings.show_brush
|
||||
|
||||
layout.separator()
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(brush, "use_custom_icon")
|
||||
if brush.use_custom_icon:
|
||||
col.prop(brush, "icon_filepath", text="")
|
||||
|
||||
|
||||
class IMAGE_UV_sculpt_curve(Panel):
|
||||
bl_space_type = 'IMAGE_EDITOR'
|
||||
bl_region_type = 'UI'
|
||||
|
||||
@@ -1025,7 +1025,6 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
|
||||
|
||||
layout.prop(sculpt, "use_threaded", text="Threaded Sculpt")
|
||||
layout.prop(sculpt, "show_low_resolution")
|
||||
layout.prop(sculpt, "show_brush")
|
||||
layout.prop(sculpt, "use_deform_only")
|
||||
layout.prop(sculpt, "show_diffuse_color")
|
||||
|
||||
@@ -1081,15 +1080,21 @@ class VIEW3D_PT_tools_brush_appearance(Panel, View3DPaintPanel):
|
||||
return
|
||||
|
||||
col = layout.column()
|
||||
col.prop(settings, "show_brush");
|
||||
|
||||
col = col.column()
|
||||
col.active = settings.show_brush
|
||||
|
||||
if context.sculpt_object and context.tool_settings.sculpt:
|
||||
if brush.sculpt_capabilities.has_secondary_color:
|
||||
col.prop(brush, "cursor_color_add", text="Add Color")
|
||||
col.prop(brush, "cursor_color_subtract", text="Subtract Color")
|
||||
col.row().prop(brush, "cursor_color_add", text="Add")
|
||||
col.row().prop(brush, "cursor_color_subtract", text="Subtract")
|
||||
else:
|
||||
col.prop(brush, "cursor_color_add", text="Color")
|
||||
col.prop(brush, "cursor_color_add", text="")
|
||||
else:
|
||||
col.prop(brush, "cursor_color_add", text="Color")
|
||||
col.prop(brush, "cursor_color_add", text="")
|
||||
|
||||
layout.separator()
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(brush, "use_custom_icon")
|
||||
|
||||
Reference in New Issue
Block a user