ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Trigger opacity from another layer's marker

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Pontus Danielsson
Trigger opacity from another layer's marker
on Oct 23, 2018 at 1:01:21 pm

Hi!
I'm trying to animate the opacity, triggered by another layer. So my layer should fade out when the time indicator hits "Bumper3"'s marker. This is what I tried but I've made something wrong since this only works if I have the marker on the same layer.

Help anyone?
/Pontus

L = thisComp.layer("Bumper3");
fadeFrames = 15; m = 0; t = time;
if(marker.numKeys > 0) {
m = L.marker.nearestKey(time).index;
tag = L.marker.key(m).comment;
if (tag== "In") { t = marker.key(m).time - time}
else if(tag=="Out") {t = time-marker.key(m).time}
linear(t, 0, framesToTime (fadeFrames), value, 0)
}
else {value}


/Pontus


Return to posts index

Dan Ebberts
Re: Trigger opacity from another layer's marker
on Oct 23, 2018 at 1:19:20 pm

It looks like you have three instances where you have:

marker

instead of:

L.marker



Dan



Return to posts index

Pontus Danielsson
Re: Trigger opacity from another layer's marker
on Oct 23, 2018 at 1:35:11 pm

That's it!
Thank you!!
/Pontus

/Pontus


Return to posts index

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