Cleanup: style, pep8

This commit is contained in:
Campbell Barton 2018-06-26 08:45:13 +02:00
parent 29182dd570
commit e6825946d0
6 changed files with 15 additions and 20 deletions

View File

@ -155,7 +155,7 @@ class DATA_PT_lightprobe_display(DataButtonsPanel, Panel):
col = layout.column()
if probe.type != "PLANAR":
if probe.type != 'PLANAR':
col.prop(probe, "data_draw_size", text="Size")
else:
col.prop(ob, "empty_draw_size", text="Arrow Size")

View File

@ -198,14 +198,14 @@ class EEVEE_MATERIAL_PT_options(MaterialButtonsPanel, Panel):
layout.prop(mat, "blend_method")
if mat.blend_method != "OPAQUE":
if mat.blend_method != 'OPAQUE':
layout.prop(mat, "transparent_shadow_method")
row = layout.row()
row.active = ((mat.blend_method == "CLIP") or (mat.transparent_shadow_method == "CLIP"))
row.active = ((mat.blend_method == 'CLIP') or (mat.transparent_shadow_method == 'CLIP'))
row.prop(mat, "alpha_threshold")
if mat.blend_method not in {"OPAQUE", "CLIP", "HASHED"}:
if mat.blend_method not in {'OPAQUE', 'CLIP', 'HASHED'}:
layout.prop(mat, "show_transparent_backside")
layout.prop(mat, "use_screen_refraction")

View File

@ -1738,7 +1738,6 @@ class PARTICLE_PT_force_fields_type1(ParticleButtonsPanel, Panel):
basic_force_field_settings_ui(self, context, part.force_field_1)
class PARTICLE_PT_force_fields_type2(ParticleButtonsPanel, Panel):
bl_label = "Type 2"
bl_parent_id = "PARTICLE_PT_force_fields"
@ -1770,14 +1769,12 @@ class PARTICLE_PT_force_fields_type1_falloff(ParticleButtonsPanel, Panel):
basic_force_field_falloff_ui(self, context, part.force_field_1)
class PARTICLE_PT_force_fields_type2_falloff(ParticleButtonsPanel, Panel):
bl_label = "Falloff"
bl_options = {'DEFAULT_CLOSED'}
bl_parent_id = "PARTICLE_PT_force_fields_type2"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
def draw(self, context):
layout = self.layout
layout.use_property_split = True

View File

@ -280,7 +280,6 @@ def basic_force_field_settings_ui(self, context, field):
if field.type == 'FORCE':
col.prop(field, "use_gravity_falloff", text="Gravitation")
col.prop(field, "apply_to_location", text="Affect Location")
col.prop(field, "apply_to_rotation", text="Affect Rotation")
col.prop(field, "use_absorption")

View File

@ -38,7 +38,7 @@ class OUTLINER_HT_header(Header):
layout.prop(space, "display_mode", icon_only=True)
if display_mode in {'VIEW_LAYER'}:
layout.operator("outliner.collection_new", text="", icon="GROUP").nested = True
layout.operator("outliner.collection_new", text="", icon='GROUP').nested = True
layout.separator_spacer()

View File

@ -2646,7 +2646,7 @@ class VIEW3D_MT_edit_mesh_specials(Menu):
layout.operator("mesh.merge", text="Merge Vertices...")
layout.operator("mesh.remove_doubles", text="Remove Double Vertices")
layout.operator("mesh.dissolve_verts")
layout.operator("mesh.delete", text="Delete Vertices").type = "VERT"
layout.operator("mesh.delete", text="Delete Vertices").type = 'VERT'
# Edge Select Commands
if select_mode[1]:
@ -2657,7 +2657,7 @@ class VIEW3D_MT_edit_mesh_specials(Menu):
layout.separator()
layout.operator("mesh.dissolve_edges")
layout.operator("mesh.delete", text="Delete Edges").type = "EDGE"
layout.operator("mesh.delete", text="Delete Edges").type = 'EDGE'
# Face Select Commands
if select_mode[2]:
@ -2687,7 +2687,7 @@ class VIEW3D_MT_edit_mesh_specials(Menu):
layout.separator()
layout.operator("mesh.dissolve_faces")
layout.operator("mesh.delete", text="Delete Faces").type = "FACE"
layout.operator("mesh.delete", text="Delete Faces").type = 'FACE'
# General Mesh Commands
@ -3785,7 +3785,7 @@ class VIEW3D_PT_overlay(Panel):
#sub.prop(overlay, "show_onion_skins")
sub.prop(overlay, "show_face_orientation")
sub.prop(overlay, "show_backface_culling")
if shading.type == "MATERIAL":
if shading.type == 'MATERIAL':
sub.prop(overlay, "show_look_dev")
row = col.row()
@ -4030,9 +4030,9 @@ class VIEW3D_PT_overlay_paint(Panel):
def draw_header(self, context):
layout = self.layout
layout.label(text={
"PAINT_TEXTURE": "Texture Paint",
"PAINT_VERTEX": "Vertex Paint",
"PAINT_WEIGHT": "Weight Paint",
'PAINT_TEXTURE': "Texture Paint",
'PAINT_VERTEX': "Vertex Paint",
'PAINT_WEIGHT': "Weight Paint",
}[context.mode])
def draw(self, context):
@ -4044,11 +4044,10 @@ class VIEW3D_PT_overlay_paint(Panel):
col = layout.column()
col.active = display_all
col.prop(overlay, {
"PAINT_TEXTURE": "texture_paint_mode_opacity",
"PAINT_VERTEX": "vertex_paint_mode_opacity",
"PAINT_WEIGHT": "weight_paint_mode_opacity",
'PAINT_TEXTURE': "texture_paint_mode_opacity",
'PAINT_VERTEX': "vertex_paint_mode_opacity",
'PAINT_WEIGHT': "weight_paint_mode_opacity",
}[context.mode], text="Opacity")
if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX'}: