diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-05-08 17:16:27 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-05-08 17:17:15 +0300 |
commit | 58bfe93db614dc24306415bb4641c85a4b3d1b79 (patch) | |
tree | e7b8cea7d9a1d3dd56ab21e9f8df568cee249618 | |
parent | 44d4fdec7efd2ff6549cf79b7a66a912e00a5d3f (diff) |
Spline IK: fix a scaling hiccup as bones roll off the end of the curve.
-rw-r--r-- | source/blender/blenkernel/intern/armature_update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index 97326fa78f2..bf7d81e5d63 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -340,8 +340,8 @@ static void splineik_evaluate_bone( sub_v3_v3v3(splineVec, poseTail, poseHead); scaleFac = len_v3(splineVec) / pchan->bone->length; - /* Adjust the scale factor towards the neutral state when rolling off the curve end. */ - scaleFac = interpf(scaleFac, baseScale, tailBlendFac); + /* Extrapolate the full length of the bone as it rolls off the end of the curve. */ + scaleFac = (tailBlendFac < 1e-5f) ? baseScale : scaleFac / tailBlendFac; /* Step 3: compute the shortest rotation needed * to map from the bone rotation to the current axis. |