Cleanup: pep8 & redundant vars
authorCampbell Barton <ideasman42@gmail.com>
Tue, 22 Jul 2014 02:03:15 +0000 (12:03 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 22 Jul 2014 02:03:15 +0000 (12:03 +1000)
build_files/buildbot/master.cfg
doc/manpage/blender.1.py
intern/cycles/blender/addon/engine.py
intern/cycles/blender/addon/ui.py
release/scripts/modules/rna_prop_ui.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
tests/python/bl_mesh_modifiers.py

index 4480b7e09d9d01f5319eca76ab68c350549490a5..07b82165966daa49ca44abcb3ba4a0aadb2fa41d 100644 (file)
@@ -95,7 +95,7 @@ def schedule_force_build(name):
         revision=forcesched.FixedParameter(name="revision", default=""),
         repository=forcesched.FixedParameter(name="repository", default=""),
         project=forcesched.FixedParameter(name="project", default=""),
-            properties=[]))
+        properties=[]))
 
 
 def schedule_build(name, hour, minute=0):
index 32e8cc06857d17f43a0166c1557f83c75b04283d..77f5c5e4f168c9e4765f99515d3b97960448d9ec 100755 (executable)
@@ -31,7 +31,6 @@ and <output-filename> is where to write the generated man page.
 # <pep8 compliant>
 
 import subprocess
-import os
 import sys
 
 import time
index 21a92a29cfc0ad5198aef5ddd21fe95038ca3ccc..18235eca790e0a83a254f475374114b7da2ad1df 100644 (file)
@@ -65,6 +65,7 @@ def bake(engine, obj, pass_type, pixel_array, num_pixels, depth, result):
     if session is not None:
         _cycles.bake(engine.session, obj.as_pointer(), pass_type, pixel_array.as_pointer(), num_pixels, depth, result.as_pointer())
 
+
 def reset(engine, data, scene):
     import _cycles
     data = data.as_pointer()
index 35ae8ecb7c1a1161c7700df72c0ffa3870c2e5c6..4a13f265d14e812c2234ecdab1d0b168387551e6 100644 (file)
@@ -1244,13 +1244,13 @@ class CyclesRender_PT_bake(CyclesButtonsPanel, Panel):
         scene = context.scene
         cscene = scene.cycles
         cbk = scene.render.bake
-    
+
         layout.operator("object.bake", icon='RENDER_STILL').type = cscene.bake_type
-        
+
         col = layout.column()
         col.prop(cscene, "bake_type")
         col.separator()
-        
+
         split = layout.split()
 
         col = split.column()
index e9c96d59eaedd6bcec3223785ae0d82bc2c66694..e278b0d20fe3019720d3fca41fbaa2dbd4c6ee80 100644 (file)
@@ -57,6 +57,7 @@ def rna_idprop_ui_prop_clear(item, prop):
     except:
         pass
 
+
 def rna_idprop_context_value(context, context_member, property_type):
     space = context.space_data
 
@@ -73,11 +74,13 @@ def rna_idprop_context_value(context, context_member, property_type):
 
     return rna_item, context_member
 
+
 def rna_idprop_has_properties(rna_item):
     keys = rna_item.keys()
     nbr_props = len(keys)
     return (nbr_props > 1) or (nbr_props and '_RNA_UI' not in keys)
 
+
 def draw(layout, context, context_member, property_type, use_edit=True):
 
     def assign_props(prop, val, key):
index 29b75e64fca7b6e307828a3459db24d4d06368c7..d1d2341a614b3f85a42c0fba5e8457b33dcc695c 100644 (file)
@@ -249,9 +249,9 @@ class SubdivisionSet(Operator):
                 if mod.type == 'MULTIRES':
                     if not relative:
                         if level > mod.total_levels:
-                           sub = level - mod.total_levels
-                           for i in range (0, sub):
-                               bpy.ops.object.multires_subdivide(modifier="Multires")
+                            sub = level - mod.total_levels
+                            for i in range (0, sub):
+                                bpy.ops.object.multires_subdivide(modifier="Multires")
 
                         if obj.mode == 'SCULPT':
                             if mod.sculpt_levels != level:
index 626cdaa8b1b413fd80ca505c9f6179179afa8e7c..faf0d4cb0e8e6994c6ceb8481fb199d006a879e3 100644 (file)
@@ -1172,7 +1172,6 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
             col = split.column()
             factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
 
-
         layout.separator()
 
         if not isinstance(idblock, ParticleSettings):
index 96ad70e0015a949f4550c6b955f622277f423fc6..13aad4c38881e01030b49abeb47a5a81dda646bf 100644 (file)
@@ -261,7 +261,7 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
         layout = self.layout
 
         sc = context.space_data
-        clip = sc.clip
+        clip = sc.clip
 
         col = layout.column(align=True)
         row = col.row(align=True)
index 978c326c83ad53162b716fe24f57df9f83ecdbb8..95384c1ee8bd4fc593be739b1dc3dbba475e3253 100644 (file)
@@ -160,14 +160,14 @@ class SEQUENCER_MT_view(Menu):
         if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
             layout.operator_context = 'INVOKE_REGION_PREVIEW'
             layout.operator("sequencer.view_all_preview", text="Fit preview in window")
-            
+
             layout.separator()
-            
+
             ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
 
             for a, b in ratios:
                 layout.operator("sequencer.view_zoom_ratio", text=iface_("Zoom %d:%d") % (a, b), translate=False).ratio = a / b
-            
+
             layout.separator()
 
             layout.operator_context = 'INVOKE_DEFAULT'
index 256110a5d806332c1dab701c8423d4d5647dc896..5e7e91c1b8849147a98ac179c279ec85d68fe666 100644 (file)
@@ -1036,7 +1036,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
 
 class TEXTURE_UL_texpaintslots(UIList):
     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
-        ma = data
+        ma = data
         ima = item
 
         if self.layout_type in {'DEFAULT', 'COMPACT'}:
@@ -1061,7 +1061,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
         layout = self.layout
 
         settings = context.tool_settings.image_paint
-        brush = settings.brush
+        brush = settings.brush
 
         ob = context.active_object
         col = layout.column()
@@ -1383,7 +1383,7 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
 
     def draw(self, context):
         layout = self.layout
-        scene = context.scene
+        scene = context.scene
 
         toolsettings = context.tool_settings
         sculpt = toolsettings.sculpt
@@ -1604,7 +1604,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel):
         mesh = ob.data
         toolsettings = context.tool_settings
         ipaint = toolsettings.image_paint
-        settings = toolsettings.image_paint
+        settings = toolsettings.image_paint
 
         col = layout.column()
 
index b3f77aed96b6be3ccf6231aed9f38689f970e530..1c05eaafa0d485ffd84bc58bf900c730d1271848 100644 (file)
@@ -434,11 +434,6 @@ def modifier_hook_add(scene, obj, use_vgroup=True):
         for v in mesh.vertices:
             v.select = False
 
-        if IS_BMESH:
-            face_verts = mesh_bmesh_poly_vertices(mesh.polygons[0])
-        else:
-            face_verts = mesh.faces[0].vertices[:]
-
         for i in mesh.faces[0].vertices:
             mesh.vertices[i].select = True