Code Cleanup: style, spelling and pep8 edits
authorCampbell Barton <ideasman42@gmail.com>
Tue, 19 Nov 2013 16:38:18 +0000 (03:38 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 19 Nov 2013 16:40:10 +0000 (03:40 +1100)
19 files changed:
release/scripts/modules/addon_utils.py
release/scripts/modules/bpy/path.py
release/scripts/modules/rna_info.py
release/scripts/startup/bl_operators/anim.py
release/scripts/startup/bl_operators/view3d.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_data_mesh.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_time.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/blenkernel/BKE_customdata.h
source/blender/blenkernel/intern/bmfont.c
source/blender/editors/interface/interface.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/modifiers/intern/MOD_mask.c

index 6f08f70458bac4a065ee219228ab509e921da6db..e76bcc027513501367fbeeb86cbdba5b5fd1b56f 100644 (file)
@@ -35,6 +35,7 @@ error_duplicates = False
 error_encoding = False
 addons_fake_modules = {}
 
+
 def paths():
     # RELEASE SCRIPTS: official scripts distributed in Blender releases
     addon_paths = _bpy.utils.script_paths("addons")
index da1a52e560dc43bd18ea1dc05ffa2a0f62bfee3f..ccc9df93b0df1a26895c040b259022769f24d7a2 100644 (file)
@@ -321,7 +321,7 @@ def reduce_dirs(dirs):
     """
     dirs = list({_os.path.normpath(_os.path.abspath(d)) for d in dirs})
     dirs.sort(key=lambda d: len(d))
-    for i in range(len(dirs) -1, -1, -1):
+    for i in range(len(dirs) - 1, -1, -1):
         for j in range(i):
             print(i, j)
             if len(dirs[i]) == len(dirs[j]):
index 60b11884e30b74b8b5c117a80b822193d8b20b34..3643ad89ea666bdfb65c5d9ae0a05d2a003d7ad6 100644 (file)
@@ -98,6 +98,7 @@ class InfoStructRNA:
         )
 
     global_lookup = {}
+
     def __init__(self, rna_type):
         self.bl_rna = rna_type
 
index 3c4b66514de7fb24320fdb5b6300ff806849e181..41f39b90464dedc9e91a70f746bdb1c17f0002a1 100644 (file)
@@ -281,4 +281,3 @@ class ClearUselessActions(Operator):
         self.report({'INFO'}, "Removed %d empty and/or fake-user only Actions"
                               % removed)
         return {'FINISHED'}
-
index bf51dc5672a22716f9af620cc57443f0662a6b39..2ec095d2e7b7bcb0489ee5b008bd725a7fb21e8e 100644 (file)
@@ -111,7 +111,6 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
         return self.execute(context)
 
 
-
 class VIEW3D_OT_edit_mesh_extrude_shrink_fatten(Operator):
     "Extrude and move along individual normals"
     bl_label = "Extrude and Move on Individual Normals"
index 5269d151bdce1434dfb990239ff30a76dbb99e72..2171ce67fd3275285a133b2cfd3957891fc33d97 100644 (file)
@@ -306,7 +306,7 @@ class DATA_PT_font(CurveButtonsPanel, Panel):
         row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink")
 
         #layout.prop(text, "font")
-        
+
         row = layout.split(percentage=0.25)
         row.label(text="Body Text:")
         row.prop(text, "body", text="")
index e8d0bec6524a28ac2625330e895331ecffc8ad99..f59d479c50919ca54b753790e3ead97232d46b35 100644 (file)
@@ -339,7 +339,7 @@ class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
         col = row.column(align=True)
         col.operator("mesh.uv_texture_add", icon='ZOOMIN', text="")
         col.operator("mesh.uv_texture_remove", icon='ZOOMOUT', text="")
-        
+
         if lay:
             layout.prop(lay, "name")
 
@@ -362,7 +362,7 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
         col = row.column(align=True)
         col.operator("mesh.vertex_color_add", icon='ZOOMIN', text="")
         col.operator("mesh.vertex_color_remove", icon='ZOOMOUT', text="")
-        
+
         if lay:
             layout.prop(lay, "name")
 
index 4d5d3e6936a7dd8aa7c3bed0282edbfefb482c41..f8a37e2768f8caee9a3c27ab2f46fa2191a63b55 100644 (file)
@@ -1218,27 +1218,27 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
         row = col.row(align=True)
         row.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text="Density")
         row.prop(psys, "invert_vertex_group_density", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-        
+
         row = col.row(align=True)
         row.prop_search(psys, "vertex_group_length", ob, "vertex_groups", text="Length")
         row.prop(psys, "invert_vertex_group_length", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-        
+
         row = col.row(align=True)
         row.prop_search(psys, "vertex_group_clump", ob, "vertex_groups", text="Clump")
         row.prop(psys, "invert_vertex_group_clump", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-        
+
         row = col.row(align=True)
         row.prop_search(psys, "vertex_group_kink", ob, "vertex_groups", text="Kink")
         row.prop(psys, "invert_vertex_group_kink", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-        
+
         row = col.row(align=True)
         row.prop_search(psys, "vertex_group_roughness_1", ob, "vertex_groups", text="Roughness 1")
         row.prop(psys, "invert_vertex_group_roughness_1", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-        
+
         row = col.row(align=True)
         row.prop_search(psys, "vertex_group_roughness_2", ob, "vertex_groups", text="Roughness 2")
         row.prop(psys, "invert_vertex_group_roughness_2", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-        
+
         row = col.row(align=True)
         row.prop_search(psys, "vertex_group_roughness_end", ob, "vertex_groups", text="Roughness End")
         row.prop(psys, "invert_vertex_group_roughness_end", text="", toggle=True, icon='ARROW_LEFTRIGHT')
index cc2d1dc1e66a85a62f3fe7cb5878d579b84e1a8f..397b74116c22cca1f36685c0e63065ea24621325 100644 (file)
@@ -727,7 +727,7 @@ class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel):
         tex_slot_mask = brush.mask_texture_slot
 
         col = layout.column()
-        
+
         col.label(text="Curve:")
 
         row = col.row(align=True)
index 525925947489b39e73f72701e43b1f0037a8fedb..a7a648e3c448ca20aac77b895f56ad3056b4cefa 100644 (file)
@@ -169,7 +169,6 @@ class INFO_MT_file_external_data(Menu):
         layout.operator("file.find_missing_files")
 
 
-
 class INFO_MT_game(Menu):
     bl_label = "Game"
 
index 8d577bb22c5e6225d4025cc06fc0584be54a89d6..46234b638ebc1bd554effc5c3aaa03b9115f1ad7 100644 (file)
@@ -364,7 +364,7 @@ class NODE_PT_backdrop(Panel):
         col.prop(snode, "backdrop_x", text="X")
         col.prop(snode, "backdrop_y", text="Y")
         col.operator("node.backimage_move", text="Move")
-        
+
         layout.operator("node.backimage_fit", text="Fit")
 
 
index 700d100471852cd4a188849924e96b50f7ec802e..4cb67181fdbdc180d0df7eee4e09c24cd728cbef 100644 (file)
@@ -228,9 +228,9 @@ def marker_menu_generic(layout):
 
     layout.operator("marker.rename", text="Rename Marker")
     layout.operator("marker.move", text="Grab/Move Marker")
-    
+
     layout.separator()
-    
+
     layout.operator("screen.marker_jump", text="Jump to Next Marker").next = True
     layout.operator("screen.marker_jump", text="Jump to Previous Marker").next = False
 
index ec9c7ae9ffc35c4d6629991e0284b5236554e85e..c49fa6768feae2e03b567b9112a62268542404a2 100644 (file)
@@ -833,6 +833,7 @@ class VIEW3D_MT_select_paint_mask_vertex(Menu):
 
 # XXX: INFO_MT_ names used to keep backwards compatibility (Addons etc that hook into the menu)
 
+
 class INFO_MT_mesh_add(Menu):
     bl_idname = "INFO_MT_mesh_add"
     bl_label = "Mesh"
@@ -1597,7 +1598,7 @@ class VIEW3D_MT_hide_mask(Menu):
         props = layout.operator("paint.mask_flood_fill", text="Clear Mask")
         props.mode = 'VALUE'
         props.value = 0
-        
+
         props = layout.operator("view3d.select_border", text="Box Mask")
         props = layout.operator("paint.mask_lasso_gesture", text="Lasso Mask")
 
@@ -2799,7 +2800,7 @@ class VIEW3D_PT_view3d_shading(Panel):
         if not scene.render.use_shading_nodes:
             col.prop(gs, "material_mode", text="")
             col.prop(view, "show_textured_solid")
-        
+
         if view.viewport_shade == 'SOLID':
             col.prop(view, "use_matcap")
             if view.use_matcap:
index 8c86cc6c8a5f96c37e889bfdd935aead850cb6ca..cd3c238fe86467ab16621178da0333b3c5ecf541 100644 (file)
@@ -740,6 +740,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
 
             col.prop(brush, "vertex_tool", text="Blend")
 
+
 class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
     bl_label = "Overlay"
     bl_options = {'DEFAULT_CLOSED'}
@@ -753,8 +754,7 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
                  context.vertex_paint_object or
                  context.weight_paint_object or
                  context.image_paint_object))
-                                
-                                
+
     def draw(self, context):
         layout = self.layout
 
@@ -764,7 +764,7 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
         tex_slot_mask = brush.mask_texture_slot
 
         col = layout.column()
-        
+
         col.label(text="Curve:")
 
         row = col.row(align=True)
@@ -778,7 +778,7 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
         sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
 
         col.active = brush.brush_capabilities.has_overlay
-        
+
         if context.image_paint_object or context.sculpt_object or context.vertex_paint_object:
             col.label(text="Texture:")
             row = col.row(align=True)
index 5a2839227075d4e717d03aca0175c6ba4badf48a..f28d16427cf674ae7aedbe912964f3862031a302 100644 (file)
@@ -147,14 +147,14 @@ void *CustomData_add_layer_named(struct CustomData *data, int type, int alloctyp
                                  void *layer, int totelem, const char *name);
 
 /* frees the active or first data layer with the give type.
- * returns 1 on succes, 0 if no layer with the given type is found
+ * returns 1 on success, 0 if no layer with the given type is found
  *
  * in editmode, use EDBM_data_layer_free instead of this function
  */
 bool CustomData_free_layer(struct CustomData *data, int type, int totelem, int index);
 
 /* frees the layer index with the give type.
- * returns 1 on succes, 0 if no layer with the given type is found
+ * returns 1 on success, 0 if no layer with the given type is found
  *
  * in editmode, use EDBM_data_layer_free instead of this function
  */
index 2d7249b54f54769e89d0457db509ec88915a648f..732c0c35feb1e639eb85645e328947a89aa95d08 100644 (file)
@@ -204,7 +204,7 @@ void detectBitmapFont(ImBuf *ibuf)
                                                        printf("detectBitmapFont :Unsupported version %d\n", (int)version);
                                                }
 
-                                               /* on succes ibuf->userdata points to the bitmapfont */
+                                               /* on success ibuf->userdata points to the bitmapfont */
                                                if (ibuf->userdata) {
                                                        break;
                                                }
index 6ee097b066f29f0641c56cda75065e8256071f0d..83b100db1b23e5d9b22063f891303c2c05a38367 100644 (file)
@@ -3242,7 +3242,8 @@ int autocomplete_end(AutoComplete *autocpl, char *autoname)
        if (autocpl->truncate[0]) {
                if (autocpl->matches == 1) {
                        match = AUTOCOMPLETE_FULL_MATCH;
-               } else {
+               }
+               else {
                        match = AUTOCOMPLETE_PARTIAL_MATCH;
                }
                BLI_strncpy(autoname, autocpl->truncate, autocpl->maxlen);
index 6d04b9b88265ee5550eddf43e0d09e7013f3d2b8..373e57d570853180c6a784ccbbc8ab01ae1428cc 100644 (file)
@@ -218,7 +218,7 @@ typedef struct FlyInfo {
        short persp_backup; /* remember if were ortho or not, only used for restoring the view if it was a ortho view */
 
        /* are we flying an ortho camera in perspective view,
-        * which was originall in ortho view?
+        * which was originally in ortho view?
         * could probably figure it out but better be explicit */
        bool is_ortho_cam;
        void *obtfm; /* backup the objects transform */
index 2822cf6925b2739ae359888e3adb655f49081006..839e30d9c1a93c0a9bbcb1d343ff74ffb72d469f 100644 (file)
@@ -172,7 +172,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
                }
                
                /* if no dverts (i.e. no data for vertex groups exists), we've got an
-                * inconsistent situation, so free hashes and return oirginal mesh
+                * inconsistent situation, so free hashes and return original mesh
                 */
                dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
                if (dvert == NULL) {