diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-18 07:05:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-18 07:05:14 +0400 |
commit | a34721d24b2b27562933e2d396c02ea71826562b (patch) | |
tree | c7763dfe6864a4b82b35e664d6426b3b05b91760 /source/blender/makesrna/rna_cleanup/rna_cleaner.py | |
parent | f80f412701e8227bca57a4a30080f3d0ed5230fd (diff) |
minor update rna namer and script to automatically apply updates from blender to rna_properties.txt
Diffstat (limited to 'source/blender/makesrna/rna_cleanup/rna_cleaner.py')
-rwxr-xr-x | source/blender/makesrna/rna_cleanup/rna_cleaner.py | 10 |
1 files changed, 6 insertions, 4 deletions
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 |