diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-14 10:26:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-14 10:26:07 +0300 |
commit | a6765280f9d80467674bc730ddd4e371a4a84cf7 (patch) | |
tree | aaf8d3a9da1dc4f86e3f5da9e636254e3a333674 /release/scripts/modules/bpy_types.py | |
parent | 44be05f7f969c0428a620d04a016072146e6c36e (diff) |
py rna api: turn class.is_register into a class property rather then a class method.
eg:
if MySybclass.is_registered:
...
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 4eb712a65cc..38dc037a61d 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -572,6 +572,9 @@ class RNAMeta(type): return result + @property + def is_registered(cls): + return "bl_rna" in cls.__dict__ import collections |