[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31354] trunk/blender/source/blender/ makesrna/rna_cleanup: change for sorting rna cleaner (was broken), diff' s on rna_properties.txt will stop being so big now.

Campbell Barton ideasman42 at gmail.com
Sun Aug 15 18:50:58 CEST 2010


Revision: 31354
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31354
Author:   campbellbarton
Date:     2010-08-15 18:50:58 +0200 (Sun, 15 Aug 2010)

Log Message:
-----------
change for sorting rna cleaner (was broken), diff's on rna_properties.txt will stop being so big now.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/rna_cleanup/rna_cleaner.py
    trunk/blender/source/blender/makesrna/rna_cleanup/rna_properties.txt

Modified: trunk/blender/source/blender/makesrna/rna_cleanup/rna_cleaner.py
===================================================================
--- trunk/blender/source/blender/makesrna/rna_cleanup/rna_cleaner.py	2010-08-15 16:06:26 UTC (rev 31353)
+++ trunk/blender/source/blender/makesrna/rna_cleanup/rna_cleaner.py	2010-08-15 16:50:58 UTC (rev 31354)
@@ -109,6 +109,11 @@
 
     props_list=[]
     props_length_max=[0,0,0,0,0,0,0,0]
+    
+    done_text = "+"
+    done = 0
+    tot = 0
+    
     for line in file_lines:
         
         # debug
@@ -141,8 +146,8 @@
         # type, description
         try:
             [btype, description] = tail.split(None, 1)
-            if '"' in description:
-                description.replace('"', "'")
+            # make life easy and strip quotes
+            description = description.replace("'", "").replace('"', "").replace("\\", "").strip()
         except ValueError:
             [btype, description] = [tail,'NO DESCRIPTION']
 
@@ -153,10 +158,16 @@
         changed = check_if_changed(bfrom, bto)
         
         # lists formatting
-        props=[comment, changed, bclass, bfrom, bto, kwcheck, btype, repr(description)]
+        props=[comment, changed, bclass, bfrom, bto, kwcheck, btype, description]
         props_list.append(props)
         props_length_max=list(map(max,zip(props_length_max,list(map(len,props)))))
         
+        if done_text in comment:
+            done += 1
+        tot += 1
+    
+    print("Total done %.2f" % (done / tot * 100.0) )
+    
     return (props_list,props_length_max)
 
 
@@ -243,15 +254,15 @@
     for props in props_list:
         #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
+        txt +=  '%s.%s -> %s:   %s  "%s"\n' % tuple(props[2:5] + props[6:])   # skipping keyword-check
         # rna_api
         if props[0] == 'NOTE': indent = '#   '
         else: indent = '    '
-        rna += indent + '("%s", "%s", "%s", "%s", %s),\n' % tuple(props[2:5] + props[6:]) # description is already string formatted
+        rna += indent + '("%s", "%s", "%s", "%s", "%s"),\n' % tuple(props[2:5] + props[6:]) # description is already string formatted
         # py
         blanks = [' '* (x[0]-x[1]) for x in zip(props_length_max,list(map(len,props)))]
         props = [('"%s"%s' if props[-1] != x[0] else "%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)
+        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)
@@ -275,7 +286,7 @@
     global sort_choices, default_sort_choice
     global kw_prefixes, kw
 
-    sort_choices = ['note','changed','class','from','to','kw', 'class.from']
+    sort_choices = ['note','changed','class','from','to','kw', 'class.to']
     default_sort_choice = sort_choices[-1]
     kw_prefixes = [ 'active','apply','bl','exclude','has','invert','is','lock', \
                     'pressed','show','show_only','use','use_only','layers','states', 'select']

Modified: trunk/blender/source/blender/makesrna/rna_cleanup/rna_properties.txt
===================================================================
--- trunk/blender/source/blender/makesrna/rna_cleanup/rna_properties.txt	2010-08-15 16:06:26 UTC (rev 31353)
+++ trunk/blender/source/blender/makesrna/rna_cleanup/rna_properties.txt	2010-08-15 16:50:58 UTC (rev 31354)
@@ -1,4604 +1,4604 @@
-NOTE * CLASS.FROM -> TO:   TYPE  DESCRIPTION
-+ * ActionGroup.expanded -> show_expanded:   boolean  '"Action Group is expanded"'
-+ * ActionGroup.lock -> lock:   boolean  '"Action Group is locked"'
-+ * ActionGroup.select -> select:   boolean  '"Action Group is selected"'
-+ * Actuator.expanded -> show_expanded:   boolean  '"Set actuator expanded in the user interface"'
-+ * Actuator.pinned -> pinned:   boolean  '"Display when not linked to a visible states controller"'
-+ * Actuator|ActionActuator.continue_last_frame -> use_continue_last_frame:   boolean  '"Restore last frame when switching on/off, otherwise play from the start each time"'
-+ * Actuator|ConstraintActuator.detect_material -> use_material_detect:   boolean  '"Detect material instead of property"'
-+ * Actuator|ConstraintActuator.fh_normal -> use_fh_normal:   boolean  '"Add a horizontal spring force on slopes"'
-+ * Actuator|ConstraintActuator.fh_paralel_axis -> use_fh_paralel_axis:   boolean  '"Keep object axis parallel to normal"'
-+ * Actuator|ConstraintActuator.force_distance -> use_force_distance:   boolean  '"Force distance of object to point of impact of ray"'
-+ * Actuator|ConstraintActuator.local -> use_local:   boolean  '"Set ray along object\'s axis or global axis"'
-+ * Actuator|ConstraintActuator.normal -> use_normal:   boolean  '"Set object axis along (local axis) or parallel (global axis) to the normal at hit position"'
-+ * Actuator|ConstraintActuator.persistent -> use_persistent:   boolean  '"Persistent actuator: stays active even if ray does not reach target"'
-+ * Actuator|EditObjectActuator.enable_3d_tracking -> use_3d_tracking:   boolean  '"Enable 3D tracking"'
-+ * Actuator|EditObjectActuator.local_angular_velocity -> use_local_angular_velocity:   boolean  '"Apply the rotation locally"'
-+ * Actuator|EditObjectActuator.local_linear_velocity -> use_local_linear_velocity:   boolean  '"Apply the transformation locally"'
-+ * Actuator|EditObjectActuator.replace_display_mesh -> use_replace_display_mesh:   boolean  '"Replace the display mesh"'
-+ * Actuator|EditObjectActuator.replace_physics_mesh -> use_replace_physics_mesh:   boolean  '"Replace the physics mesh (triangle bounds only - compound shapes not supported)"'
-+ * Actuator|FcurveActuator.add -> use_additive:   boolean  '"F-Curve is added to the current loc/rot/scale in global or local coordinate according to Local flag"'
-+ * Actuator|FcurveActuator.child -> apply_to_children:   boolean  '"Update F-Curve on all children Objects as well"'
-+ * Actuator|FcurveActuator.force -> use_force:   boolean  '"Apply F-Curve as a global or local force depending on the local option (dynamic objects only)"'
-+ * Actuator|FcurveActuator.local -> use_local:   boolean  '"Let the F-Curve act in local coordinates, used in Force and Add mode"'
-+ * Actuator|Filter2DActuator.enable_motion_blur -> use_motion_blur:   boolean  '"Enable/Disable Motion Blur"'
-+ * Actuator|ObjectActuator.add_linear_velocity -> use_add_linear_velocity:   boolean  '"Toggles between ADD and SET linV"'
-+ * Actuator|ObjectActuator.local_angular_velocity -> use_local_angular_velocity:   boolean  '"Angular velocity is defined in local coordinates"'
-+ * Actuator|ObjectActuator.local_force -> use_local_force:   boolean  '"Force is defined in local coordinates"'
-+ * Actuator|ObjectActuator.local_linear_velocity -> use_local_linear_velocity:   boolean  '"Velocity is defined in local coordinates"'
-+ * Actuator|ObjectActuator.local_location -> use_local_location:   boolean  '"Location is defined in local coordinates"'
-+ * Actuator|ObjectActuator.local_rotation -> use_local_rotation:   boolean  '"Rotation is defined in local coordinates"'
-+ * Actuator|ObjectActuator.local_torque -> use_local_torque:   boolean  '"Torque is defined in local coordinates"'
-+ * Actuator|ObjectActuator.servo_limit_x -> use_servo_limit_x:   boolean  '"Set limit to force along the X axis"'
-+ * Actuator|ObjectActuator.servo_limit_y -> use_servo_limit_y:   boolean  '"Set limit to force along the Y axis"'
-+ * Actuator|ObjectActuator.servo_limit_z -> use_servo_limit_z:   boolean  '"Set limit to force along the Z axis"'
-+ * Actuator|ParentActuator.compound -> use_compound:   boolean  '"Add this object shape to the parent shape (only if the parent shape is already compound)"'
-+ * Actuator|ParentActuator.ghost -> use_ghost:   boolean  '"Make this object ghost while parented (only if not compound)"'
-+ * Actuator|RandomActuator.always_true -> use_always_true:   boolean  '"Always false or always true"'
-+ * Actuator|ShapeActionActuator.continue_last_frame -> use_continue_last_frame:   boolean  '"Restore last frame when switching on/off, otherwise play from the start each time"'
-+ * Actuator|SoundActuator.enable_sound_3d -> use_sound_3d:   boolean  '"Enable/Disable 3D Sound"'
-+ * Actuator|StateActuator.state -> states:   boolean  '"NO DESCRIPTION"'
-+ * Actuator|VisibilityActuator.children -> apply_to_children:   boolean  '"Set all the children of this object to the same visibility/occlusion recursively"'
-+ * Actuator|VisibilityActuator.occlusion -> use_occlusion:   boolean  '"Set the object to occlude objects behind it. Initialized from the object type in physics button"'
-+ * Actuator|VisibilityActuator.visible -> use_visible:   boolean  '"Set the objects visible. Initialized from the objects render restriction toggle (access in the outliner)"'
-+ * AnimData.nla_enabled -> use_nla:   boolean  '"NLA stack is evaluated when evaluating this block"'
-+ * AnimVizMotionPaths.highlight_keyframes -> show_keyframe_highlight:   boolean  '"Emphasize position of keyframes on Motion Paths"'
-+ * AnimVizMotionPaths.search_all_action_keyframes -> show_keyframe_action_all:   boolean  '"For bone motion paths, search whole Action for keyframes instead of in group with matching name only (is slower)"'
-+ * AnimVizMotionPaths.show_frame_numbers -> show_frame_numbers:   boolean  '"Show frame numbers on Motion Paths"'
-+ * AnimVizMotionPaths.show_keyframe_numbers -> show_keyframe_numbers:   boolean  '"Show frame numbers of Keyframes on Motion Paths"'
-+ * AnimVizOnionSkinning.only_selected -> show_only_selected:   boolean  '"For Pose-Mode drawing, only draw ghosts for selected bones"'
-+ * Area.show_menus -> show_menus:   boolean  '"Show menus in the header"'
-+ * BackgroundImage.show_expanded -> show_expanded:   boolean  '"Show the expanded in the user interface"'
-+ * BezierSplinePoint.hide -> hide:   boolean  '"Visibility status"'
-+ * BezierSplinePoint.select_control_point -> select_control_point:   boolean  '"Control point selection status"'
-+ * BezierSplinePoint.select_left_handle -> select_left_handle:   boolean  '"Handle 1 selection status"'

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list