pep8 warnings
authorCampbell Barton <ideasman42@gmail.com>
Sun, 14 Mar 2010 23:26:17 +0000 (23:26 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 14 Mar 2010 23:26:17 +0000 (23:26 +0000)
release/scripts/modules/bpy/__init__.py
release/scripts/op/image.py
release/scripts/op/wm.py
release/scripts/ui/properties_data_lamp.py
release/scripts/ui/properties_physics_softbody.py
release/scripts/ui/properties_texture.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_view3d_toolbar.py

index 234d7993789192cff247446137a32b4a124b83ca..8f6bada65612937745666fc05c23782af8300547 100644 (file)
@@ -46,7 +46,7 @@ def _main():
     # 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
 
index b2433481b84a5c589945cd861f75eebf7254905d..0d20a9639b92add31e5074d6a042af98f420a960 100644 (file)
@@ -65,7 +65,7 @@ class ProjectEdit(bpy.types.Operator):
     bl_idname = "image.project_edit"
     bl_label = "Project Edit"
     bl_options = {'REGISTER'}
-    
+
     _proj_hack = [""]
 
     def execute(self, context):
@@ -79,17 +79,17 @@ class ProjectEdit(bpy.types.Operator):
             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 @@ class ProjectEdit(bpy.types.Operator):
             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'}
 
 
index 07a7afe026e8231ac376c585772473ac5c1e4b0e..0a333db421b6450e7737c4916a9672ccf727c202 100644 (file)
@@ -569,7 +569,7 @@ classes = [
     WM_OT_context_cycle_enum,
     WM_OT_context_cycle_int,
     WM_OT_context_modal_mouse,
-    
+
     WM_OT_url_open,
 
     WM_OT_doc_view,
index e72cfa80012865ddd0e84f83068ebef371a7db68..ceafb121c09ca28f3e5fa3059d7a622ba66ee560 100644 (file)
@@ -40,6 +40,7 @@ class DataButtonsPanel(bpy.types.Panel):
         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 @@ class DATA_PT_preview(DataButtonsPanel):
     def draw(self, context):
         self.layout.template_preview(context.lamp)
 
+
 class DATA_PT_context_lamp(DataButtonsPanel):
     bl_label = ""
     bl_show_header = False
index ed4c24b29b3ccfd62201c0012c39235b4c21c835..a582bfa520b77122ac0036c457da27b8a4d9e326 100644 (file)
@@ -39,11 +39,10 @@ class PhysicButtonsPanel(bpy.types.Panel):
         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"
 
index 4cdd404a4054d45b904e72ec085969d028065d58..4616fc5f8ab3babdaad606af166faad406a3140a 100644 (file)
@@ -598,19 +598,19 @@ class TEXTURE_PT_image(TextureTypePanel):
 
         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.prop(tex, "filter_size")
+    layout.prop(tex, "filter_size_minimum")
 
-        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")
-        
 
 class TEXTURE_PT_image_sampling(TextureTypePanel):
     bl_label = "Image Sampling"
@@ -650,7 +650,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel):
         col.prop(tex, "interpolation")
 
         texture_filter_common(tex, col)
-        
+
 
 class TEXTURE_PT_image_mapping(TextureTypePanel):
     bl_label = "Image Mapping"
@@ -731,13 +731,13 @@ class TEXTURE_PT_envmap(TextureTypePanel):
 
         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 @@ class TEXTURE_PT_envmap(TextureTypePanel):
             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 @@ class TEXTURE_PT_envmap(TextureTypePanel):
 
             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,9 +771,9 @@ class TEXTURE_PT_envmap_sampling(TextureTypePanel):
         layout = self.layout
 
         tex = context.texture
-        
+
         texture_filter_common(tex, layout)
-        
+
 
 class TEXTURE_PT_musgrave(TextureTypePanel):
     bl_label = "Musgrave"
index 9dc539aa4c6000929b499afb5f272a9f5aee5dc0..64b79614a6f6e7d8914ea8ffe3e76560b59dcc41 100644 (file)
@@ -279,9 +279,9 @@ class USERPREF_PT_interface(bpy.types.Panel):
         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 @@ class USERPREF_PT_addons(bpy.types.Panel):
 
         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 @@ class USERPREF_PT_addons(bpy.types.Panel):
         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 @@ class USERPREF_PT_addons(bpy.types.Panel):
                         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 @@ def addon_info_get(mod, info_basis={"name": "", "author": "", "version": "", "bl
     # avoid re-initializing
     if "_init" in addon_info:
         return addon_info
-    
+
     if not addon_info:
         mod.bl_addon_info = addon_info
 
index d702c801b92d648832df223a9416767fa6772341..c52c93e2189dd3891999916ecb7c299cb847f9d1 100644 (file)
@@ -745,7 +745,7 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel):
         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 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel):
 
         sub = col.column()
         sub.prop(ipaint, "seam_bleed")
-        
+
         row = col.row(align=True)
         row.operator("image.project_edit", text="View Edit")
         row.operator("image.project_apply", text="Apply")
 
         col.prop(ipaint, "screen_grab_size", text="")
-        
+
         sub = col.column()
         sub.operator("paint.project_image")
-        
+
         sub.operator("image.save_dirty", text="Save Edited")