Cleanup: redundant staticmethod use

staticmethod shouldn't be used unless it's necessary,
in that case a comment should be included especially when
subclassing non-staticmethods from RNA.
This commit is contained in:
Campbell Barton
2019-03-13 13:15:39 +11:00
parent d6e6a0f906
commit a4b6ef30dc
7 changed files with 0 additions and 33 deletions

View File

@@ -88,7 +88,6 @@ class AnnotationDrawingToolsPanel:
def poll(cls, context):
return True
@staticmethod
def draw(self, context):
layout = self.layout
@@ -160,7 +159,6 @@ class GreasePencilStrokeEditPanel:
gpd = context.gpencil_data
return bool(context.editable_gpencil_strokes) and bool(gpd.use_stroke_edit_mode)
@staticmethod
def draw(self, context):
layout = self.layout
@@ -245,7 +243,6 @@ class GreasePencilStrokeSculptPanel:
bl_label = "Sculpt Strokes"
bl_category = "Tools"
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -274,7 +271,6 @@ class GreasePencilSculptOptionsPanel:
return bool(tool in {'SMOOTH', 'RANDOMIZE', 'SMOOTH'})
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -305,7 +301,6 @@ class GreasePencilAppearancePanel:
ob = context.active_object
return ob and ob.type == 'GPENCIL'
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -679,12 +674,10 @@ class AnnotationDataPanel:
else:
return True
@staticmethod
def draw_header(self, context):
if context.space_data.type not in {'VIEW_3D', 'TOPBAR'}:
self.layout.prop(context.space_data, "show_annotation", text="")
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_decorate = False
@@ -769,12 +762,10 @@ class AnnotationOnionSkin:
return True
@staticmethod
def draw_header(self, context):
gpl = context.active_gpencil_layer
self.layout.prop(gpl, "use_annotation_onion_skinning", text="")
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_decorate = False
@@ -811,7 +802,6 @@ class GreasePencilToolsPanel:
return (context.gpencil_data is not None)
@staticmethod
def draw(self, context):
layout = self.layout
@@ -838,7 +828,6 @@ class GreasePencilToolsPanel:
class GreasePencilMaterialsPanel:
# Mix-in, use for properties editor and top-bar.
@staticmethod
def draw(self, context):
layout = self.layout
show_full_ui = (self.bl_space_type == 'PROPERTIES')

View File

@@ -107,7 +107,6 @@ class MATERIAL_PT_gpencil_surface(GPMaterialButtonsPanel, Panel):
def draw_header_preset(self, context):
MATERIAL_PT_gpencil_material_presets.draw_panel_header(self.layout)
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -123,7 +122,6 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
gpcolor = ma.grease_pencil
self.layout.prop(gpcolor, "show_stroke", text="")
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -160,7 +158,6 @@ class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
gpcolor = ma.grease_pencil
self.layout.prop(gpcolor, "show_fill", text="")
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -244,7 +241,6 @@ class MATERIAL_PT_gpencil_options(GPMaterialButtonsPanel, Panel):
bl_label = "Options"
bl_options = {'DEFAULT_CLOSED'}
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True

View File

@@ -236,7 +236,6 @@ class DOPESHEET_HT_editor_buttons(Header):
def draw(self, context):
pass
@staticmethod
def draw_header(context, layout):
st = context.space_data
tool_settings = context.tool_settings

View File

@@ -30,7 +30,6 @@ class TIME_HT_editor_buttons(Header):
def draw(self, context):
pass
@staticmethod
def draw_header(context, layout):
scene = context.scene
tool_settings = context.tool_settings

View File

@@ -487,7 +487,6 @@ class TOPBAR_PT_gpencil_layers(Panel):
return False
@staticmethod
def draw(self, context):
layout = self.layout
gpd = context.gpencil_data
@@ -1031,7 +1030,6 @@ class TOPBAR_PT_gpencil_primitive(Panel):
bl_region_type = 'HEADER'
bl_label = "Primitives"
@staticmethod
def draw(self, context):
settings = context.tool_settings.gpencil_sculpt

View File

@@ -4035,7 +4035,6 @@ class VIEW3D_MT_gpencil_animation(Menu):
ob = context.active_object
return ob and ob.type == 'GPENCIL' and ob.mode != 'OBJECT'
@staticmethod
def draw(self, context):
layout = self.layout
@@ -5359,7 +5358,6 @@ class VIEW3D_PT_gpencil_guide(Panel):
bl_region_type = 'HEADER'
bl_label = "Guides"
@staticmethod
def draw(self, context):
from math import pi
settings = context.tool_settings.gpencil_sculpt.guide
@@ -5588,7 +5586,6 @@ class VIEW3D_PT_gpencil_multi_frame(Panel):
bl_region_type = 'HEADER'
bl_label = "Multi Frame"
@staticmethod
def draw(self, context):
gpd = context.gpencil_data
settings = context.tool_settings.gpencil_sculpt

View File

@@ -1481,7 +1481,6 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
else:
return True
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -1527,7 +1526,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):
def draw_header_preset(self, context):
VIEW3D_PT_gpencil_brush_presets.draw_panel_header(self.layout)
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -1565,7 +1563,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(View3DPanel, Panel):
gp_settings = brush.gpencil_settings
self.layout.prop(gp_settings, "use_settings_stabilizer", text="")
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -1595,7 +1592,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_settings(View3DPanel, Panel):
gp_settings = brush.gpencil_settings
self.layout.prop(gp_settings, "use_settings_postprocess", text="")
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -1637,7 +1633,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
gp_settings = brush.gpencil_settings
self.layout.prop(gp_settings, "use_settings_random", text="")
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -1667,7 +1662,6 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel):
brush = context.tool_settings.gpencil_paint.brush
return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL'}
@staticmethod
def draw(self, context):
layout = self.layout
@@ -1677,7 +1671,6 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves_sensitivity(View3DPanel, Panel):
bl_label = "Sensitivity"
bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves"
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -1693,7 +1686,6 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves_strength(View3DPanel, Panel):
bl_label = "Strength"
bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves"
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -1709,7 +1701,6 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves_jitter(View3DPanel, Panel):
bl_label = "Jitter"
bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves"
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -1739,7 +1730,6 @@ class VIEW3D_PT_tools_grease_pencil_interpolate(Panel):
gpd = context.gpencil_data
return bool(context.editable_gpencil_strokes) and bool(gpd.use_stroke_edit_mode)
@staticmethod
def draw(self, context):
layout = self.layout
settings = context.tool_settings.gpencil_interpolate
@@ -1785,7 +1775,6 @@ class VIEW3D_PT_tools_grease_pencil_weight_paint(View3DPanel, Panel):
bl_category = "Tools"
bl_label = "Brush"
@staticmethod
def draw(self, context):
layout = self.layout
layout.use_property_split = True