PyAPI: add API call to get an operators type

Getting the instance leaks memory and was only meant to be used for
generating docs.
This commit is contained in:
Campbell Barton
2018-09-13 18:16:06 +10:00
parent 9900addf11
commit a6fc718029
5 changed files with 24 additions and 5 deletions

View File

@@ -731,14 +731,14 @@ def BuildRNAInfo():
operators = dir(op_mod)
for op in sorted(operators):
try:
rna_prop = getattr(op_mod, op).get_rna()
rna_prop = getattr(op_mod, op).get_rna_type()
except AttributeError:
rna_prop = None
except TypeError:
rna_prop = None
if rna_prop:
GetInfoOperatorRNA(rna_prop.bl_rna)
GetInfoOperatorRNA(rna_prop)
for rna_info in InfoOperatorRNA.global_lookup.values():
rna_info.build()