ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

comp marker to trigger an animation of a layer (not TR)

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Roei Tzoref
comp marker to trigger an animation of a layer (not TR)
on Oct 17, 2017 at 1:11:41 am

hey wizards.

I need a comp marker to trigger the keyframe animation of a property in one of the layers. if it reaches the comp marker - it will trigger, if not, then it won't start. not TR property but other parameters. imaging a null that's pushing a few layers at 10:00 mark. I want to place that null at the beginning of my timeline and instead use a Comp marker at 10:00 that will get the null going. I got a few nulls that do different things. I want this whole thing to get going at the comp marker sign.

I got something to work for 2 keyframes and I set it to each of the nulls parameters and it works as long as it's only 2 keyframes and they all start at the same time. but this is not the case.

t1 = key(1).time;
t2 = key(2).time;
dur = t2 - t1;

markerOut = thisComp.marker.key("Out").time;

t = linear(time, markerOut, markerOut+dur,t1,t2);

valueAtTime(t);

problem is I got 3. and I got more than one layer I want to trigger its animation so if those layers are not in sync (animation starts at the same time), this doesn't work. I wish to break free from the shackles of specifying my keyframes if possible. an expression that tells a layer to start going when the comp marker is reached. in which layer parameter I set it in no matter how many keyframes.

t1 = key(1).time;
t2 = key(2).time;
dur = t2 - t1;

markerOut = thisComp.marker.key("Out").time;

t = linear(time, markerOut, markerOut+dur,t1,t2);

valueAtTime(t);


Roei Tzoref
2D/VFX Generalist & Instructor
♫ AeBlues Tutorials ♫
http://www.tzoref.com


Return to posts index

Roei Tzoref
Re: comp marker to trigger an animation of a layer (not TR)
on Oct 17, 2017 at 1:33:24 am

got the solution from paul Slemmer: http://paulslemmer.com/

m = thisComp.marker.key("Out");
mT = m.time;
k = key(1);
kT = k.time;

t=time-mT+kT;
valueAtTime(t);


Roei Tzoref
2D/VFX Generalist & Instructor
♫ AeBlues Tutorials ♫
http://www.tzoref.com


Return to posts index

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