Revision: 23355
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23355
Author:   billrey
Date:     2009-09-19 23:40:37 +0200 (Sat, 19 Sep 2009)

Log Message:
-----------
A few smaller adjustments to armature and bone properties.

Modified Paths:
--------------
    trunk/blender/release/ui/buttons_data_armature.py
    trunk/blender/release/ui/buttons_data_bone.py
    trunk/blender/source/blender/makesrna/intern/rna_armature.c

Modified: trunk/blender/release/ui/buttons_data_armature.py
===================================================================
--- trunk/blender/release/ui/buttons_data_armature.py   2009-09-19 19:57:30 UTC 
(rev 23354)
+++ trunk/blender/release/ui/buttons_data_armature.py   2009-09-19 21:40:37 UTC 
(rev 23355)
@@ -37,7 +37,9 @@
                ob = context.object
                arm = context.armature
                space = context.space_data
-
+               
+               layout.itemR(arm, "pose_position", expand=True)
+               
                split = layout.split()
 
                col = split.column()
@@ -50,7 +52,6 @@
                col.itemR(arm, "auto_ik")
                
                col = split.column()
-               col.itemR(arm, "rest_position")
                col.itemL(text="Deform:")
                col.itemR(arm, "deform_vertexgroups", text="Vertex Groups")
                col.itemR(arm, "deform_envelope", text="Envelopes")
@@ -140,12 +141,16 @@
                col.row().itemR(arm, "paths_location", expand=True)
                
                col = split.column()
-               col.itemL(text="Show:")
+               col.itemL(text="Display:")
                col.itemR(arm, "paths_show_frame_numbers", text="Frame Numbers")
                col.itemR(arm, "paths_highlight_keyframes", text="Keyframes")
                col.itemR(arm, "paths_show_keyframe_numbers", text="Keyframe 
Numbers")
                
-               layout.itemO("pose.paths_calculate")
+               layout.itemS()
+               
+               row = layout.row()
+               row.itemO("pose.paths_calculate", text="Calculate Paths")
+               row.itemO("pose.paths_clear", text="Clear Paths")
 
 class DATA_PT_ghost(DataButtonsPanel):
        __label__ = "Ghost"
@@ -171,6 +176,7 @@
                        sub.itemR(arm, "ghost_size", text="Step")
 
                col = split.column()
+               col.itemL(text="Display:")
                col.itemR(arm, "ghost_only_selected", text="Selected Only")
 
 bpy.types.register(DATA_PT_context_arm)

Modified: trunk/blender/release/ui/buttons_data_bone.py
===================================================================
--- trunk/blender/release/ui/buttons_data_bone.py       2009-09-19 19:57:30 UTC 
(rev 23354)
+++ trunk/blender/release/ui/buttons_data_bone.py       2009-09-19 21:40:37 UTC 
(rev 23355)
@@ -177,7 +177,7 @@
                split = layout.split(percentage=0.25)
                split.itemR(pchan, "ik_dof_x", text="X")
                row = split.row()
-               row.itemR(pchan, "ik_stiffness_x", text="Stiffness")
+               row.itemR(pchan, "ik_stiffness_x", text="Stiffness", 
slider=True)
                row.active = pchan.ik_dof_x
 
                split = layout.split(percentage=0.25)
@@ -192,7 +192,7 @@
                split = layout.split(percentage=0.25)
                split.itemR(pchan, "ik_dof_y", text="Y")
                row = split.row()
-               row.itemR(pchan, "ik_stiffness_y", text="Stiffness")
+               row.itemR(pchan, "ik_stiffness_y", text="Stiffness", 
slider=True)
                row.active = pchan.ik_dof_y
 
                split = layout.split(percentage=0.25)
@@ -207,7 +207,7 @@
                split = layout.split(percentage=0.25)
                split.itemR(pchan, "ik_dof_z", text="Z")
                row = split.row()
-               row.itemR(pchan, "ik_stiffness_z", text="Stiffness")
+               row.itemR(pchan, "ik_stiffness_z", text="Stiffness", 
slider=True)
                row.active = pchan.ik_dof_z
 
                split = layout.split(percentage=0.25)
@@ -220,7 +220,7 @@
                row.active = pchan.ik_dof_z and pchan.ik_limit_z
 
                split = layout.split()
-               split.itemR(pchan, "ik_stretch", text="Stretch")
+               split.itemR(pchan, "ik_stretch", text="Stretch", slider=True)
                split.itemL()
 
 class BONE_PT_deform(BoneButtonsPanel):

Modified: trunk/blender/source/blender/makesrna/intern/rna_armature.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_armature.c 2009-09-19 
19:57:30 UTC (rev 23354)
+++ trunk/blender/source/blender/makesrna/intern/rna_armature.c 2009-09-19 
21:40:37 UTC (rev 23355)
@@ -540,11 +540,14 @@
                {ARM_PATH_ACFRA, "CURRENT_FRAME", 0, "Around Frame", "Display 
Paths of poses within a fixed number of frames around the current frame."},
                {0, "RANGE", 0, "In Range", "Display Paths of poses within 
specified range."},
                {0, NULL, 0, NULL, NULL}};
-               
        static const EnumPropertyItem prop_paths_location_items[]= {
                {ARM_PATH_HEADS, "HEADS", 0, "Heads", "Calculate bone paths 
from heads"},
-               {0, "TIPS", 0, "Tips", "Calculate bone paths from tips"},
+               {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
                {0, NULL, 0, NULL, NULL}};
+       static const EnumPropertyItem prop_pose_position_items[]= {
+               {0, "POSE_POSITION", 0, "Pose Position", "Show armature in 
posed state."},
+               {ARM_RESTPOS, "REST_POSITION", 0, "Rest Position", "Show 
Armature in binding pose state. No posing possible."},
+               {0, NULL, 0, NULL, NULL}};
        
        srna= RNA_def_struct(brna, "Armature", "ID");
        RNA_def_struct_ui_text(srna, "Armature", "Armature datablock containing 
a hierarchy of bones, usually used for rigging characters.");
@@ -565,6 +568,17 @@
        RNA_def_property_ui_text(prop, "Edit Bones", "");
        
        /* Enum values */
+//     prop= RNA_def_property(srna, "rest_position", PROP_BOOLEAN, PROP_NONE);
+//     RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_RESTPOS);
+//     RNA_def_property_ui_text(prop, "Rest Position", "Show Armature in Rest 
Position. No posing possible.");
+//     RNA_def_property_update(prop, 0, "rna_Armature_update_data");
+       
+       prop= RNA_def_property(srna, "pose_position", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+       RNA_def_property_enum_items(prop, prop_pose_position_items);
+       RNA_def_property_ui_text(prop, "Pose Position", "Show armature in 
binding pose or final posed state.");
+       RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+       
        prop= RNA_def_property(srna, "drawtype", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_items(prop, prop_drawtype_items);
        RNA_def_property_ui_text(prop, "Draw Type", "");
@@ -606,11 +620,8 @@
        RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
                
                /* flag */
-       prop= RNA_def_property(srna, "rest_position", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_RESTPOS);
-       RNA_def_property_ui_text(prop, "Rest Position", "Show Armature in Rest 
Position. No posing possible.");
-       RNA_def_property_update(prop, 0, "rna_Armature_update_data");
        
+       
        prop= RNA_def_property(srna, "draw_axes", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_DRAWAXES);
        RNA_def_property_ui_text(prop, "Draw Axes", "Draw bone axes.");


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to