ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

sourceText value to be the layer index number according to current time indicator

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Syed Iqbal
sourceText value to be the layer index number according to current time indicator
on Aug 19, 2018 at 10:43:08 am

Hi,
Is there any way I could use a text layer and set it's source text value to be the layer index number of the visible layer or where AE's current time indicator is (CTI) during ram preview?

Thanks.
Syed


Return to posts index

Dan Ebberts
Re: sourceText value to be the layer index number according to current time indicator
on Aug 19, 2018 at 2:45:32 pm

Try this:


txt = "";
for (i = 1; i <= thisComp.numLayers; i++){
if (i == index) continue;
L = thisComp.layer(i);
if (L.hasVideo && L.active){;
txt = i;
break;
}
}
txt



Dan



Return to posts index

Syed Iqbal
Re: sourceText value to be the layer index number according to current time indicator
on Aug 19, 2018 at 2:50:19 pm

Thank you so much Dan. It works like a charm!


Return to posts index

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