ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Sequencing layers with expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike Powell
Sequencing layers with expression
on Apr 16, 2018 at 11:19:42 pm

Hi All -

This is my first post on Creative Cow but this site has been an indispensable source of information for as long as I can remember. My question is regarding sequencing layers with expressions, specifically how to change the delay period between layers in an increasing or decreasing fashion.

I use Dan Ebberts expression below all the time (thanks Dan!) to sequentially move or scale multiple layers with one set of keyframes. What I can't do is have the delay for each layer change, so while I can ease the keyframes as desired, the delay between layers (i.e. 5 frames) is linear.

I tried keyframing the delay which kind of works but it seems to actually shorten the duration of the animation over time. Is there a way to modify this expression so that I can have the delay between layers be non-linear? In case i'm not explaining this well (which I'm probably not) I'm trying to accomplish something similar to this script: but without keyframing each layer.

Any suggestions?

delay = 5; //number of frames to delay

d = delay*thisComp.frameDuration;
thisComp.layer(index - 1).scale.valueAtTime(time - d)

Return to posts index

Dan Ebberts
Re: Sequencing layers with expression
on Apr 17, 2018 at 6:29:20 am

You could calculate the delay based on the layer index, with something like this:

maxDelay = 10;
delay = easeIn(index,1,thisComp.numLayers,0,maxDelay);
d = framesToTime(delay);

You'll have to modify it if not all layers in the comp are participating and/or if you want a different max dealy.


Return to posts index

Mike Powell
Re: Sequencing layers with expression
on Apr 17, 2018 at 7:41:26 pm

Thanks Dan, this is super helpful! I really appreciate all that you do

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved