Activity › Forums › Adobe After Effects Expressions › Displaying source timecode of another layer?
-
Displaying source timecode of another layer?
Posted by Navarro Parker on October 16, 2015 at 5:43 pmHow can I display the source timecode for a layer (which is completely different from the comp timecode)?
Grant Van zutphen replied 3 years, 11 months ago 3 Members · 3 Replies -
3 Replies
-
Dan Ebberts
October 16, 2015 at 6:28 pmTry this:
L = thisComp.layer(“your layer”);
timeToTimecode(L.sourceTime(time))Dan
-
Navarro Parker
October 16, 2015 at 7:16 pmThanks Dan. I tried it out, but it doesn’t seem to be accurate. It’s off a few frames.
I found this expression that is totally accurate, but I have no idea how it’s working. What is it doing differently?
https://forums.creativecow.net/thread/2/1008244
for(i=2;i<=thisComp.numLayers;i++){
if(thisComp.layer(i).inPoint <= time && thisComp.layer(i).outPoint >= time){
text.sourceText = thisComp.layer(i).name +” — “+ timeToCurrentFormat(thisComp.layer(i).sourceTime());
}
} -
Grant Van zutphen
May 19, 2021 at 1:20 amAll you need to do is change timeToTimecode to timeToCurrentFormat, like this:
L = thisComp.layer(“your layer”);
timeToCurrentFormat(L.sourceTime(time))
Reply to this Discussion! Login or Sign Up