Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Current Frame Number

  • Current Frame Number

    Posted by Ariel Levental on March 4, 2011 at 12:35 pm

    Hi everyone

    i’m using an expression that shows me the active layer name in an Edit.
    i was wondering if there’s a way to add the current active layers’ frame number as well…
    i found the original expression in the AE help file but i just can’t seem to tweak it to add that extra funtionality.
    and i don’t want to paste a “Timecode” effect on every layer if possible.
    any ideas ?
    any help would be more than welcome
    and thanks in advance

    A

    source_footage_name = "";
    for (i = 1; i <= thisComp.numLayers; i++){
    if (i == index) continue;
    my_layer = thisComp.layer(i);
    if (! (my_layer.hasVideo && my_layer.active)) continue;
    if (time >= my_layer.inPoint && time < my_layer.outPoint){
    try{
    source_footage_name = my_layer.source.timeToFrames(time);
    }catch(err1){
    source_footage_name = my_layer.timeToFrames(time)
    }
    break;
    }
    }
    source_footage_name

    Jacob Morgan replied 8 years, 5 months ago 3 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    March 4, 2011 at 7:25 pm

    I think you need either:

    timeToFrames(time – myLayer.startTime);

    or

    timeToFrames(time – myLayer.inPoint);

    Dan

  • Jacob Morgan

    December 19, 2017 at 6:41 pm

    Six years later this post is still helpful! Thanks Ariel and Dan. It looks like these days I was able to drop the “myLayer.” part.

    -Jacob

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