Cleanup: remove redundant poll functions
authorCampbell Barton <ideasman42@gmail.com>
Fri, 19 Apr 2019 06:13:56 +0000 (08:13 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 19 Apr 2019 06:13:56 +0000 (08:13 +0200)
release/scripts/startup/bl_ui/properties_data_shaderfx.py
release/scripts/startup/bl_ui/properties_grease_pencil_common.py
release/scripts/startup/bl_ui/space_topbar.py
release/scripts/startup/bl_ui/space_view3d.py

index 5ada588..fce8644 100644 (file)
@@ -30,11 +30,12 @@ class ShaderFxButtonsPanel:
 class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
     bl_label = "Effects"
 
-    @classmethod
-    def poll(cls, context):
-        return True
-        ob = context.object
-        return ob and ob.type == 'GPENCIL'
+    # Unused: always show for now.
+
+    # @classmethod
+    # def poll(cls, context):
+    #     ob = context.object
+    #     return ob and ob.type == 'GPENCIL'
 
     def draw(self, context):
         layout = self.layout
index 1fd106f..14c616d 100644 (file)
@@ -84,10 +84,6 @@ class AnnotationDrawingToolsPanel:
     bl_category = "Annotation"
     bl_region_type = 'TOOLS'
 
-    @classmethod
-    def poll(cls, _context):
-        return True
-
     def draw(self, context):
         layout = self.layout
 
index 79769f1..dade943 100644 (file)
@@ -663,10 +663,6 @@ class TOPBAR_PT_name(Panel):
     bl_label = "Rename Active Item"
     bl_ui_units_x = 14
 
-    @classmethod
-    def poll(cls, _context):
-        return True
-
     def draw(self, context):
         layout = self.layout
 
index 0b7a717..3ce892d 100644 (file)
@@ -5082,10 +5082,6 @@ class VIEW3D_PT_shading_options_shadow(Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'HEADER'
 
-    @classmethod
-    def poll(cls, _context):
-        return True
-
     def draw(self, context):
         layout = self.layout
         layout.use_property_split = True
@@ -5102,10 +5098,6 @@ class VIEW3D_PT_shading_options_ssao(Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'HEADER'
 
-    @classmethod
-    def poll(cls, _context):
-        return True
-
     def draw(self, context):
         layout = self.layout
         layout.use_property_split = True