From 61cceb370064d4064708ee079059d4dfc9737b62 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Sat, 12 Oct 2013 11:18:38 +0000 Subject: Add poll function for overlay panel. Thanks to Thomas Dinges for the report! --- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 0f443b4c705..0bb31f51c1b 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -743,6 +743,17 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel): bl_label = "Overlay" bl_options = {'DEFAULT_CLOSED'} + @classmethod + def poll(cls, context): + settings = cls.paint_settings(context) + return (settings and + settings.brush and + (context.sculpt_object or + context.vertex_paint_object or + context.weight_paint_object or + context.image_paint_object)) + + def draw(self, context): layout = self.layout -- cgit v1.2.3