Copy link to clipboard
Copied
When I use expression loopOut() I always see error "loopOut() is not a function". I tried to use different variants of syntaxes but it didn't help.
I saw some advices here but they didn't work too.
I use Mac OS Big Sur 11 and 17.6.0 After Effects
I Had the same problem today and I realised you have to use de entire expression not just "LoopOut("offset")" like some tutorials tells us to do. You Have to use like this:
loopOutDuration(type = "offset", duration = 0)
Copy link to clipboard
Copied
loopOut() doesn't work for paths. Try this workaround:
if (numKeys > 1 && time > key(numKeys).time){
t1 = key(1).time;
t2 = key(numKeys).time;
span = t2 - t1;
delta = time - t2;
t = delta%span;
valueAtTime(t1 + t);
}else
value
Copy link to clipboard
Copied
It works flawlessly 😄
Copy link to clipboard
Copied
This works perfect. Even for eased keyframes 😄
Copy link to clipboard
Copied
Prefect
Copy link to clipboard
Copied
The loopOut() function works on properties that have a numeric value. The values can be in an array. Vector paths require a different approach.
The approach is to look at the number of keyframes and then use valueAtTime().
For a simple seamless loop, the first and last keyframes must be identical so copy the first keyframe and paste it at the end. This is the simplest approach to that problem:
valueAtTime(time % key(numKeys).time)
Edit: Just saw Dan's solution. It's a lot more typing and it has the advantage of not throwing an error if there is only one keyframe.
Copy link to clipboard
Copied
Any chance there's a way to trick things into working like loopOut("pingpong")? 🙂
Copy link to clipboard
Copied
That would be like this:
if (numKeys > 1 && time > key(numKeys).time){
t1 = key(1).time;
t2 = key(numKeys).time;
span = t2 - t1;
delta = time - t2;
seg = Math.floor(delta/span);
t = delta%span;
valueAtTime((seg%2) ? (t1 + t) : (t2 - t));
}else
value
Copy link to clipboard
Copied
Hi,
I am wondering how do I target this only on specific keyframe(s), like how the in and out under loop function and numKeyframes are doing? Thanks!
Really apprciate your contribution of that code
Copy link to clipboard
Copied
I Had the same problem today and I realised you have to use de entire expression not just "LoopOut("offset")" like some tutorials tells us to do. You Have to use like this:
loopOutDuration(type = "offset", duration = 0)
Find more inspiration, events, and resources on the new Adobe Community
Explore Now