forked from bartvdbraak/blender
Fix rna_info.py module, broken by recent changes in bpy.types presumably.
Hope fix is OK, seems to work with API generation script at least.
This commit is contained in:
parent
adb647fb92
commit
c4bbf1e4b0
@ -632,7 +632,7 @@ def BuildRNAInfo():
|
|||||||
|
|
||||||
for rna_prop_ptr in (getattr(rna_prop, "fixed_type", None), getattr(rna_prop, "srna", None)):
|
for rna_prop_ptr in (getattr(rna_prop, "fixed_type", None), getattr(rna_prop, "srna", None)):
|
||||||
# Does this property point to me?
|
# Does this property point to me?
|
||||||
if rna_prop_ptr:
|
if rna_prop_ptr and rna_prop_ptr.identifier in rna_references_dict:
|
||||||
rna_references_dict[rna_prop_ptr.identifier].append(
|
rna_references_dict[rna_prop_ptr.identifier].append(
|
||||||
"%s.%s" % (rna_struct_path, rna_prop_identifier))
|
"%s.%s" % (rna_struct_path, rna_prop_identifier))
|
||||||
|
|
||||||
@ -645,7 +645,7 @@ def BuildRNAInfo():
|
|||||||
rna_prop_ptr = getattr(rna_prop, "fixed_type", None)
|
rna_prop_ptr = getattr(rna_prop, "fixed_type", None)
|
||||||
|
|
||||||
# Does this property point to me?
|
# Does this property point to me?
|
||||||
if rna_prop_ptr:
|
if rna_prop_ptr and rna_prop_ptr.identifier in rna_references_dict:
|
||||||
rna_references_dict[rna_prop_ptr.identifier].append(
|
rna_references_dict[rna_prop_ptr.identifier].append(
|
||||||
"%s.%s" % (rna_struct_path, rna_func.identifier))
|
"%s.%s" % (rna_struct_path, rna_func.identifier))
|
||||||
|
|
||||||
@ -680,7 +680,11 @@ def BuildRNAInfo():
|
|||||||
for rna_info_prop in InfoFunctionRNA.global_lookup.values():
|
for rna_info_prop in InfoFunctionRNA.global_lookup.values():
|
||||||
rna_info_prop.build()
|
rna_info_prop.build()
|
||||||
|
|
||||||
for rna_info in InfoStructRNA.global_lookup.values():
|
done_keys = set()
|
||||||
|
new_keys = set(InfoStructRNA.global_lookup.keys())
|
||||||
|
while new_keys:
|
||||||
|
for rna_key in new_keys:
|
||||||
|
rna_info = InfoStructRNA.global_lookup[rna_key]
|
||||||
rna_info.build()
|
rna_info.build()
|
||||||
for prop in rna_info.properties:
|
for prop in rna_info.properties:
|
||||||
prop.build()
|
prop.build()
|
||||||
@ -690,6 +694,8 @@ def BuildRNAInfo():
|
|||||||
prop.build()
|
prop.build()
|
||||||
for prop in func.return_values:
|
for prop in func.return_values:
|
||||||
prop.build()
|
prop.build()
|
||||||
|
done_keys |= new_keys
|
||||||
|
new_keys = set(InfoStructRNA.global_lookup.keys()) - done_keys
|
||||||
|
|
||||||
# there are too many invalid defaults, unless we intend to fix, leave this off
|
# there are too many invalid defaults, unless we intend to fix, leave this off
|
||||||
if 0:
|
if 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user