Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Use inPoint / outPoint to drive Opacity

  • Use inPoint / outPoint to drive Opacity

    Posted by Casey Drogin on March 18, 2022 at 3:32 pm

    Hey there,

    I have 2 layers. I am trying to use the inPoint / outPoint of Layer 1 to drive the Opacity of Layer 2. No fades, just switching between 100 and 0.

    When layer 1 starts, Layer 2 opacity = 100.

    When layer 1 ends, Layer 2 opacity = 0.

    I’m not entirely sure how to write this – I’ve been messing with valueAtTime but it’s not giving me the control I need. I think it might be an if/else statement but not sure.

    Thanks in advance for any help!

    Casey Drogin replied 4 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    March 18, 2022 at 4:14 pm

    <div>This should work:</div>

    L = thisComp.layer("Layer 1");

    time >= L.inPoint && time < L.outPoint ? 100 : 0

    or, you could do it this way:

    L = thisComp.layer("Layer 1");

    L.active ? 100 : 0

  • Casey Drogin

    March 18, 2022 at 4:18 pm

    Dan – you are the GOAT. Thank you

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy