Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions using layer’s name instead of index

  • using layer’s name instead of index

    Posted by Ryan Chan on October 24, 2014 at 4:05 am

    hiya, i want to know how can i link up the value thru expression for layers using their layer name rather than index number. say, i have a layer called TEXT 1 and want to follow the position of another layer called Null 1, without considering their layer order inside a comp, just because their layer name ended with “1”. and so on, TEXT 2 will follow Null 2, TEXT 3 will follow Null 3…….

    thanks
    Ryan

    Ryan Chan replied 11 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 24, 2014 at 5:41 am

    If the names are in that format (“Text 1”, “Null 1″, etc.), you could do something like this:

    myNum = name.split(” “)[1];
    myNull = thisComp.layer(“Null ” + myNum);
    myNull.position;

    Dan

  • Ryan Chan

    October 24, 2014 at 6:00 am

    Wow, Yes, Great, thanks again Dan
    cheers
    ryan

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