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:
authorHans Goudey <h.goudey@me.com>2022-04-14 03:22:10 +0300
committerHans Goudey <h.goudey@me.com>2022-04-14 03:22:10 +0300
commit8e4c3c6a2414a3e3b4dd3e2ffe33535be9d09cc7 (patch)
tree515ab21dd1b55afc7ecfb0b50a8f089981c12c36 /source/blender/blenkernel/intern/anim_path.c
parent0ba061c3bc9bf299c17e064c5fc0f6ae9ac906a1 (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/anim_path.c')
-rw-r--r--source/blender/blenkernel/intern/anim_path.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/anim_path.c b/source/blender/blenkernel/intern/anim_path.c
index 1f8c6df6147..a8c25069c19 100644
--- a/source/blender/blenkernel/intern/anim_path.c
+++ b/source/blender/blenkernel/intern/anim_path.c
@@ -295,10 +295,12 @@ bool BKE_where_on_path(const Object *ob,
key_curve_tangent_weights(frac, w, KEY_BSPLINE);
- interp_v3_v3v3v3v3(r_dir, p0->vec, p1->vec, p2->vec, p3->vec, w);
+ if (r_dir) {
+ interp_v3_v3v3v3v3(r_dir, p0->vec, p1->vec, p2->vec, p3->vec, w);
- /* Make compatible with #vec_to_quat. */
- negate_v3(r_dir);
+ /* Make compatible with #vec_to_quat. */
+ negate_v3(r_dir);
+ }
//}
const ListBase *nurbs = BKE_curve_editNurbs_get(cu);