ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Automated way to redirect a stack of expressions in a comp to pull from a different source layer outside of the comp...

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
jim lefevre
Automated way to redirect a stack of expressions in a comp to pull from a different source layer outside of the comp...
on Aug 13, 2018 at 5:06:14 pm

I am setting up an admittedly complicated project which is centred around a jigsaw.

I have three rows so far A1-A5, B1-B5 and C1-C5. Each jigsaw piece is a composition with a solid feeding off a luma matte pre-comp (A1_MATTE, A2_MATTE etc...) inside which turns the jigsaw 'teeth' on/off.



These luma mattes feed respectively off the piece to the left and above it which drives their 'North' and 'West' teeth.

Currently with any new piece I am having to go all the way through to the respective luma matte, open up the expression and change the expression to point the respective neighbouring layers. I would like to find a simpler way so that I can point all the scripts in the comp towards the new two feeder layers by changing one or two pieces of information at a higher level (perhaps on a top adjustment layer which I generally use as the 'DRIVER' layer in a comp).

For example if I have a new piece 'D4' I can change the feeder comps to 'D3' and 'C4' and that filters through the expressions.

I thought that maybe the expression control 'Layer Control' might be it but it seems to only show me layers within the composition that it is in and I need it to reach the over-arching one.

To show you my expressions - in piece B3 the B3_LUMA_MATTE has this on its 'WEST" tooth scale to flip the luma matte...

a = 100;
b = -100;
n = comp("JIGSAW").layer("B2").effect("EAST_on")("Checkbox");

if (n==0) [a,a] else [a, b]


...and this on its 'NORTH' tooth scale...

a = 100;
b = -100;
n = comp("JIGSAW").layer("A3").effect("SOUTH_on")("Checkbox");

if (n==0) [a,a] else [a, b]


Is there any way to change the "comp("JIGSAW").layer("A3")" section of the expression at a higher level so that it points to another specific layer?

Does that make sense!?

Many thanks in advance!

Jim

http://www.jimlefevre.com


Return to posts index

Dan Ebberts
Re: Automated way to redirect a stack of expressions in a comp to pull from a different source layer outside of the comp...
on Aug 14, 2018 at 12:22:50 am

I don't know if this helps, but you could put your layer names (and other parameter names) in centralized text layers, like this:

layerName = comp("Main").layer("TEXT").text.sourceText.value;
n = comp("JIGSAW").layer(layerName).effect("EAST_on")("Checkbox");


Dan



Return to posts index

jim lefevre
Re: Automated way to redirect a stack of expressions in a comp to pull from a different source layer outside of the comp...
on Aug 15, 2018 at 5:52:44 am

Dan, as ever, thank you.

That was exactly what I was looking for and I didn't realise you could feed text layers into expressions like that. That is really exciting as I use a lot of convoluted mechanical processes in After Effects that this makes life a lot easier!

Thank you again,

Jim

http://www.jimlefevre.com


Return to posts index

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