-
Using Layer numbers to set effect parameters. “name.split” Help
Hello all,
I am in need of some expression help using the name.split expression. I have tons of circles in individual shape layers that are all labeled “CD_01”, “CD_02” and so on. I’m connecting them all with beam effect to draw lines between them. Each beam layer is labeled “CL_01”, “CL_02”.
I’d like it so the position expression of the beam effect updates each time I duplicate the layer, to follow the next numbered circle that matches the number on the beam layer’s name.
This is where I’m at right now, but I’m getting a Sytex error
n = thisComp.layer(“CL_01”).name.split(“_”)[1];
CD = thisComp.layer(“CD_” + n);
CD.position;