[Bf-blender-cvs] [0b69156] master: Fix T44408: "Rest Length" property in the Stretch To constraint was getting clipped when using Metric Units

Joshua Leung noreply at git.blender.org
Thu Apr 16 15:17:44 CEST 2015


Commit: 0b691563eaff385d23c4199c85dc47a188420284
Author: Joshua Leung
Date:   Fri Apr 17 01:07:05 2015 +1200
Branches: master
https://developer.blender.org/rB0b691563eaff385d23c4199c85dc47a188420284

Fix T44408: "Rest Length" property in the Stretch To constraint was getting clipped when using Metric Units

Increased the upper bound for the "Rest Length" property to cope with metric
units, especially when large (i.e. > 2 m) distances are involved. It may be
necessary to increase this again in the future, if even larger distances get
used (though it then starts getting a bit difficulty to justify such setups).

===================================================================

M	source/blender/makesrna/intern/rna_constraint.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 2cff8cf..abc489b 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -1357,7 +1357,8 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna)
 
 	prop = RNA_def_property(srna, "rest_length", PROP_FLOAT, PROP_DISTANCE);
 	RNA_def_property_float_sdna(prop, NULL, "orglength");
-	RNA_def_property_range(prop, 0.0, 100.f);
+	RNA_def_property_range(prop, 0.0, 1000.f);
+	RNA_def_property_ui_range(prop, 0, 100.0f, 10, RNA_TRANSLATION_PREC_DEFAULT);
 	RNA_def_property_ui_text(prop, "Original Length", "Length at rest position");
 	RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update");




More information about the Bf-blender-cvs mailing list