From 513c8738ce77fa445c5c5eb1b19fa778a52d215a Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Tue, 6 Jul 2010 13:56:50 +0000 Subject: == rna cleanup == small fixes adnm tentative new keywords those discussed by campbell and brecht are still there, but commented with these keywords I'm happy how booleans went, committing to discuss with cambpell --- source/blender/makesrna/rna_cleanup/rna_cleaner.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/makesrna/rna_cleanup/rna_cleaner.py b/source/blender/makesrna/rna_cleanup/rna_cleaner.py index 4127861e1ce..2f2fabd6d6c 100755 --- a/source/blender/makesrna/rna_cleanup/rna_cleaner.py +++ b/source/blender/makesrna/rna_cleanup/rna_cleaner.py @@ -238,15 +238,18 @@ def write_files(basename, props_list, props_length_max): else: indent = ' ' rna += indent + '("%s", "%s", "%s", "%s", "%s"),\n' % tuple(props[2:5] + props[6:]) # py - if props[0] == 'NOTE': indent = '# ' - else: indent = ' ' blanks = [' '* (x[0]-x[1]) for x in zip(props_length_max,list(map(len,props)))] props = ['"%s"%s'%(x[0],x[1]) for x in zip(props,blanks)] py += indent + '(%s, %s, %s, %s, %s, %s, %s, %s),\n' % tuple(props) + f_txt.write(txt) f_py.write("rna_api = [\n%s]\n" % py) f_rna.write("rna_api = [\n%s]\n" % rna) + f_txt.close() + f_py.close() + f_rna.close() + print ('\nSaved %s, %s and %s.\n' % (font_bold(f_txt.name), font_bold(f_py.name), font_bold(f_rna.name) ) ) @@ -257,8 +260,10 @@ def main(): sort_choices = ['note','changed','class','from','to','kw'] default_sort_choice = sort_choices[0] - kw_prefixes = ['invert','is','lock','show','show_only','use','use_only'] - kw = ['hide','select','layer','state'] + #kw_prefixes = ['invert','is','lock','show','show_only','use','use_only'] + #kw = ['hide','select','layer','state'] + kw_prefixes = ['has','invert','is','lock','layers','show','show_only','states','use','use_only'] + kw = ['layers','states','value'] input_filename, sort_priority = check_commandline() props_list,props_length_max = get_props(input_filename) -- cgit v1.2.3