ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

refer to a layer's name in a precomp in conditional expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
ido shor
refer to a layer's name in a precomp in conditional expression
on Sep 12, 2018 at 1:16:41 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.


Return to posts index

James Ronan
Re: refer to a layer's name in a precomp in conditional expression
on Sep 12, 2018 at 2:22:59 pm

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


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


Return to posts index

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