Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Manage visible layers in a precomp

  • Manage visible layers in a precomp

    Posted by Steven Dudeck on July 7, 2011 at 4:57 pm

    I would like to be able to toggle the visible layer in a nested precomp. I’ve set up a versioning comp and the BG layer needs to use different video for each version. Basically a simple way to set a layer number that turns on only one of the layers in the precomp.

    I hope this is clear.

    Steven Dudeck
    Designer Animator
    Los Angeles

    Dan Ebberts replied 14 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    July 7, 2011 at 6:08 pm

    You could set up a slider control in your Main Comp and then reference it from Opacity expessions on each of your BG layers like this:

    control = comp(“Main”).layer(“Controls”).effect(“Slider Control”)(“Slider”) ;
    if (Math.round(control) == index) 100 else 0;

    Dan

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