pep8, whitespace edits

This commit is contained in:
Campbell Barton 2010-06-09 19:12:03 +00:00
parent e3daab158c
commit 1028284301
16 changed files with 32 additions and 28 deletions

@ -21,6 +21,7 @@
import bpy
import mathutils
def add_object_align_init(context, operator):
if operator and operator.properties.is_property_set("location") and operator.properties.is_property_set("rotation"):

@ -144,7 +144,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
_loaded.append(mod)
if reload_scripts:
# TODO, this is broken but should work, needs looking into
'''
# reload modules that may not be directly included
@ -369,7 +369,7 @@ def smpte_from_seconds(time, fps=None):
time = time % 60.0
seconds = int(time)
frames= int(round(math.floor(((time - seconds) * fps))))
frames = int(round(math.floor(((time - seconds) * fps))))
return "%s%02d:%02d:%02d:%02d" % (neg, hours, minutes, seconds, frames)

@ -433,7 +433,7 @@ class Mesh(bpy_types.ID):
closed loops have matching start and end values.
"""
line_polys = []
# Get edges not used by a face
if edges is None:
edges = self.edges
@ -441,10 +441,10 @@ class Mesh(bpy_types.ID):
if not hasattr(edges, "pop"):
edges = edges[:]
edge_dict= dict((ed.key, ed) for ed in self.edges if ed.selected)
edge_dict = dict((ed.key, ed) for ed in self.edges if ed.selected)
while edges:
current_edge= edges.pop()
current_edge = edges.pop()
vert_end, vert_start = current_edge.verts[:]
line_poly = [vert_start, vert_end]
@ -462,7 +462,7 @@ class Mesh(bpy_types.ID):
vert_end = line_poly[-1]
ok = 1
del edges[i]
#break
# break
elif v2 == vert_end:
line_poly.append(v1)
vert_end = line_poly[-1]
@ -474,7 +474,7 @@ class Mesh(bpy_types.ID):
vert_start = line_poly[0]
ok = 1
del edges[i]
#break
# break
elif v2 == vert_start:
line_poly.insert(0, v1)
vert_start = line_poly[0]
@ -486,7 +486,6 @@ class Mesh(bpy_types.ID):
return line_polys
class MeshEdge(StructRNA):
__slots__ = ()

@ -121,7 +121,7 @@ def execute(context):
# unlikely, but this can happen with unicode errors for example.
import traceback
stderr.write(traceback.format_exc())
stdout.seek(0)
stderr.seek(0)
@ -180,7 +180,7 @@ def autocomplete(context):
# note: unlikely stdin would be used for autocomp. but its possible.
stdin_backup = sys.stdin
sys.stdin = None
scrollback = ""
scrollback_error = ""

@ -515,9 +515,9 @@ class IsolateTypeRender(bpy.types.Operator):
def execute(self, context):
act_type = context.object.type
for obj in context.visible_objects:
if obj.selected:
obj.restrict_render = False
else:

@ -138,6 +138,7 @@ def register():
register(SequencerCutMulticam)
register(SequencerDeinterlaceSelectedMovies)
def unregister():
unregister = bpy.types.unregister
@ -145,7 +146,6 @@ def unregister():
unregister(SequencerCutMulticam)
unregister(SequencerDeinterlaceSelectedMovies)
if __name__ == "__main__":
register()

@ -178,7 +178,7 @@ class ExportUVLayout(bpy.types.Operator):
fw('stroke\n')
fw('} def\n')
fw('newpath\n')
firstline = True
for i, uvs in self._face_uv_iter(context):
for j, uv in enumerate(uvs):

@ -16,7 +16,7 @@
#
# ##### END GPL LICENSE BLOCK #####
# <pep8-80 compliant>
# <pep8 compliant>
import bpy

@ -739,7 +739,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
else:
col = layout.column()
col.prop(con, "use_relative_position")
if con.use_relative_position:
if con.use_relative_position:
col.prop(con, "offset", text="Relative Pivot Point")
else:
col.prop(con, "offset", text="Absolute Pivot Point")
@ -747,6 +747,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
col = layout.column()
col.prop(con, "enabled_rotation_range", text="Pivot When")
class OBJECT_PT_constraints(ConstraintButtonsPanel):
bl_label = "Object Constraints"
bl_context = "constraint"

@ -183,7 +183,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
md = context.smoke.domain_settings
wide_ui = context.region.width > narrowui
layout.active = md.highres
split = layout.split()

@ -313,7 +313,7 @@ class RENDER_PT_output(RenderButtonsPanel):
if rd.file_format in ('AVI_JPEG', 'JPEG'):
split = layout.split()
split.prop(rd, "file_quality", slider=True)
elif rd.file_format == 'MULTILAYER':
split = layout.split()

@ -66,7 +66,7 @@ class INFO_HT_header(bpy.types.Header):
layout.template_running_jobs()
layout.template_reports_banner()
layout.label(text=scene.statistics())
# XXX: this should be right-aligned to the RHS of the region
@ -198,6 +198,7 @@ class INFO_MT_mesh_add(bpy.types.Menu):
layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text="Grid")
layout.operator("mesh.primitive_monkey_add", icon='MESH_MONKEY', text="Monkey")
class INFO_MT_curve_add(bpy.types.Menu):
bl_idname = "INFO_MT_curve_add"
bl_label = "Curve"
@ -211,6 +212,7 @@ class INFO_MT_curve_add(bpy.types.Menu):
layout.operator("curve.primitive_nurbs_circle_add", icon='CURVE_NCIRCLE', text="Nurbs Circle")
layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text="Path")
class INFO_MT_armature_add(bpy.types.Menu):
bl_idname = "INFO_MT_armature_add"
bl_label = "Armature"

@ -46,6 +46,7 @@ class LOGIC_PT_properties(bpy.types.Panel):
row.prop(prop, "debug", text="", toggle=True, icon='INFO')
row.operator("object.game_property_remove", text="", icon='X').index = i
class LOGIC_MT_logicbricks_add(bpy.types.Menu):
bl_label = "Add"

@ -457,7 +457,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel):
row = layout.row(align=True)
sub = row.row()
sub.scale_x = 2.0
if not context.screen.animation_playing:
sub.operator("screen.animation_play", text="", icon='PLAY')
else:

@ -165,11 +165,11 @@ class USERPREF_PT_interface(bpy.types.Panel):
sub.enabled = view.show_mini_axis
sub.prop(view, "mini_axis_size", text="Size")
sub.prop(view, "mini_axis_brightness", text="Brightness")
col.separator()
col.separator()
col.separator()
col.label(text="Properties Window:")
col.prop(view, "properties_width_check")
@ -554,7 +554,7 @@ class USERPREF_PT_theme(bpy.types.Panel):
ui = theme.user_interface.wcol_scroll
col.label(text="Scroll Bar:")
ui_items_general(col, ui)
ui = theme.user_interface.wcol_progress
col.label(text="Progress Bar:")
ui_items_general(col, ui)
@ -1227,7 +1227,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
split.operator("wm.url_open", text="Link to the Wiki", icon='HELP').url = info["wiki_url"]
if info["tracker_url"]:
split.operator("wm.url_open", text="Report a Bug", icon='URL').url = info["tracker_url"]
if info["wiki_url"] and info["tracker_url"]:
split.separator()
else:

@ -38,7 +38,7 @@ class VIEW3D_HT_header(bpy.types.Header):
# Menus
if context.area.show_menus:
sub = row.row(align=True)
sub.menu("VIEW3D_MT_view")
# Select Menu
@ -855,8 +855,8 @@ class VIEW3D_MT_object_game_properties(bpy.types.Menu):
def draw(self, context):
layout = self.layout
layout.operator("object.game_property_copy", text="Replace").operation="REPLACE"
layout.operator("object.game_property_copy", text="Merge").operation="MERGE"
layout.operator("object.game_property_copy", text="Replace").operation = 'REPLACE'
layout.operator("object.game_property_copy", text="Merge").operation = 'MERGE'
layout.operator_menu_enum("object.game_property_copy", "property", text="Copy...")
layout.separator()
layout.operator("object.game_property_clear")