include rna parent class names in renaming list

This commit is contained in:
Campbell Barton 2010-08-10 06:27:29 +00:00
parent 15669532a2
commit 41531e4fb6
3 changed files with 2329 additions and 2318 deletions

@ -625,18 +625,23 @@ def BuildRNAInfo():
if __name__ == "__main__":
import rna_info
struct = rna_info.BuildRNAInfo()[0]
data = ""
data = []
for struct_id, v in sorted(struct.items()):
struct_id_str = "".join(sid for sid in struct_id if struct_id)
props = [(prop.identifier, prop) for prop in v.properties]
struct_id_str = v.identifier # "".join(sid for sid in struct_id if struct_id)
for base in v.get_bases():
struct_id_str = base.identifier + "|" + struct_id_str
props = [(prop.identifier, prop) for prop in v.properties]
for prop_id, prop in sorted(props):
# if prop.type == 'boolean':
# continue
data += "%s.%s -> %s: %s%s %s\n" % (struct_id_str, prop.identifier, prop.identifier, prop.type, ", (read-only)" if prop.is_readonly else "", prop.description)
data.append("%s.%s -> %s: %s%s %s" % (struct_id_str, prop.identifier, prop.identifier, prop.type, ", (read-only)" if prop.is_readonly else "", prop.description))
data.sort()
if bpy.app.background:
print(data)
import sys
sys.stderr.write("\n".join(data))
else:
text = bpy.data.texts.new(name="api.py")
text.from_string(data)

@ -9,7 +9,7 @@ Example usage:
def main():
def work_line_id(line):
return line[2], line[3] # class/from
return line[2].split("|")[-1], line[3] # class/from
if not (sys.argv[-1].endswith(".py") and sys.argv[-2].endswith(".py")):
@ -31,6 +31,12 @@ def main():
except:
# print("not found", key)
val = val_orig
# always take the class from the base
val = list(val)
val[2] = val_orig[2]
print(val_orig[2])
val = tuple(val)
rna_api_new.append(val)
@ -53,4 +59,4 @@ def main():
print("Warning '%s' contains lost %d items from module %s.py" % (file_path, len(mod_from_dict), mod_from.__name__))
if __name__ == "__main__":
main()
main()

File diff suppressed because it is too large Load Diff