Revision: 24958 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24958 Author: harkyman Date: 2009-11-28 04:45:40 +0100 (Sat, 28 Nov 2009)
Log Message: ----------- Head/Tail property was never added for Track To and Stretch To constraint types. Added to RNA and changed UI check. Modified Paths: -------------- trunk/blender/release/scripts/ui/properties_object_constraint.py trunk/blender/source/blender/makesrna/intern/rna_constraint.c Modified: trunk/blender/release/scripts/ui/properties_object_constraint.py =================================================================== --- trunk/blender/release/scripts/ui/properties_object_constraint.py 2009-11-28 02:53:11 UTC (rev 24957) +++ trunk/blender/release/scripts/ui/properties_object_constraint.py 2009-11-28 03:45:40 UTC (rev 24958) @@ -77,7 +77,7 @@ else: layout.prop_object(con, "subtarget", con.target.data, "bones", text="") - if con.type == 'COPY_LOCATION': + if con.type in ('COPY_LOCATION', 'STRETCH_TO', 'TRACK_TO'): row = layout.row() row.label(text="Head/Tail:") row.prop(con, "head_tail", text="") Modified: trunk/blender/source/blender/makesrna/intern/rna_constraint.c =================================================================== --- trunk/blender/source/blender/makesrna/intern/rna_constraint.c 2009-11-28 02:53:11 UTC (rev 24957) +++ trunk/blender/source/blender/makesrna/intern/rna_constraint.c 2009-11-28 03:45:40 UTC (rev 24958) @@ -610,6 +610,12 @@ srna= RNA_def_struct(brna, "TrackToConstraint", "Constraint"); RNA_def_struct_ui_text(srna, "Track To Constraint", "Aims the constrained object toward the target."); + + 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, "bTrackToConstraint", "data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); @@ -1061,6 +1067,12 @@ srna= RNA_def_struct(brna, "StretchToConstraint", "Constraint"); RNA_def_struct_ui_text(srna, "Stretch To Constraint", "Stretches to meet the target object."); + + 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, "bStretchToConstraint", "data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs