[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60704] trunk/blender/release/scripts/ startup/bl_ui/space_view3d_toolbar.py: Add poll function for overlay panel.

Antony Riakiotakis kalast at gmail.com
Sat Oct 12 13:18:38 CEST 2013


Revision: 60704
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60704
Author:   psy-fi
Date:     2013-10-12 11:18:38 +0000 (Sat, 12 Oct 2013)
Log Message:
-----------
Add poll function for overlay panel. Thanks to Thomas Dinges for the report!

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-10-12 11:05:12 UTC (rev 60703)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-10-12 11:18:38 UTC (rev 60704)
@@ -743,6 +743,17 @@
     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
 




More information about the Bf-blender-cvs mailing list