Page 1 of 1

Marker Comment to Source Text on Text Layer

Posted: November 26th, 2007, 2:58 pm
by bexier
I have a movie file that is ticked with Layer Markers and comments on each Marker. I am looking for a way to have the comment drive the Source Text on the Text layer.

Each time the time slider crosses a marker, it reads the comment box and displays that text. It should work like Hold keyframes.

Posted: November 26th, 2007, 4:03 pm
by Dan Ebberts
Try this:

Code: Select all

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

if (n > 0) m.marker.key(n).comment else  ""
Dan