Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-04-11 14:16:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-11 14:16:18 +0400
commit2c6a82dd0a9178efcaee0c3f8bbf3e5120a3dcaa (patch)
treee85b54189d81d1e2cac279fa40e8c5d0f95f3ff8 /release/scripts/modules/bpy_types.py
parentbf77ad00b3545107417104fc4f20e1f2a1ff0884 (diff)
py api: minor change to operator attribute access, do identity comparison with None (no functional change).
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r--release/scripts/modules/bpy_types.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 85a532e9a27..55ba82c5817 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -555,21 +555,21 @@ class Operator(StructRNA, metaclass=OrderedMeta):
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)