From 2cd0b3f06470f2cb972dc626b5346f56abd67096 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 27 Jul 2012 23:16:33 +0000 Subject: defines to make it easier to manage ik stretch constants (these may need to be tweaked to fix [#32174]) --- source/blender/ikplugin/intern/iksolver_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/ikplugin/intern') diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c index 21d50e4a71d..86bdc7e1ab6 100644 --- a/source/blender/ikplugin/intern/iksolver_plugin.c +++ b/source/blender/ikplugin/intern/iksolver_plugin.c @@ -334,9 +334,9 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree) IK_SetStiffness(seg, IK_Z, pchan->stiffness[2]); if (tree->stretch && (pchan->ikstretch > 0.0f)) { - float ikstretch = pchan->ikstretch * pchan->ikstretch; - IK_SetStiffness(seg, IK_TRANS_Y, MIN2(1.0f - ikstretch, 0.99f)); - IK_SetLimit(seg, IK_TRANS_Y, 0.001, 1e10); + double ikstretch = (double)pchan->ikstretch * (double)pchan->ikstretch; + IK_SetStiffness(seg, IK_TRANS_Y, 1.0f - ikstretch); + IK_SetLimit(seg, IK_TRANS_Y, IK_STRETCH_STIFF_MIN, IK_STRETCH_STIFF_MAX); } } -- cgit v1.2.3