Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions pull effect index into layer ID string

  • pull effect index into layer ID string

    Posted by Steve Renard on June 1, 2011 at 4:01 pm

    Hi all – I am trying to link a bunch of separate lens flare effects (on an adjustment layer) to the 3D position of a bunch of null objects called “Camera Point 1”, “Camera Point 2”, etc. with several dozen points. I have the code to do the link, but it requires manually changing the layer indentity and I am wondering if there is a quick and easy way to pull the index of an effect into that string that identifies the layer. In my head it would read something like this:

    layer = thisComp.layer(“Camera Point >>effect index number<<"); layer.toComp([0,0,0]) The code I'm currently using is below. I imagine there's a quick way to do this - I just haven't been able to find it. Thanks for your help! Steve layer = thisComp.layer("Camera Point 1");
    layer.toComp([0,0,0])

    Steve Renard replied 14 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 1, 2011 at 6:06 pm

    Try this:

    layer = thisComp.layer(“Camera Point ” + thisProperty.propertyGroup(1).propertyIndex);
    layer.toComp([0,0,0])

    Dan

  • Steve Renard

    June 1, 2011 at 6:42 pm

    That’s perfect – thanks Dan!

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