-
thisLayer.index For Parameter
I’m trying to do something fairly basic but am coming across a repeated issue. I’d like to refer scaling in another Comp, but not choose a specific layer name. Instead I’d like to use the same layer number where I’m calling it from. The error is the same each time “BAD ARGUMENT. LAYER INDEX OUT OF RANGE EXPRESSION DISABLED”
ReadScale=comp(“MyComp”).layer(4).transform.scale[0] //**Works well
ReadScale=comp(“MyComp”).layer(“RefLayer”).transform.scale[0] //**Works well
ReadScale=comp(“MyComp”).layer(thisLayer.index).transform.scale[0] //**Does not work
ReadScale=comp(“MyComp”).layer(x).transform.scale[0] //**Does not work (where “x=5”)
It seems as though no variable can be inserted into this location. I am able to use the following in another expression for a different parameter. But when I put it all together it still does not work.
parseInt((thisLayer.index)-2 //**Works correctly
Any feedback or food for thought would be greatly appreciated!
-Thanks!