From 6a0906c09a263f5fb17449407f5988c4bda53436 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Thu, 20 May 2021 20:41:10 +0200 Subject: Fix T87854: Add clamp option to Path Animation Previously, the "follow path constraint" and "follow parented curve" were clamped. This restriction was lifted in rBcf2baa585cc8 Add back an option to get the old behavior in the "Path animation" settings. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D11263 --- source/blender/blenkernel/intern/object.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenkernel/intern/object.c') diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 825f660fa3a..34c77cd9155 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -3288,6 +3288,10 @@ static bool ob_parcurve(Object *ob, Object *par, float r_mat[4][4]) ctime = cu->ctime; } + if (cu->flag & CU_PATH_CLAMP) { + CLAMP(ctime, 0.0f, 1.0f); + } + unit_m4(r_mat); /* vec: 4 items! */ -- cgit v1.2.3