Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions refer to a layer’s name in a precomp in conditional expression

  • refer to a layer’s name in a precomp in conditional expression

    Posted by Ido Shor on September 12, 2018 at 1:16 pm

    been searching a lot before I posted this, but didn’t get anything yet.

    lets say I have a comp named “Comp01” and inside it two layers:
    1# – pre-comp named “Precomp 001”
    2# – White solid

    I want “White solid” to change it’s opacity value to 0 if there is a layer inside “Precomp 001” that is called “black soild”

    it’s a bit confusing, but it’s part of a bigger automated script I am working on that can reconstruct the layers in the Precomp 001.

    so basicly. I need an expression that can go inside a certain precomp, search for a certain layer name (based on the index number maybe) and if it finds it there than to change a certain property in the layer it’s assigned to.

    is that clear enough?
    thnx

    I.

    James Ronan replied 7 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • James Ronan

    September 12, 2018 at 2:22 pm

    Maybe something like this, on the opacity layer of the White Solid.


    try{
    comp("Precomp 001").layer("Black Solid");
    0
    }catch(err){
    100
    }

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