[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27505] trunk/blender/release/scripts: pep8 warnings

Campbell Barton ideasman42 at gmail.com
Mon Mar 15 00:26:18 CET 2010


Revision: 27505
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27505
Author:   campbellbarton
Date:     2010-03-15 00:26:17 +0100 (Mon, 15 Mar 2010)

Log Message:
-----------
pep8 warnings

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/bpy/__init__.py
    trunk/blender/release/scripts/op/image.py
    trunk/blender/release/scripts/op/wm.py
    trunk/blender/release/scripts/ui/properties_data_lamp.py
    trunk/blender/release/scripts/ui/properties_physics_softbody.py
    trunk/blender/release/scripts/ui/properties_texture.py
    trunk/blender/release/scripts/ui/space_userpref.py
    trunk/blender/release/scripts/ui/space_view3d_toolbar.py

Modified: trunk/blender/release/scripts/modules/bpy/__init__.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/__init__.py	2010-03-14 23:19:44 UTC (rev 27504)
+++ trunk/blender/release/scripts/modules/bpy/__init__.py	2010-03-14 23:26:17 UTC (rev 27505)
@@ -46,7 +46,7 @@
     # a bit nasty but this prevents help() and input() from locking blender
     # Ideally we could have some way for the console to replace sys.stdin but
     # python would lock blender while waiting for a return value, not easy :|
-    
+
     if not app.debug:
         _sys.stdin = None
 

Modified: trunk/blender/release/scripts/op/image.py
===================================================================
--- trunk/blender/release/scripts/op/image.py	2010-03-14 23:19:44 UTC (rev 27504)
+++ trunk/blender/release/scripts/op/image.py	2010-03-14 23:26:17 UTC (rev 27505)
@@ -65,7 +65,7 @@
     bl_idname = "image.project_edit"
     bl_label = "Project Edit"
     bl_options = {'REGISTER'}
-    
+
     _proj_hack = [""]
 
     def execute(self, context):
@@ -79,17 +79,17 @@
             image.tag = True
 
         bpy.ops.paint.image_from_view()
-        
+
         image_new = None
         for image in bpy.data.images:
             if not image.tag:
                 image_new = image
                 break
-        
+
         if not image_new:
             self.report({'ERROR'}, "Could not make new image")
             return {'CANCELLED'}
-        
+
         filename = os.path.basename(bpy.data.filename)
         filename = os.path.splitext(filename)[0]
         # filename = bpy.utils.clean_name(filename) # fixes <memory> rubbish, needs checking
@@ -98,28 +98,28 @@
             filename = os.path.join(os.path.dirname(bpy.data.filename), filename)
         else:
             filename = "//" + filename
-        
+
         obj = context.object
 
         if obj:
             filename += "_" + bpy.utils.clean_name(obj.name)
-        
+
         filename_final = filename + "." + EXT
         i = 0
 
         while os.path.exists(bpy.utils.expandpath(filename_final)):
             filename_final = filename + ("%.3d.%s" % (i, EXT))
             i += 1
-        
+
         image_new.name = os.path.basename(filename_final)
         ProjectEdit._proj_hack[0] = image_new.name
-        
+
         image_new.filename_raw = filename_final # TODO, filename raw is crummy
         image_new.file_format = 'PNG'
         image_new.save()
-        
+
         subprocess.Popen([image_editor, bpy.utils.expandpath(filename_final)])
-        
+
         return {'FINISHED'}
 
 

Modified: trunk/blender/release/scripts/op/wm.py
===================================================================
--- trunk/blender/release/scripts/op/wm.py	2010-03-14 23:19:44 UTC (rev 27504)
+++ trunk/blender/release/scripts/op/wm.py	2010-03-14 23:26:17 UTC (rev 27505)
@@ -569,7 +569,7 @@
     WM_OT_context_cycle_enum,
     WM_OT_context_cycle_int,
     WM_OT_context_modal_mouse,
-    
+
     WM_OT_url_open,
 
     WM_OT_doc_view,

Modified: trunk/blender/release/scripts/ui/properties_data_lamp.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_lamp.py	2010-03-14 23:19:44 UTC (rev 27504)
+++ trunk/blender/release/scripts/ui/properties_data_lamp.py	2010-03-14 23:26:17 UTC (rev 27505)
@@ -40,6 +40,7 @@
         engine = context.scene.render.engine
         return context.lamp and (engine in self.COMPAT_ENGINES)
 
+
 class DATA_PT_preview(DataButtonsPanel):
     bl_label = "Preview"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -47,6 +48,7 @@
     def draw(self, context):
         self.layout.template_preview(context.lamp)
 
+
 class DATA_PT_context_lamp(DataButtonsPanel):
     bl_label = ""
     bl_show_header = False

Modified: trunk/blender/release/scripts/ui/properties_physics_softbody.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_softbody.py	2010-03-14 23:19:44 UTC (rev 27504)
+++ trunk/blender/release/scripts/ui/properties_physics_softbody.py	2010-03-14 23:26:17 UTC (rev 27505)
@@ -39,11 +39,10 @@
         ob = context.object
         rd = context.scene.render
 #        return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
-# i really hate touching things i do not understand completely .. but i think this should read (bjornmose) 
+# i really hate touching things i do not understand completely .. but i think this should read (bjornmose)
         return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine)
 
 
-
 class PHYSICS_PT_softbody(PhysicButtonsPanel):
     bl_label = "Soft Body"
 

Modified: trunk/blender/release/scripts/ui/properties_texture.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_texture.py	2010-03-14 23:19:44 UTC (rev 27504)
+++ trunk/blender/release/scripts/ui/properties_texture.py	2010-03-14 23:26:17 UTC (rev 27505)
@@ -598,20 +598,20 @@
 
         layout.template_image(tex, "image", tex.image_user)
 
+
 def texture_filter_common(tex, layout):
+    layout.label(text="Filter:")
+    layout.prop(tex, "filter", text="")
+    if tex.mipmap and tex.filter in ('AREA', 'EWA', 'FELINE'):
+        if tex.filter == 'FELINE':
+            layout.prop(tex, "filter_probes", text="Probes")
+        else:
+            layout.prop(tex, "filter_eccentricity", text="Eccentricity")
 
-        layout.label(text="Filter:")
-        layout.prop(tex, "filter", text="")
-        if tex.mipmap and tex.filter in ('AREA', 'EWA', 'FELINE'):
-            if tex.filter == 'FELINE':
-                layout.prop(tex, "filter_probes", text="Probes")
-            else:
-                layout.prop(tex, "filter_eccentricity", text="Eccentricity")
-                
-        layout.prop(tex, "filter_size")
-        layout.prop(tex, "filter_size_minimum")
-        
+    layout.prop(tex, "filter_size")
+    layout.prop(tex, "filter_size_minimum")
 
+
 class TEXTURE_PT_image_sampling(TextureTypePanel):
     bl_label = "Image Sampling"
     bl_default_closed = True
@@ -650,8 +650,8 @@
         col.prop(tex, "interpolation")
 
         texture_filter_common(tex, col)
-        
 
+
 class TEXTURE_PT_image_mapping(TextureTypePanel):
     bl_label = "Image Mapping"
     bl_default_closed = True
@@ -731,13 +731,13 @@
 
         tex = context.texture
         env = tex.environment_map
-        
+
         wide_ui = context.region.width > narrowui
-        
+
         row = layout.row()
         row.prop(env, "source", expand=True)
         row.menu("TEXTURE_MT_envmap_specials", icon='DOWNARROW_HLT', text="")
-        
+
         if env.source == 'IMAGE_FILE':
             layout.template_ID(tex, "image", open="image.open")
             layout.template_image(tex, "image", tex.image_user, compact=True)
@@ -746,9 +746,9 @@
             if env.mapping == 'PLANE':
                 layout.prop(env, "zoom")
             layout.prop(env, "viewpoint_object")
-            
+
             split = layout.split()
-            
+
             col = split.column()
             col.prop(env, "ignore_layers")
             col.prop(env, "resolution")
@@ -756,7 +756,7 @@
 
             if wide_ui:
                 col = split.column(align=True)
-            
+
             col.label(text="Clipping:")
             col.prop(env, "clip_start", text="Start")
             col.prop(env, "clip_end", text="End")
@@ -771,10 +771,10 @@
         layout = self.layout
 
         tex = context.texture
-        
+
         texture_filter_common(tex, layout)
-        
 
+
 class TEXTURE_PT_musgrave(TextureTypePanel):
     bl_label = "Musgrave"
     tex_type = 'MUSGRAVE'

Modified: trunk/blender/release/scripts/ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/ui/space_userpref.py	2010-03-14 23:19:44 UTC (rev 27504)
+++ trunk/blender/release/scripts/ui/space_userpref.py	2010-03-14 23:26:17 UTC (rev 27505)
@@ -279,9 +279,9 @@
         col.label(text="Menu Open Delay:")
         col.prop(view, "open_toplevel_delay", text="Top Level")
         col.prop(view, "open_sublevel_delay", text="Sub Level")
-        
+
         col.separator()
-        
+
         col.prop(view, "show_splash")
 
 
@@ -1408,7 +1408,7 @@
 
         userpref = context.user_preferences
         used_ext = {ext.module for ext in userpref.addons}
-        
+
         # collect the categories that can be filtered on
         addons = [(mod, addon_info_get(mod)) for mod in self._addon_list()]
 
@@ -1417,7 +1417,7 @@
         cats.remove("")
 
         cats = ['All', 'Disabled', 'Enabled'] + sorted(cats)
-        
+
         bpy.types.Scene.EnumProperty(items=[(cats[i], cats[i], str(i)) for i in range(len(cats))],
             name="Category", attr="addon_filter", description="Filter add-ons by category")
         bpy.types.Scene.StringProperty(name="Search", attr="addon_search",
@@ -1447,12 +1447,12 @@
                         continue
                 else:
                     continue
-                    
+
             # Addon UI Code
             box = layout.column().box()
             column = box.column()
             row = column.row()
-            
+
             # Arrow #
             # If there are Infos or UI is expanded
             if info["expanded"]:
@@ -1499,7 +1499,7 @@
     # avoid re-initializing
     if "_init" in addon_info:
         return addon_info
-    
+
     if not addon_info:
         mod.bl_addon_info = addon_info
 

Modified: trunk/blender/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2010-03-14 23:19:44 UTC (rev 27504)
+++ trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2010-03-14 23:26:17 UTC (rev 27505)
@@ -745,7 +745,7 @@
         brush = settings.brush
 
         layout.template_curve_mapping(brush, "curve", brush=True)
-        
+
         row = layout.row(align=True)
         row.operator("brush.curve_preset", text="Sharp").shape = 'SHARP'
         row.operator("brush.curve_preset", text="Smooth").shape = 'SMOOTH'
@@ -910,16 +910,16 @@
 
         sub = col.column()
         sub.prop(ipaint, "seam_bleed")
-        
+
         row = col.row(align=True)
         row.operator("image.project_edit", text="View Edit")

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list