Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Change layer visibility trought composition

  • Change layer visibility trought composition

    Posted by Dario De angelis on September 11, 2016 at 8:55 pm

    Hi guys, i’m sorry if my post will be confusing for some of you but i’m newbie in the script world.

    I was making a soccer lineup template for a soccer league and, given since I have to do the graphic for its entire duration, I was wondering if there is any chance to speed up the entire process with expressions.

    What I would know is if there is the possibility to set a layer visibility trought the composition.

    I try to explain it better:

    I have a COMP with the FOOTAGE of many players set to UNSEEN

    There is any chance to apply an expression to the COMP for seeing only certain layer?

    In my case I’d like to see a footage depending by a text lineup.
    For example i’d like if my Comp would make visible the layer that have the same name of the text i would write in the lineup

    NAME 1 —-> Comp with NAME 1 layer set to visible
    NAME 2 —-> Comp with NAME 2 layer set to visible
    ….

    Alternatively, there is a chance to set the opacity of a footage depending by text source?
    For example NAME 1 with 100% opacity if the text source is NAME 1 or 0% for any other source.

    Dario De angelis replied 9 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 11, 2016 at 10:08 pm

    You can’t apply an expression to a comp, but you could apply an expression like this to the opacity of each footage layer:

    if (name == thisComp.layer(“Player Name”).text.sourceText) 100 else 0

    Dan

  • Dario De angelis

    September 12, 2016 at 1:48 pm

    Thank you.
    It worked, but to display the footage the name should be the same of the footage including the file extension or I should modify one by one every single footage’s name.

    Looking around in this forum I found a better solution with this expression:

    txt = thisComp.layer("TEXT1").text.sourceText
    if (txt == "PLAYER NAME") 100 else 0

    Maybe this can help someone in future.

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