[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2257] trunk/py/scripts/addons: pep8 edits

Campbell Barton ideasman42 at gmail.com
Mon Aug 22 11:29:33 CEST 2011


Revision: 2257
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2257
Author:   campbellbarton
Date:     2011-08-22 09:29:33 +0000 (Mon, 22 Aug 2011)
Log Message:
-----------
pep8 edits

Modified Paths:
--------------
    trunk/py/scripts/addons/add_curve_ivygen.py
    trunk/py/scripts/addons/io_export_unreal_psk_psa.py
    trunk/py/scripts/addons/io_scene_x3d/export_x3d.py
    trunk/py/scripts/addons/light_field_tools/light_field_tools.py
    trunk/py/scripts/addons/modules/geometry_utils.py
    trunk/py/scripts/addons/object_grease_scatter.py

Modified: trunk/py/scripts/addons/add_curve_ivygen.py
===================================================================
--- trunk/py/scripts/addons/add_curve_ivygen.py	2011-08-22 07:56:27 UTC (rev 2256)
+++ trunk/py/scripts/addons/add_curve_ivygen.py	2011-08-22 09:29:33 UTC (rev 2257)
@@ -605,7 +605,6 @@
 
         return {'FINISHED'}
 
-
     def draw(self, context):
         layout = self.layout
         row = layout.row()
@@ -695,4 +694,4 @@
 
 
 if __name__ == "__main__":
-    register()
\ No newline at end of file
+    register()

Modified: trunk/py/scripts/addons/io_export_unreal_psk_psa.py
===================================================================
--- trunk/py/scripts/addons/io_export_unreal_psk_psa.py	2011-08-22 07:56:27 UTC (rev 2256)
+++ trunk/py/scripts/addons/io_export_unreal_psk_psa.py	2011-08-22 09:29:33 UTC (rev 2257)
@@ -1658,7 +1658,7 @@
         bmesh = False
     bArmatureScale = True
     bArmatureCenter = True
-    if blender_armature[0] !=None:
+    if blender_armature[0] is not None:
         if blender_armature[0].scale.x == 1 and blender_armature[0].scale.y == 1 and blender_armature[0].scale.z == 1:
             #print("Okay")
             bArmatureScale = True

Modified: trunk/py/scripts/addons/io_scene_x3d/export_x3d.py
===================================================================
--- trunk/py/scripts/addons/io_scene_x3d/export_x3d.py	2011-08-22 07:56:27 UTC (rev 2256)
+++ trunk/py/scripts/addons/io_scene_x3d/export_x3d.py	2011-08-22 09:29:33 UTC (rev 2257)
@@ -96,8 +96,8 @@
     # no digit start
     if str[0] in "1234567890+-":
         str = "_" + str
-    return str.translate({# control characters 0x0-0x1f
-                          # 0x00: "_",
+    return str.translate({  # control characters 0x0-0x1f
+                            # 0x00: "_",
                           0x01: "_",
                           0x02: "_",
                           0x03: "_",
@@ -130,19 +130,19 @@
                           0x1e: "_",
                           0x1f: "_",
 
-                          0x7f: "_", # 127
+                          0x7f: "_",  # 127
 
-                          0x20: "_", # space
-                          0x22: "_", # "
-                          0x27: "_", # '
-                          0x23: "_", # #
-                          0x2c: "_", # ,
-                          0x2e: "_", # .
-                          0x5b: "_", # [
-                          0x5d: "_", # ]
-                          0x5c: "_", # \
-                          0x7b: "_", # {
-                          0x7d: "_", # }
+                          0x20: "_",  # space
+                          0x22: "_",  # "
+                          0x27: "_",  # '
+                          0x23: "_",  # #
+                          0x2c: "_",  # ,
+                          0x2e: "_",  # .
+                          0x5b: "_",  # [
+                          0x5d: "_",  # ]
+                          0x5c: "_",  # \
+                          0x7b: "_",  # {
+                          0x7d: "_",  # }
                           })
 
 

Modified: trunk/py/scripts/addons/light_field_tools/light_field_tools.py
===================================================================
--- trunk/py/scripts/addons/light_field_tools/light_field_tools.py	2011-08-22 07:56:27 UTC (rev 2256)
+++ trunk/py/scripts/addons/light_field_tools/light_field_tools.py	2011-08-22 09:29:33 UTC (rev 2257)
@@ -336,7 +336,7 @@
         scene.objects.link(nobj)
         nobj.select = True 
                 
-        if scene.objects.active == None or scene.objects.active.mode == 'OBJECT':
+        if scene.objects.active is None or scene.objects.active.mode == 'OBJECT':
             scene.objects.active = nobj
 
 

Modified: trunk/py/scripts/addons/modules/geometry_utils.py
===================================================================
--- trunk/py/scripts/addons/modules/geometry_utils.py	2011-08-22 07:56:27 UTC (rev 2256)
+++ trunk/py/scripts/addons/modules/geometry_utils.py	2011-08-22 09:29:33 UTC (rev 2257)
@@ -136,7 +136,7 @@
     def closestP2CylinderAxis(cls, p, fv):
         n = G3.ThreePnormal(fv)
         c = G3.circumCenter(fv)
-        if(c==None):
+        if c is None:
             return None
         return G3.closestP2L(p, c, c+n)
 
@@ -163,7 +163,7 @@
         #print ("G3.closestP2Sphere")
         try:
             c = G3.centerOfSphere(fv)
-            if c==None:
+            if c is None:
                 return None
             pc = p-c
             if pc.length == 0:
@@ -178,7 +178,7 @@
     def closestP2Cylinder(cls, p, fv):
         #print ("G3.closestP2Sphere")
         c = G3.closestP2CylinderAxis(p, fv)
-        if c==None:
+        if c is None:
             return None
         r = (fv[0] - G3.centerOfSphere(fv)).length
         pc = p-c

Modified: trunk/py/scripts/addons/object_grease_scatter.py
===================================================================
--- trunk/py/scripts/addons/object_grease_scatter.py	2011-08-22 07:56:27 UTC (rev 2256)
+++ trunk/py/scripts/addons/object_grease_scatter.py	2011-08-22 09:29:33 UTC (rev 2257)
@@ -375,7 +375,7 @@
             )
     # XXX, should not be a string - TODO, add a way for scritps to select ID's
     group = StringProperty(
-            name="Group", 
+            name="Group",
             description=("Group name to use for object placement, "
                          "defaults to object name when that matches a group"))
 



More information about the Bf-extensions-cvs mailing list