style cleanup

This commit is contained in:
Campbell Barton 2012-08-17 18:36:20 +00:00
parent e9caa21830
commit b0371f053c
9 changed files with 12 additions and 12 deletions

@ -256,7 +256,7 @@ def module_names(path, recursive=False):
elif filename.endswith(".py") and filename != "__init__.py":
fullpath = join(path, filename)
modules.append((filename[0:-3], fullpath))
elif ("." not in filename):
elif "." not in filename:
directory = join(path, filename)
fullpath = join(directory, "__init__.py")
if isfile(fullpath):

@ -100,10 +100,10 @@ class NODE_OT_add_search(Operator):
# Enum item identifier has an additional prefix to distinguish base node types from node groups
item = self.type
if (item.startswith(node_type_prefix)):
if item.startswith(node_type_prefix):
# item means base node type
node = tree.nodes.new(type=item[len(node_type_prefix):])
elif (item.startswith(node_group_prefix)):
elif item.startswith(node_group_prefix):
# item means node group type
node = tree.nodes.new(type='GROUP', group=bpy.data.node_groups[item[len(node_group_prefix):]])
else:

@ -44,10 +44,10 @@ class MotionPathButtonsPanel():
col = split.column()
col.label(text="Display Range:")
sub = col.column(align=True)
if (mps.type == 'CURRENT_FRAME'):
if mps.type == 'CURRENT_FRAME':
sub.prop(mps, "frame_before", text="Before")
sub.prop(mps, "frame_after", text="After")
elif (mps.type == 'RANGE'):
elif mps.type == 'RANGE':
sub.prop(mps, "frame_start", text="Start")
sub.prop(mps, "frame_end", text="End")

@ -106,7 +106,7 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
sub.prop(curve, "resolution_v", text="Preview V")
sub.prop(curve, "render_resolution_v", text="Render V")
if (is_curve or is_text):
if is_curve or is_text:
col.label(text="Fill:")
sub = col.column()
sub.active = (curve.dimensions == '2D' or (curve.bevel_object is None and curve.dimensions == '3D'))

@ -322,9 +322,9 @@ class DATA_PT_area(DataButtonsPanel, Panel):
col.row().prop(lamp, "shape", expand=True)
sub = col.row(align=True)
if (lamp.shape == 'SQUARE'):
if lamp.shape == 'SQUARE':
sub.prop(lamp, "size")
elif (lamp.shape == 'RECTANGLE'):
elif lamp.shape == 'RECTANGLE':
sub.prop(lamp, "size", text="Size X")
sub.prop(lamp, "size_y", text="Size Y")

@ -1008,7 +1008,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
sub.active = (part.draw_color in {'VELOCITY', 'ACCELERATION'})
sub.prop(part, "color_maximum", text="Max")
if (path):
if path:
col.prop(part, "draw_step")

@ -92,7 +92,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
layout.separator()
layout.prop(field, "guide_kink_type")
if (field.guide_kink_type != 'NONE'):
if field.guide_kink_type != 'NONE':
layout.prop(field, "guide_kink_axis")
split = layout.split()

@ -497,7 +497,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
col = layout.column(align=True)
col.prop(strip, "use_uniform_scale")
if (strip.use_uniform_scale):
if strip.use_uniform_scale:
col = layout.column(align=True)
col.prop(strip, "scale_start_x", text="Scale")
else:

@ -2557,7 +2557,7 @@ class VIEW3D_PT_background_image(Panel):
if bg.source == 'IMAGE':
row = box.row()
row.template_ID(bg, "image", open="image.open")
if (bg.image):
if bg.image is not None:
box.template_image(bg, "image", bg.image_user, compact=True)
has_bg = True