replace python3 command with python3.2, python3 isnt available on ubuntu.
[blender-staging.git] / source / blender / makesrna / rna_cleanup / rna_cleaner_merge.py
index 9fcaa8be3f82d0c54136bab4a32f48315fd6dcf4..758511059915c6cf3627f207dc6ad2fa1575093c 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python3.1
+#!/usr/bin/env python3.2
 
 import sys
 
@@ -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")):
@@ -27,11 +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_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):
@@ -53,4 +58,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()
\ No newline at end of file
+       main()