PyAPI: expose 'bl_options' for operators in bpy.ops
Useful for checking which operators are only for internal use.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user