diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-01 10:02:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-01 10:02:51 +0300 |
commit | c78c4252669a83c90188d90df6089f6e3a7b31c6 (patch) | |
tree | 5c103b00bca72751d654479333a13ef56673e663 /release/scripts/modules | |
parent | 06ba233374dc9f3dfd2efb904d067abc9f04e3de (diff) |
PyAPI: expose 'bl_options' for operators in bpy.ops
Useful for checking which operators are only for internal use.
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bpy/ops.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py index 4e226f80f79..c2245d908b5 100644 --- a/release/scripts/modules/bpy/ops.py +++ b/release/scripts/modules/bpy/ops.py @@ -27,6 +27,7 @@ op_poll = ops_module.poll op_call = ops_module.call op_as_string = ops_module.as_string op_get_rna_type = ops_module.get_rna_type +op_get_bl_options = ops_module.get_bl_options class BPyOps: @@ -209,6 +210,10 @@ class BPyOpsSubModOp: """Internal function for introspection""" return op_get_rna_type(self.idname()) + @property + def bl_options(self): + return op_get_bl_options(self.idname()) + def __repr__(self): # useful display, repr(op) # import bpy return op_as_string(self.idname()) |