Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
bexier
Topic Author
Posts: 4
Joined: Thu Mar 15, 2007 2:50 pm
Location: Los Angeles
Contact:

Marker Comment to Source Text on Text Layer

Mon Nov 26, 2007 2:58 pm

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.
----
Jason Hearne
Senior Designer/Animator - GSN
 
Dan Ebberts
Posts: 318
Joined: Sat Jun 26, 2004 10:01 am
Location: Folsom, CA
Contact:

Mon Nov 26, 2007 4:03 pm

Try this:

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

Who is online

Users browsing this forum: No registered users and 2 guests