ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Text and Markers expression issue

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Levi George
Text and Markers expression issue
on Jan 9, 2014 at 6:11:08 am
Last Edited By Levi George on Jan 9, 2014 at 6:11:45 am


So I'm working on an animatic template where a text asset can read into the markers on a comp and display the shot number. I'm using Markers at the start and end of each shot, where each cut is. It means I can drag these markers around and the label will update automatically. I'll eventually expand this for frames and shot length etc.

I put some code in a text object hoping the text would display the correct shot number.
but as soon as it moves onto the second Marker it just reads

[object layer]

My code is below.

Thanks for your help in advance.

for (
n=1 ;
time>=thisComp.marker.key(n).time && time<thisComp.marker.key(n+1).time ;
{value = n} ;

Return to posts index

Dan Ebberts
Re: Text and Markers expression issue
on Jan 9, 2014 at 6:23:31 am

It should be close to this:

m = thisComp.marker;
n = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;


Return to posts index

Levi George
Re: Text and Markers expression issue
on Jan 12, 2014 at 3:06:24 am

It was exactly that! Thank you very much!

Return to posts index

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