diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-10-12 15:18:38 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-10-12 15:18:38 +0400 |
commit | 61cceb370064d4064708ee079059d4dfc9737b62 (patch) | |
tree | ca5a5a7932c9e3bd482cd667bfdb8fa4570e1cf6 | |
parent | e192f5b19834813a94abd31cb7b299d1b9351b7d (diff) |
Add poll function for overlay panel. Thanks to Thomas Dinges for the report!
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 11 |
1 files changed, 11 insertions, 0 deletions
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 |