Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions sourceText value to be the layer index number according to current time indicator

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

    Posted by Syed Iqbal on August 19, 2018 at 10:43 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

    Syed Iqbal replied 8 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    August 19, 2018 at 2:45 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

  • Syed Iqbal

    August 19, 2018 at 2:50 pm

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

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