[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35858] trunk/blender: use 'is None' rather then '== None' as suggested by python docs & mis-spelling.

Campbell Barton ideasman42 at gmail.com
Tue Mar 29 06:16:55 CEST 2011


Revision: 35858
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35858
Author:   campbellbarton
Date:     2011-03-29 04:16:55 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
use 'is None' rather then '== None' as suggested by python docs & mis-spelling.

Modified Paths:
--------------
    trunk/blender/intern/mikktspace/mikktspace.c
    trunk/blender/release/scripts/modules/bpy/utils.py
    trunk/blender/release/scripts/startup/bl_ui/properties_particle.py

Modified: trunk/blender/intern/mikktspace/mikktspace.c
===================================================================
--- trunk/blender/intern/mikktspace/mikktspace.c	2011-03-29 01:47:03 UTC (rev 35857)
+++ trunk/blender/intern/mikktspace/mikktspace.c	2011-03-29 04:16:55 UTC (rev 35858)
@@ -645,7 +645,7 @@
 		int iL=iL_in, iR=iR_in;
 		assert((iR_in-iL_in)>0);	// at least 2 entries
 
-		// seperate (by fSep) all points between iL_in and iR_in in pTmpVert[]
+		// separate (by fSep) all points between iL_in and iR_in in pTmpVert[]
 		while(iL < iR)
 		{
 			tbool bReadyLeftSwap = TFALSE, bReadyRightSwap = TFALSE;

Modified: trunk/blender/release/scripts/modules/bpy/utils.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/utils.py	2011-03-29 01:47:03 UTC (rev 35857)
+++ trunk/blender/release/scripts/modules/bpy/utils.py	2011-03-29 04:16:55 UTC (rev 35858)
@@ -195,7 +195,7 @@
                 for mod in modules_from_path(path, loaded_modules):
                     test_register(mod)
 
-    # deal with addons seperately
+    # deal with addons separately
     _addon_utils.reset_all(reload_scripts)
 
     # run the active integration preset

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_particle.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_particle.py	2011-03-29 01:47:03 UTC (rev 35857)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_particle.py	2011-03-29 04:16:55 UTC (rev 35858)
@@ -29,7 +29,7 @@
 
 
 def particle_panel_enabled(context, psys):
-    if psys == None:
+    if psys is None:
         return True
     phystype = psys.settings.physics_type
     if psys.settings.type in {'EMITTER', 'REACTOR'} and phystype in {'NO', 'KEYED'}:
@@ -98,10 +98,10 @@
             col.operator("object.particle_system_add", icon='ZOOMIN', text="")
             col.operator("object.particle_system_remove", icon='ZOOMOUT', text="")
 
-        if psys == None:
+        if psys is None:
             part = particle_get_settings(context)
 
-            if part == None:
+            if part is None:
                 return
 
             layout.template_ID(context.space_data, "pin_id")
@@ -192,7 +192,7 @@
         if settings.is_fluid:
             return False
         if particle_panel_poll(PARTICLE_PT_emission, context):
-            return psys == None or not context.particle_system.point_cache.use_external
+            return psys is None or not context.particle_system.point_cache.use_external
         return False
 
     def draw(self, context):
@@ -201,7 +201,7 @@
         psys = context.particle_system
         part = particle_get_settings(context)
 
-        layout.enabled = particle_panel_enabled(context, psys) and (psys == None or not psys.has_multiple_caches)
+        layout.enabled = particle_panel_enabled(context, psys) and (psys is None or not psys.has_multiple_caches)
 
         row = layout.row()
         row.active = part.distribution != 'GRID'
@@ -341,7 +341,7 @@
 
             if settings.type == 'HAIR' and not settings.use_advanced_hair:
                 return False
-            return settings.physics_type != 'BOIDS' and (psys == None or not psys.point_cache.use_external)
+            return settings.physics_type != 'BOIDS' and (psys is None or not psys.point_cache.use_external)
         else:
             return False
 
@@ -391,7 +391,7 @@
 
             if settings.type == 'HAIR' and not settings.use_advanced_hair:
                 return False
-            return settings.physics_type != 'BOIDS' and (psys == None or not psys.point_cache.use_external)
+            return settings.physics_type != 'BOIDS' and (psys is None or not psys.point_cache.use_external)
         else:
             return False
 
@@ -440,7 +440,7 @@
 
             if settings.type == 'HAIR' and not settings.use_advanced_hair:
                 return False
-            return psys == None or not psys.point_cache.use_external
+            return psys is None or not psys.point_cache.use_external
         else:
             return False
 
@@ -1143,7 +1143,7 @@
 
     @classmethod
     def poll(cls, context):
-        if context.particle_system == None:
+        if context.particle_system is None:
             return False
         return particle_panel_poll(cls, context)
 




More information about the Bf-blender-cvs mailing list