Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-07-06 02:22:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-06 02:22:22 +0400
commitd9f86e3c7393621589aaf5813d0766b16c23a08c (patch)
tree284272ca2c02e1c23bb78c96618638d2ab119659 /release
parent4926667018caeb52cd8b59d85c3d00c35775d24d (diff)
pedantic pep8 warnings, mostly white space.
Diffstat (limited to 'release')
-rwxr-xr-xrelease/scripts/modules/blend_render_info.py37
-rw-r--r--release/scripts/op/wm.py9
-rw-r--r--release/scripts/ui/properties_data_curve.py20
-rw-r--r--release/scripts/ui/properties_object_constraint.py2
-rw-r--r--release/scripts/ui/properties_physics_softbody.py4
-rw-r--r--release/scripts/ui/space_info.py2
-rw-r--r--release/scripts/ui/space_logic.py2
-rw-r--r--release/scripts/ui/space_time.py8
-rw-r--r--release/scripts/ui/space_userpref.py41
-rw-r--r--release/scripts/ui/space_view3d.py4
-rw-r--r--release/scripts/ui/space_view3d_toolbar.py2
11 files changed, 68 insertions, 63 deletions
diff --git a/release/scripts/modules/blend_render_info.py b/release/scripts/modules/blend_render_info.py
index b7018ad6b64..dcd1f9cbee3 100755
--- a/release/scripts/modules/blend_render_info.py
+++ b/release/scripts/modules/blend_render_info.py
@@ -31,50 +31,51 @@
# int SDNAnr, nr;
# } BHead;
+
def read_blend_rend_chunk(path):
import struct
- file = open(path, 'rb')
-
- head = file.read(7)
+ blendfile = open(path, 'rb')
+
+ head = blendfile.read(7)
if head[0:2] == b'\x1f\x8b': # gzip magic
import gzip
- file.close()
- file = gzip.open(path, 'rb')
- head = file.read(7)
+ blendfile.close()
+ blendfile = gzip.open(path, 'rb')
+ head = blendfile.read(7)
if head != b'BLENDER':
print("not a blend file:", path)
- file.close()
+ blendfile.close()
return []
- is_64_bit = (file.read(1) == b'-')
+ is_64_bit = (blendfile.read(1) == b'-')
# true for PPC, false for X86
- is_big_endian = (file.read(1) == b'V')
+ is_big_endian = (blendfile.read(1) == b'V')
# Now read the bhead chunk!!!
- file.read(3) # skip the version
+ blendfile.read(3) # skip the version
scenes = []
-
+
sizeof_bhead = 24 if is_64_bit else 20
- while file.read(4) == b'REND':
+ while blendfile.read(4) == b'REND':
sizeof_bhead_left = sizeof_bhead - 4
-
- rend_length = struct.unpack('>i' if is_big_endian else '<i', file.read(4))[0]
+
+ struct.unpack('>i' if is_big_endian else '<i', blendfile.read(4))[0]
sizeof_bhead_left -= 4
# We dont care about the rest of the bhead struct
- file.read(sizeof_bhead_left)
-
+ blendfile.read(sizeof_bhead_left)
+
# Now we want the scene name, start and end frame. this is 32bites long
- start_frame, end_frame = struct.unpack('>2i' if is_big_endian else '<2i', file.read(8))
+ start_frame, end_frame = struct.unpack('>2i' if is_big_endian else '<2i', blendfile.read(8))
- scene_name = file.read(24)
+ scene_name = blendfile.read(24)
scene_name = scene_name[:scene_name.index(b'\0')]
diff --git a/release/scripts/op/wm.py b/release/scripts/op/wm.py
index 481df3488b8..ed77f32ff6d 100644
--- a/release/scripts/op/wm.py
+++ b/release/scripts/op/wm.py
@@ -435,7 +435,7 @@ class WM_OT_path_open(bpy.types.Operator):
bl_idname = "wm.path_open"
bl_label = ""
- filepath = StringProperty(name="File Path", maxlen= 1024)
+ filepath = StringProperty(name="File Path", maxlen=1024)
def execute(self, context):
import sys
@@ -444,13 +444,13 @@ class WM_OT_path_open(bpy.types.Operator):
filepath = bpy.utils.expandpath(self.properties.filepath)
filepath = os.path.normpath(filepath)
-
+
if not os.path.exists(filepath):
self.report({'ERROR'}, "File '%s' not found" % filepath)
return {'CANCELLED'}
-
+
if sys.platform == 'win32':
- subprocess.Popen(['start', filepath], shell= True)
+ subprocess.Popen(['start', filepath], shell=True)
elif sys.platform == 'darwin':
subprocess.Popen(['open', filepath])
else:
@@ -463,7 +463,6 @@ class WM_OT_path_open(bpy.types.Operator):
return {'FINISHED'}
-
class WM_OT_doc_view(bpy.types.Operator):
'''Load online reference docs'''
bl_idname = "wm.doc_view"
diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py
index 21359e1dbe2..e1d6c9c7f04 100644
--- a/release/scripts/ui/properties_data_curve.py
+++ b/release/scripts/ui/properties_data_curve.py
@@ -367,21 +367,21 @@ class DATA_PT_textboxes(DataButtonsPanel):
text = context.curve
wide_ui = context.region.width > narrowui
-
+
split = layout.split()
col = split.column()
col.operator("font.textbox_add", icon='ZOOMIN')
if wide_ui:
col = split.column()
-
+
for i, box in enumerate(text.textboxes):
-
+
boxy = layout.box()
-
+
row = boxy.row()
-
+
split = row.split()
-
+
col = split.column(align=True)
col.label(text="Dimensions:")
@@ -390,13 +390,13 @@ class DATA_PT_textboxes(DataButtonsPanel):
if wide_ui:
col = split.column(align=True)
-
+
col.label(text="Offset:")
col.prop(box, "x", text="X")
col.prop(box, "y", text="Y")
-
- row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
-
+
+ row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
+
classes = [
DATA_PT_context_curve,
diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py
index 0f55c78c1fa..335bd25b501 100644
--- a/release/scripts/ui/properties_object_constraint.py
+++ b/release/scripts/ui/properties_object_constraint.py
@@ -33,7 +33,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
wide_ui = context.region.width > narrowui
compact_con = context.region.width < narrowcon
- box = layout.template_constraint(con, compact = compact_con)
+ box = layout.template_constraint(con, compact=compact_con)
if box:
# match enum type to our functions, avoids a lookup table.
diff --git a/release/scripts/ui/properties_physics_softbody.py b/release/scripts/ui/properties_physics_softbody.py
index 3bd27f382c5..60149cf533b 100644
--- a/release/scripts/ui/properties_physics_softbody.py
+++ b/release/scripts/ui/properties_physics_softbody.py
@@ -189,10 +189,10 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
col.label(text="Aerodynamics:")
col.row().prop(softbody, "aerodynamics_type", expand=True)
col.prop(softbody, "aero", text="Factor")
-
+
#sub = col.column()
#sub.enabled = softbody.aero > 0
-
+
col.label(text="Collision:")
col.prop(softbody, "edge_collision", text="Edge")
diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py
index db8750a28fb..cc9e47905f9 100644
--- a/release/scripts/ui/space_info.py
+++ b/release/scripts/ui/space_info.py
@@ -191,6 +191,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_surface_add(bpy.types.Menu):
bl_idname = "INFO_MT_surface_add"
bl_label = "Surface"
@@ -205,6 +206,7 @@ class INFO_MT_surface_add(bpy.types.Menu):
layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text="NURBS Sphere")
layout.operator("surface.primitive_nurbs_surface_donut_add", icon='SURFACE_NDONUT', text="NURBS Torus")
+
class INFO_MT_armature_add(bpy.types.Menu):
bl_idname = "INFO_MT_armature_add"
bl_label = "Armature"
diff --git a/release/scripts/ui/space_logic.py b/release/scripts/ui/space_logic.py
index ab602da12b6..a01a5ce6305 100644
--- a/release/scripts/ui/space_logic.py
+++ b/release/scripts/ui/space_logic.py
@@ -38,7 +38,7 @@ class LOGIC_PT_properties(bpy.types.Panel):
layout.operator("object.game_property_new", text="Add Game Property", icon='ZOOMIN')
for i, prop in enumerate(game.properties):
-
+
box = layout.box()
row = box.row()
row.prop(prop, "name", text="")
diff --git a/release/scripts/ui/space_time.py b/release/scripts/ui/space_time.py
index 9469a722c0f..042e4dbc015 100644
--- a/release/scripts/ui/space_time.py
+++ b/release/scripts/ui/space_time.py
@@ -99,13 +99,14 @@ class TIME_MT_view(bpy.types.Menu):
layout.prop(st, "only_selected")
layout.separator()
-
+
layout.menu("TIME_MT_cache")
-
+
layout.separator()
layout.operator("marker.camera_bind")
-
+
+
class TIME_MT_cache(bpy.types.Menu):
bl_label = "Cache"
@@ -125,6 +126,7 @@ class TIME_MT_cache(bpy.types.Menu):
col.prop(st, "cache_cloth")
col.prop(st, "cache_smoke")
+
class TIME_MT_frame(bpy.types.Menu):
bl_label = "Frame"
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py
index ef128fc4a24..a4be17ce4ba 100644
--- a/release/scripts/ui/space_userpref.py
+++ b/release/scripts/ui/space_userpref.py
@@ -25,11 +25,11 @@ import shutil
def ui_items_general(col, context):
""" General UI Theme Settings (User Interface)
"""
-
+
row = col.row()
- subsplit = row.split(percentage=0.95)
-
+ subsplit = row.split(percentage=0.95)
+
padding = subsplit.split(percentage=0.15)
colsub = padding.column()
colsub = padding.column()
@@ -37,9 +37,9 @@ def ui_items_general(col, context):
colsub.row().prop(context, "item", slider=True)
colsub.row().prop(context, "inner", slider=True)
colsub.row().prop(context, "inner_sel", slider=True)
-
- subsplit = row.split(percentage=0.85)
-
+
+ subsplit = row.split(percentage=0.85)
+
padding = subsplit.split(percentage=0.15)
colsub = padding.column()
colsub = padding.column()
@@ -53,6 +53,7 @@ def ui_items_general(col, context):
col.separator()
+
def opengl_lamp_buttons(column, lamp):
split = column.split(percentage=0.1)
@@ -500,7 +501,7 @@ class USERPREF_PT_theme(bpy.types.Panel):
padding1 = subsplit.split(percentage=0.15)
padding1.column()
- subsplit = row.split(percentage=0.85)
+ subsplit = row.split(percentage=0.85)
padding2 = subsplit.split(percentage=0.15)
padding2.column()
@@ -531,13 +532,13 @@ class USERPREF_PT_theme(bpy.types.Panel):
split_themes = layout.split(percentage=0.2)
split_themes.prop(theme, "theme_area", expand=True)
-
+
split = layout.split(percentage=0.4)
-
-
+
+
layout.separator()
layout.separator()
-
+
split = split_themes.split()
if theme.theme_area == 'USER_INTERFACE':
@@ -609,11 +610,11 @@ class USERPREF_PT_theme(bpy.types.Panel):
ui = theme.user_interface.wcol_state
col.label(text="State:")
-
+
row = col.row()
- subsplit = row.split(percentage=0.95)
-
+ subsplit = row.split(percentage=0.95)
+
padding = subsplit.split(percentage=0.15)
colsub = padding.column()
colsub = padding.column()
@@ -621,9 +622,9 @@ class USERPREF_PT_theme(bpy.types.Panel):
colsub.row().prop(ui, "inner_anim_sel")
colsub.row().prop(ui, "inner_driven")
colsub.row().prop(ui, "inner_driven_sel")
-
- subsplit = row.split(percentage=0.85)
-
+
+ subsplit = row.split(percentage=0.85)
+
padding = subsplit.split(percentage=0.15)
colsub = padding.column()
colsub = padding.column()
@@ -635,8 +636,8 @@ class USERPREF_PT_theme(bpy.types.Panel):
ui = theme.user_interface
col.separator()
col.separator()
-
- split= col.split(percentage=0.93)
+
+ split = col.split(percentage=0.93)
split.prop(ui, "icon_file")
layout.separator()
@@ -917,7 +918,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
if info["warning"]:
split = colsub.row().split(percentage=0.15)
split.label(text="Warning:")
- split.label(text=' ' + info["warning"], icon = 'ERROR')
+ split.label(text=' ' + info["warning"], icon='ERROR')
if info["wiki_url"] or info["tracker_url"]:
split = colsub.row().split(percentage=0.15)
split.label(text="Internet:")
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py
index 750ffabe89a..4e2a713474a 100644
--- a/release/scripts/ui/space_view3d.py
+++ b/release/scripts/ui/space_view3d.py
@@ -732,7 +732,7 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
props.data_path_item = "data.dof_distance"
props.input_scale = 0.02
- if obj.type in ['CURVE','TEXT']:
+ if obj.type in ('CURVE','TEXT'):
layout.operator_context = 'INVOKE_REGION_WIN'
props = layout.operator("wm.context_modal_mouse", text="Extrude Size")
@@ -760,7 +760,7 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.energy"
- if obj.data.type in ['SPOT','AREA','POINT']:
+ if obj.data.type in ('SPOT', 'AREA', 'POINT'):
props = layout.operator("wm.context_modal_mouse", text="Falloff Distance")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.distance"
diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py
index 0ad26be27c4..c503eaa9b3e 100644
--- a/release/scripts/ui/space_view3d_toolbar.py
+++ b/release/scripts/ui/space_view3d_toolbar.py
@@ -43,7 +43,7 @@ class VIEW3D_PT_tools_objectmode(View3DPanel):
col = layout.column(align=True)
col.operator("object.origin_set", text="Origin")
-
+
col = layout.column(align=True)
col.label(text="Object:")
col.operator("object.duplicate_move")