diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2021-06-29 18:29:09 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-07-07 08:47:37 +0300 |
commit | 2659bc54577b4df7d1653938cf035b43a621aff9 (patch) | |
tree | bc3b996b573ead0a0e24faa28d78baaa858f6a74 /source/blender/blenkernel | |
parent | aa1bbadb5b6a2555d2a106f1362c6718adbdeaf0 (diff) |
Fix T89153: Follow Path for empty works only in negative values
The old code only clamped cyclic curves
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index bcd2c75be0d..bb785d310b9 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -1476,7 +1476,10 @@ static void followpath_get_tarmat(struct Depsgraph *UNUSED(depsgraph), * to get a time factor. */ curvetime /= cu->pathlen; - if (cu->flag & CU_PATH_CLAMP) { + Nurb *nu = cu->nurb.first; + if (!(nu && nu->flagu & CU_NURB_CYCLIC) && cu->flag & CU_PATH_CLAMP) { + /* If curve is not cyclic, clamp to the begin/end points if the curve clamp option is on. + */ CLAMP(curvetime, 0.0f, 1.0f); } } |