From a34721d24b2b27562933e2d396c02ea71826562b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 18 Aug 2010 03:05:14 +0000 Subject: minor update rna namer and script to automatically apply updates from blender to rna_properties.txt --- source/blender/makesrna/rna_cleanup/rna_cleaner.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source/blender/makesrna/rna_cleanup/rna_cleaner.py') diff --git a/source/blender/makesrna/rna_cleanup/rna_cleaner.py b/source/blender/makesrna/rna_cleanup/rna_cleaner.py index a63a715a13a..71a5a4eb611 100755 --- a/source/blender/makesrna/rna_cleanup/rna_cleaner.py +++ b/source/blender/makesrna/rna_cleanup/rna_cleaner.py @@ -120,8 +120,11 @@ def get_props_from_txt(input_filename): #print(line) # empty line or comment - if not line.strip() or line.startswith('#'): + if not line.strip(): continue + + if line.startswith("#"): + line = line[1:] # class [bclass, tail] = [x.strip() for x in line.split('.', 1)] @@ -185,6 +188,7 @@ def get_props_from_py(input_filename): kwcheck = check_prefix(bto, btype) # keyword-check changed = check_if_changed(bfrom, bto) # changed? description = repr(description) + description = description.replace("'", "").replace('"', "").replace("\\", "").strip() rna_api[index] = [comment, changed, bclass, bfrom, bto, kwcheck, btype, description] props_length = list(map(len,props)) # lengths props_length_max = list(map(max,zip(props_length_max,props_length))) # max lengths @@ -254,11 +258,9 @@ def write_files(basename, props_list, props_length_max): for props in props_list: #txt - # FOR PY OUTPUT! - ''' + # quick way we can tell if it changed 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 -- cgit v1.2.3