[Bf-blender-cvs] [58bfe93db61] master: Spline IK: fix a scaling hiccup as bones roll off the end of the curve.
Alexander Gavrilov
noreply at git.blender.org
Wed May 8 16:17:25 CEST 2019
Commit: 58bfe93db614dc24306415bb4641c85a4b3d1b79
Author: Alexander Gavrilov
Date: Wed May 8 17:16:27 2019 +0300
Branches: master
https://developer.blender.org/rB58bfe93db614dc24306415bb4641c85a4b3d1b79
Spline IK: fix a scaling hiccup as bones roll off the end of the curve.
===================================================================
M source/blender/blenkernel/intern/armature_update.c
===================================================================
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.
More information about the Bf-blender-cvs
mailing list