ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Variable to control layer or effect name within an expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Lennie NelsonVariable to control layer or effect name within an expression
by on Apr 8, 2012 at 4:53:11 pm

I would like to control part of a layer name in an expression with a variable, i.e.:

Change
thisComp.layer("Target Layers").effect("1")("Layer").position[1];

to

thisComp.layer("Target Layers").effect("VARIABLE")("Layer").position[1];

Any ideas?

TIA


Return to posts index

Dan EbbertsRe: Variable to control layer or effect name within an expression
by on Apr 8, 2012 at 5:45:31 pm

Like this:

myName = "1";
thisComp.layer("Target Layers").effect(myName)("Layer").position[1];


Dan



Return to posts index

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