[Bf-blender-cvs] [2659bc54577] blender-v2.93-release: Fix T89153: Follow Path for empty works only in negative values
Sebastian Parborg
noreply at git.blender.org
Wed Jul 7 07:53:55 CEST 2021
Commit: 2659bc54577b4df7d1653938cf035b43a621aff9
Author: Sebastian Parborg
Date: Tue Jun 29 17:29:09 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rB2659bc54577b4df7d1653938cf035b43a621aff9
Fix T89153: Follow Path for empty works only in negative values
The old code only clamped cyclic curves
===================================================================
M source/blender/blenkernel/intern/constraint.c
===================================================================
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);
}
}
More information about the Bf-blender-cvs
mailing list