diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-04-15 20:25:41 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-04-16 18:41:57 +0300 |
commit | ad9275ed4e60b7ca4874bbb2c80fef6e2606eb39 (patch) | |
tree | 901785b1d79494754a4d96450ce13a093a74ab95 /source/blender/blenkernel/intern/constraint.c | |
parent | 752edc0a155a3cd9ff6b0152cd7c96cecd542c9b (diff) |
Spline IK: support changing individual bone length via Y scaling.
Previously Spline IK provided only two choices: either scale the
length of the bone chain to fit the length of the curve, or don't
scale the bone in the Y dimension at all (ignoring effects of
actually fitting to the curve due to curvature and curve object
scale).
This patch adds a new option to use the pre-IK Y scale of the
bones to adjust their length when fitted to the curve, allowing
individual posing control over the length of the segments.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4687
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index c774e2ff157..1ba29424def 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3959,6 +3959,8 @@ static void splineik_new_data(void *cdata) data->bulge = 1.0; data->bulge_max = 1.0f; data->bulge_min = 1.0f; + + data->yScaleMode = CONSTRAINT_SPLINEIK_YS_FIT_CURVE; } static void splineik_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata) |