Fix brush menu broken before adding uv and texture data
To reproduce: 1) go to texture paint mode 2) go into the brush menu Pointed out by @lijenstina on IRC also fix is authored by him.
This commit is contained in:
parent
4d0d1b5936
commit
157a8727b5
|
@ -1699,7 +1699,7 @@ class VIEW3D_MT_brush(Menu):
|
|||
layout = self.layout
|
||||
|
||||
settings = UnifiedPaintPanel.paint_settings(context)
|
||||
brush = settings.brush
|
||||
brush = getattr(settings, "brush", None)
|
||||
|
||||
ups = context.tool_settings.unified_paint_settings
|
||||
layout.prop(ups, "use_unified_size", text="Unified Size")
|
||||
|
@ -1708,6 +1708,11 @@ class VIEW3D_MT_brush(Menu):
|
|||
layout.prop(ups, "use_unified_color", text="Unified Color")
|
||||
layout.separator()
|
||||
|
||||
# skip if no active brush
|
||||
if not brush:
|
||||
layout.label(text="No Brushes currently available", icon="INFO")
|
||||
return
|
||||
|
||||
# brush paint modes
|
||||
layout.menu("VIEW3D_MT_brush_paint_modes")
|
||||
|
||||
|
@ -1720,10 +1725,6 @@ class VIEW3D_MT_brush(Menu):
|
|||
elif context.vertex_paint_object or context.weight_paint_object:
|
||||
layout.prop_menu_enum(brush, "vertex_tool")
|
||||
|
||||
# skip if no active brush
|
||||
if not brush:
|
||||
return
|
||||
|
||||
# TODO: still missing a lot of brush options here
|
||||
|
||||
# sculpt options
|
||||
|
|
Loading…
Reference in New Issue