Search code examples
adobeextendscriptafter-effects

Setting After Effects timeline markers using ExtendScript


The After Effects scripting guide makes it clear how to set layer markers but I have yet to find a way to set timeline markers.

The code for setting a layer marker is as follows:

var myMarker = new MarkerValue("Fade Up");
myLayer.property("Marker").setValueAtTime(2, myMarker);

I would like to add a marker to the timeline but calling the same function on an item returns undefined.

app.project.item[i].property("Marker").setValueAtTime(2, myMarker);

How can I access timeline markers?


Solution

  • Well, it's not officially supported to grab timeline comp markers via AE's Scripting API, but it is possible via scripting. Check out Paul Tuersley's solution on this thread at the Adobe forums. I implemented it and it's working fine.

    http://forums.adobe.com/message/4747367#4747367