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:
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/constraint.c6
-rw-r--r--source/blender/blenkernel/intern/object.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 2ee030ca83f..bcd2c75be0d 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -1473,8 +1473,12 @@ static void followpath_get_tarmat(struct Depsgraph *UNUSED(depsgraph),
* that's animated, but this will only work if it actually is animated...
*
* we divide the curvetime calculated in the previous step by the length of the path,
- * to get a time factor, which then gets clamped to lie within 0.0 - 1.0 range. */
+ * to get a time factor. */
curvetime /= cu->pathlen;
+
+ if (cu->flag & CU_PATH_CLAMP) {
+ CLAMP(curvetime, 0.0f, 1.0f);
+ }
}
else {
/* fixed position along curve */
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! */