Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Reference Using Index

  • Reference Using Index

    Posted by Liam Campbell on March 8, 2018 at 9:15 pm

    I’m trying to make an expression where I have multiple “Beam” effects and they’re going to connect to circles. The circle layers are called “Circle 1, Circle 2, Circle 3…etc”. What I want to do is make the start point of the “Beam” effect, which is (Index 1) connect to the position of “Circle 1” and the end point to connect to (Index + 1) so “Circle 2”. Essentially I could copy the beam layer for as many circles I have and they should just connect automatically.

    An incorrect example would be like:

    (In the Starting Point attribute of the “Beam” effect)

    thisComp.layer(“Circle [index]”).position;

    (In the Ending Point attribute of the “Beam” effect)

    thisComp.layer(“Circle [index+1]”).position;

    Thank you,
    Liam

    Kevin Camp replied 8 years, 4 months ago 2 Members · 1 Reply
  • 1 Reply
  • Kevin Camp

    March 8, 2018 at 9:55 pm

    i think your looking for something like this…

    for the start point:
    target = thisComp.layer(index + 1) ;
    target.position

    for the end point:
    target = thisComp.layer(index + 2) ;
    target.position

    this would connect the beam start point to the the first layer (circle) bellow the layer that the beam effect is on, and connect the end point to the second layer bellow the beam effect layer.

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy