Revision: 38234
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38234
Author:   aligorith
Date:     2011-07-08 12:48:43 +0000 (Fri, 08 Jul 2011)
Log Message:
-----------
Constraints RNA - More Head/Tail stuff

Added for Damped Track and Locked Track constraints

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_constraint.c

Modified: 
branches/soc-2011-pepper/source/blender/makesrna/intern/rna_constraint.c
===================================================================
--- branches/soc-2011-pepper/source/blender/makesrna/intern/rna_constraint.c    
2011-07-08 12:22:48 UTC (rev 38233)
+++ branches/soc-2011-pepper/source/blender/makesrna/intern/rna_constraint.c    
2011-07-08 12:48:43 UTC (rev 38234)
@@ -1026,6 +1026,12 @@
 
        srna= RNA_def_struct(brna, "LockedTrackConstraint", "Constraint");
        RNA_def_struct_ui_text(srna, "Locked Track Constraint", "Points toward 
the target along the track axis, while locking the other axis");
+       
+       prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
+       RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
+       RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of 
bone: Head=0, Tail=1");
+       RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, 
"rna_Constraint_update");
+       
        RNA_def_struct_sdna_from(srna, "bLockTrackConstraint", "data");
 
        prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
@@ -1370,7 +1376,7 @@
        RNA_def_struct_sdna_from(srna, "bClampToConstraint", "data");
 
        prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
-       RNA_def_property_pointer_sdna(prop, NULL, "tar"); // TODO: curve only 
for set function!
+       RNA_def_property_pointer_sdna(prop, NULL, "tar");
        RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, 
"rna_Curve_object_poll");
        RNA_def_property_ui_text(prop, "Target", "Target Object");
        RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1866,6 +1872,12 @@
 
        srna= RNA_def_struct(brna, "DampedTrackConstraint", "Constraint");
        RNA_def_struct_ui_text(srna, "Damped Track Constraint", "Points toward 
target by taking the shortest rotation path");
+       
+       prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
+       RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
+       RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of 
bone: Head=0, Tail=1");
+       RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, 
"rna_Constraint_update");
+       
        RNA_def_struct_sdna_from(srna, "bDampTrackConstraint", "data");
 
        prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to