ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Current Frame Number

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ariel Levental
Current Frame Number
on Mar 4, 2011 at 12:35:24 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


source_footage_name = "";
for (i = 1; i &lt;= thisComp.numLayers; i++){
if (i == index) continue;
my_layer = thisComp.layer(i);
if (! (my_layer.hasVideo && continue;
if (time >= my_layer.inPoint && time &lt; my_layer.outPoint){
source_footage_name = my_layer.source.timeToFrames(time);
source_footage_name = my_layer.timeToFrames(time)

Return to posts index

Dan Ebberts
Re: Current Frame Number
on Mar 4, 2011 at 7:25:50 pm

I think you need either:

timeToFrames(time - myLayer.startTime);


timeToFrames(time - myLayer.inPoint);


Return to posts index

Jacob Morgan
Re: Current Frame Number
on Dec 19, 2017 at 6:41:33 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.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved