- rna_info.py now outputs array length with types eg. float[16].

- corrected rna property name Controller.states -> state (pointed out by Dalai).
- rna_cleaner_merge script now only merges comment and new name.
This commit is contained in:
Campbell Barton 2010-08-17 02:42:30 +00:00
parent d03c94d8d9
commit 5f7045f7af
4 changed files with 658 additions and 648 deletions

@ -636,7 +636,11 @@ if __name__ == "__main__":
for prop_id, prop in sorted(props):
# if prop.type == 'boolean':
# continue
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))
prop_type = prop.type
if prop.array_length > 0:
prop_type += "[%d]" % prop.array_length
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:

@ -253,6 +253,13 @@ def write_files(basename, props_list, props_length_max):
props_list = [['NOTE', 'CHANGED', 'CLASS', 'FROM', 'TO', 'KEYWORD-CHECK', 'TYPE', 'DESCRIPTION']] + props_list
for props in props_list:
#txt
# FOR PY OUTPUT!
'''
if props[3] == props[4]: txt += "#"
else: txt += " "
'''
if props[0] != '': txt += '%s * ' % props[0] # comment
txt += '%s.%s -> %s: %s "%s"\n' % tuple(props[2:5] + props[6:]) # skipping keyword-check
# rna_api

@ -27,17 +27,16 @@ def main():
for key, val_orig in mod_to_dict.items():
try:
val = mod_from_dict.pop(key)
val_new = mod_from_dict.pop(key)
except:
# print("not found", key)
val = val_orig
val_new = val_orig
# always take the class from the base
val = list(val)
val[2] = val_orig[2]
print(val_orig[2])
val = list(val_orig)
val[0] = val_new[0] # comment
val[4] = val_new[4] # -> to
val = tuple(val)
rna_api_new.append(val)
def write_work_file(file_path, rna_api):

File diff suppressed because it is too large Load Diff