diff options
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index f13c7095f67..9245def7473 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -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 |