-
Iterate expressions that reference a “starting layer”
Hi Guys. I’m wondering if there is a way to iterate expressions that reference a “starting layer”. Here is the example I’m working on.
I’m making a line chart with 10 data points. Those points are spread across an XY chart. To “connect” layer Point 1 and layer Point 2 I use a solid layer named “Point_1-2” which has a Beam Effect with the following expressions:
ON STARTING POINT PARAMETER:
thisComp.layer(“Point 1”).transform.positionON ENDING POINT PARAMETER:
thisComp.layer(“Point 2”).transform.positionThat all is working fine. Here’s my question: What’s the best way to iterate those expressions for the next “connector layer”? Up next I’ll want to connect layer “Point 2” and layer “Point 3” with a solid layer named: “Point_2-3”. The expression on the beam effect would look like this if manually entered:
ON STARTING POINT PARAMETER:
thisComp.layer(“Point 2”).transform.positionON ENDING POINT PARAMETER:
thisComp.layer(“Point 3”).transform.positionThat would work fine, but I’m hoping there is some cool “index” usage I can apply so everytime I duplicate the “connector layer” the expression will update and the beam/connecting line will work automatically as opposed to having to go in and update manually.
Hopefully that makes sense. Haha. Thanks in advance for any help!
ON STARTING POINT PARAMETER:
thisComp.layer("Point 1").transform.positionON ENDING POINT PARAMETER:
thisComp.layer("Point 2").transform.position