diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-14 03:22:10 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-14 03:22:10 +0300 |
commit | 8e4c3c6a2414a3e3b4dd3e2ffe33535be9d09cc7 (patch) | |
tree | 515ab21dd1b55afc7ecfb0b50a8f089981c12c36 /source/blender/blenkernel/intern/armature_update.c | |
parent | 0ba061c3bc9bf299c17e064c5fc0f6ae9ac906a1 (diff) |
Cleanup: Make curve deform argument optional
The "dir" argument to `BKE_where_on_path` was only actually
used in a few places. It's easier to see where those are if there
isn't always a dummy argument.
Diffstat (limited to 'source/blender/blenkernel/intern/armature_update.c')
-rw-r--r-- | source/blender/blenkernel/intern/armature_update.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index 361ab176abd..2db4c086e04 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -405,8 +405,8 @@ static void splineik_evaluate_bone( if (pchan->bone->length < FLT_EPSILON) { /* Only move the bone position with zero length bones. */ - float bone_pos[4], dir[3], rad; - BKE_where_on_path(ik_data->tar, state->curve_position, bone_pos, dir, NULL, &rad, NULL); + float bone_pos[4], rad; + BKE_where_on_path(ik_data->tar, state->curve_position, bone_pos, NULL, NULL, &rad, NULL); apply_curve_transform(ik_data, ob, rad, bone_pos, &rad); @@ -445,13 +445,13 @@ static void splineik_evaluate_bone( /* Step 1: determine the positions for the endpoints of the bone. */ if (point_start < 1.0f) { - float vec[4], dir[3], rad; + float vec[4], rad; radius = 0.0f; /* Calculate head position. */ if (point_start == 0.0f) { /* Start of the path. We have no previous tail position to copy. */ - BKE_where_on_path(ik_data->tar, point_start, vec, dir, NULL, &rad, NULL); + BKE_where_on_path(ik_data->tar, point_start, vec, NULL, NULL, &rad, NULL); } else { copy_v3_v3(vec, state->prev_tail_loc); @@ -486,7 +486,7 @@ static void splineik_evaluate_bone( } else { /* Scale to fit curve end position. */ - if (BKE_where_on_path(ik_data->tar, point_end, vec, dir, NULL, &rad, NULL)) { + if (BKE_where_on_path(ik_data->tar, point_end, vec, NULL, NULL, &rad, NULL)) { state->prev_tail_radius = rad; copy_v3_v3(state->prev_tail_loc, vec); copy_v3_v3(pose_tail, vec); |