py api: minor change to operator attribute access, do identity comparison with None (no functional change).
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user