Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2017-09-20 17:35:23 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-09-20 17:40:11 +0300
commitc4bbf1e4b0e0b0a2d4652cdef6767bdac239c9d2 (patch)
tree6fbc31698dfc4460dd41261c54ad63f971e91da0 /release/scripts/modules/rna_info.py
parentadb647fb92870a1924c64a69df8d3e037979eb4b (diff)
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.
Diffstat (limited to 'release/scripts/modules/rna_info.py')
-rw-r--r--release/scripts/modules/rna_info.py28
1 files changed, 17 insertions, 11 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 03f43486371..95020489e1c 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -632,7 +632,7 @@ def BuildRNAInfo():
for rna_prop_ptr in (getattr(rna_prop, "fixed_type", None), getattr(rna_prop, "srna", None)):
# 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(
"%s.%s" % (rna_struct_path, rna_prop_identifier))
@@ -645,7 +645,7 @@ def BuildRNAInfo():
rna_prop_ptr = getattr(rna_prop, "fixed_type", None)
# 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(
"%s.%s" % (rna_struct_path, rna_func.identifier))
@@ -680,16 +680,22 @@ def BuildRNAInfo():
for rna_info_prop in InfoFunctionRNA.global_lookup.values():
rna_info_prop.build()
- for rna_info in InfoStructRNA.global_lookup.values():
- rna_info.build()
- for prop in rna_info.properties:
- prop.build()
- for func in rna_info.functions:
- func.build()
- for prop in func.args:
- prop.build()
- for prop in func.return_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()
+ for prop in rna_info.properties:
prop.build()
+ for func in rna_info.functions:
+ func.build()
+ for prop in func.args:
+ prop.build()
+ for prop in func.return_values:
+ 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
if 0: