FORUMS: list search recent posts

using layer's name instead of index

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
ryan chan
using layer's name instead of index
on Oct 24, 2014 at 4:05:49 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



Return to posts index

Dan Ebberts
Re: using layer's name instead of index
on Oct 24, 2014 at 5:41:49 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



Return to posts index

ryan chan
Re: using layer's name instead of index
on Oct 24, 2014 at 6:00:39 am

Wow, Yes, Great, thanks again Dan
cheers
ryan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]