Page Menu
Home
Search
Configure Global Search
Log In
Files
F20533
constraint.c.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Peter Amstutz (tetron)
Nov 13 2013, 4:25 PM
Size
963 B
Subscribers
None
constraint.c.patch
View Options
Index: blender/source/blender/blenkernel/intern/constraint.c
===================================================================
--- blender/source/blender/blenkernel/intern/constraint.c (revision 42976)
+++ blender/source/blender/blenkernel/intern/constraint.c (working copy)
@@ -1264,7 +1264,21 @@
* factor, which then gets clamped to lie within 0.0 - 1.0 range
*/
curvetime /= cu->pathlen;
- CLAMP(curvetime, 0.0f, 1.0f);
+
+ if (cu->nurb.first) {
+ Nurb *nu = cu->nurb.first;
+ if (nu->flagu & CU_NURB_CYCLIC) {
+ /* If the curve is cyclic, enable looping around if the time is
+ outside the bounds 0..1 */
+ if ((curvetime < 0.0f) || (curvetime > 1.0f)) {
+ curvetime -= floor(curvetime);
+ }
+ }
+ else {
+ /* The curve is not cyclic, so clamp to the begin/end points. */
+ CLAMP(curvetime, 0.0f, 1.0f);
+ }
+ }
}
else {
/* fixed position along curve */
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ae/23/38b355d842188dccccb1f0938fce
Event Timeline
Log In to Comment