[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30006] trunk/blender/release/scripts: pedantic pep8 warnings, mostly white space.

Campbell Barton ideasman42 at gmail.com
Tue Jul 6 00:22:22 CEST 2010


Revision: 30006
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30006
Author:   campbellbarton
Date:     2010-07-06 00:22:22 +0200 (Tue, 06 Jul 2010)

Log Message:
-----------
pedantic pep8 warnings, mostly white space.

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/blend_render_info.py
    trunk/blender/release/scripts/op/wm.py
    trunk/blender/release/scripts/ui/properties_data_curve.py
    trunk/blender/release/scripts/ui/properties_object_constraint.py
    trunk/blender/release/scripts/ui/properties_physics_softbody.py
    trunk/blender/release/scripts/ui/space_info.py
    trunk/blender/release/scripts/ui/space_logic.py
    trunk/blender/release/scripts/ui/space_time.py
    trunk/blender/release/scripts/ui/space_userpref.py
    trunk/blender/release/scripts/ui/space_view3d.py
    trunk/blender/release/scripts/ui/space_view3d_toolbar.py

Modified: trunk/blender/release/scripts/modules/blend_render_info.py
===================================================================
--- trunk/blender/release/scripts/modules/blend_render_info.py	2010-07-05 21:43:46 UTC (rev 30005)
+++ trunk/blender/release/scripts/modules/blend_render_info.py	2010-07-05 22:22:22 UTC (rev 30006)
@@ -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')]
 

Modified: trunk/blender/release/scripts/op/wm.py
===================================================================
--- trunk/blender/release/scripts/op/wm.py	2010-07-05 21:43:46 UTC (rev 30005)
+++ trunk/blender/release/scripts/op/wm.py	2010-07-05 22:22:22 UTC (rev 30006)
@@ -435,7 +435,7 @@
     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 @@
 
         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 @@
         return {'FINISHED'}
 
 
-
 class WM_OT_doc_view(bpy.types.Operator):
     '''Load online reference docs'''
     bl_idname = "wm.doc_view"

Modified: trunk/blender/release/scripts/ui/properties_data_curve.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_curve.py	2010-07-05 21:43:46 UTC (rev 30005)
+++ trunk/blender/release/scripts/ui/properties_data_curve.py	2010-07-05 22:22:22 UTC (rev 30006)
@@ -367,21 +367,21 @@
 
         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,14 +390,14 @@
 
             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,
     DATA_PT_shape_curve,

Modified: trunk/blender/release/scripts/ui/properties_object_constraint.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_object_constraint.py	2010-07-05 21:43:46 UTC (rev 30005)
+++ trunk/blender/release/scripts/ui/properties_object_constraint.py	2010-07-05 22:22:22 UTC (rev 30006)
@@ -33,7 +33,7 @@
 
         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.

Modified: trunk/blender/release/scripts/ui/properties_physics_softbody.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_softbody.py	2010-07-05 21:43:46 UTC (rev 30005)
+++ trunk/blender/release/scripts/ui/properties_physics_softbody.py	2010-07-05 22:22:22 UTC (rev 30006)
@@ -189,11 +189,11 @@
         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")
         col.prop(softbody, "face_collision", text="Face")

Modified: trunk/blender/release/scripts/ui/space_info.py
===================================================================
--- trunk/blender/release/scripts/ui/space_info.py	2010-07-05 21:43:46 UTC (rev 30005)
+++ trunk/blender/release/scripts/ui/space_info.py	2010-07-05 22:22:22 UTC (rev 30006)
@@ -191,6 +191,7 @@
         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 @@
         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"

Modified: trunk/blender/release/scripts/ui/space_logic.py
===================================================================
--- trunk/blender/release/scripts/ui/space_logic.py	2010-07-05 21:43:46 UTC (rev 30005)
+++ trunk/blender/release/scripts/ui/space_logic.py	2010-07-05 22:22:22 UTC (rev 30006)
@@ -38,7 +38,7 @@
         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="")

Modified: trunk/blender/release/scripts/ui/space_time.py
===================================================================
--- trunk/blender/release/scripts/ui/space_time.py	2010-07-05 21:43:46 UTC (rev 30005)
+++ trunk/blender/release/scripts/ui/space_time.py	2010-07-05 22:22:22 UTC (rev 30006)
@@ -99,13 +99,14 @@
         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 @@
         col.prop(st, "cache_cloth")
         col.prop(st, "cache_smoke")
 
+
 class TIME_MT_frame(bpy.types.Menu):
     bl_label = "Frame"
 

Modified: trunk/blender/release/scripts/ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/ui/space_userpref.py	2010-07-05 21:43:46 UTC (rev 30005)
+++ trunk/blender/release/scripts/ui/space_userpref.py	2010-07-05 22:22:22 UTC (rev 30006)
@@ -25,11 +25,11 @@
 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 @@
     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 @@
 
     col.separator()
 
+
 def opengl_lamp_buttons(column, lamp):
     split = column.split(percentage=0.1)
 
@@ -500,7 +501,7 @@
         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 @@
 
         split_themes = layout.split(percentage=0.2)
         split_themes.prop(theme, "theme_area", expand=True)
-        
+
         split = layout.split(percentage=0.4)
-        
-        
+
+

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list