[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55958] trunk/blender/release/scripts/ modules/bpy_types.py: py api: minor change to operator attribute access, do identity comparison with None (no functional change).
Campbell Barton
ideasman42 at gmail.com
Thu Apr 11 12:16:18 CEST 2013
Revision: 55958
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55958
Author: campbellbarton
Date: 2013-04-11 10:16:18 +0000 (Thu, 11 Apr 2013)
Log Message:
-----------
py api: minor change to operator attribute access, do identity comparison with None (no functional change).
Modified Paths:
--------------
trunk/blender/release/scripts/modules/bpy_types.py
Modified: trunk/blender/release/scripts/modules/bpy_types.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy_types.py 2013-04-11 09:57:26 UTC (rev 55957)
+++ trunk/blender/release/scripts/modules/bpy_types.py 2013-04-11 10:16:18 UTC (rev 55958)
@@ -555,21 +555,21 @@
def __getattribute__(self, attr):
properties = StructRNA.path_resolve(self, "properties")
bl_rna = getattr(properties, "bl_rna", None)
- if bl_rna and attr in bl_rna.properties:
+ if (bl_rna is not None) and (attr in bl_rna.properties):
return getattr(properties, attr)
return super().__getattribute__(attr)
def __setattr__(self, attr, value):
properties = StructRNA.path_resolve(self, "properties")
bl_rna = getattr(properties, "bl_rna", None)
- if bl_rna and attr in bl_rna.properties:
+ if (bl_rna is not None) and (attr in bl_rna.properties):
return setattr(properties, attr, value)
return super().__setattr__(attr, value)
def __delattr__(self, attr):
properties = StructRNA.path_resolve(self, "properties")
bl_rna = getattr(properties, "bl_rna", None)
- if bl_rna and attr in bl_rna.properties:
+ if (bl_rna is not None) and (attr in bl_rna.properties):
return delattr(properties, attr)
return super().__delattr__(attr)
More information about the Bf-blender-cvs
mailing list