Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-28 03:16:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-28 03:16:33 +0400
commit2cd0b3f06470f2cb972dc626b5346f56abd67096 (patch)
tree1dc810944ff7783e6b5772bf6d379b74e22334df /source/blender/ikplugin/intern
parentf23bfdfab41e3824d5dc04b27f6509eae02da7f2 (diff)
defines to make it easier to manage ik stretch constants (these may need to be tweaked to fix [#32174])
Diffstat (limited to 'source/blender/ikplugin/intern')
-rw-r--r--source/blender/ikplugin/intern/iksolver_plugin.c6
1 files changed, 3 insertions, 3 deletions
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);
}
}