ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

loopOut expression ignores layer in-point

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jordan Thomas
loopOut expression ignores layer in-point
on Jun 19, 2018 at 5:32:29 am

Hi CC,

I'm trying to use a loopOut expression on a slider to control the size of many other layers with precise repetition.
The problem is, instead of using the defined number of key frames to determine the length of the loop which begin at the layer in-point, the loop starts at the beginning of the composition. Therefore the loop includes unwanted time and gets more and more out of whack with each pass.

Any suggestions?



loopOut(type = "cycle", numKeyframes = 4)
cb = effect("Checkbox Control")("Checkbox");
if (cb.value == true)
  t = time%key(numKeys).time
else if (cb.numKeys &gt; 0)
  t = cb.key(cb.numKeys).time%key(numKeys).time
else
  t = 0;
valueAtTime(t)


Return to posts index

Dan Ebberts
Re: loopOut expression ignores layer in-point
on Jun 19, 2018 at 6:09:10 am

It's not clear to me exactly what you're trying to do, but the first line of your expression won't have any effect on the result.

Dan



Return to posts index

Jordan Thomas
Re: loopOut expression ignores layer in-point
on Jun 19, 2018 at 6:26:03 am

The expression loops a slider which animates the scale property of a group of other layers.
The expression also includes a checkbox to switch the loop from on to off. I think the checkbox part of the code is creating the complication.


Return to posts index


Dan Ebberts
Re: loopOut expression ignores layer in-point
on Jun 19, 2018 at 6:35:56 am

Well, it is the checkbox stuff that's invalidating the loopOut() piece. It's still not clear though which section of the animation you're trying to loop and what should happen for each state of the checkbox.

Dan



Return to posts index

Jordan Thomas
Re: loopOut expression ignores layer in-point
on Jun 20, 2018 at 7:52:44 am

The slider animates the scale property for about 30 shape layers that all grow and shrink in unison, and this is what is looped.
I want the check box to stop that slider animating the scale, and to just have those objects remain at the same size for a period at the beginning and again at the end of the composition.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]