Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Create marker directly on the timeline

  • Create marker directly on the timeline

    Posted by Phil Largilliere on March 21, 2016 at 2:39 pm

    Hi everyone,

    I’m looking for the code to create markers on the timeline.
    By now, I’m creating marker on layers, like this :

    myLayer.layer("Background").Marker.setValueAtTime(1,myMarker);

    But this method doesn’t work very well with my projects, because sometimes, layer “Background” doesn’t exist, or it exist twice… I read everywhere that is impossible, but the script trigger can do it, so it can be possible in a way.

    thanks for your help !

    Phil Largilliere replied 10 years, 2 months ago 2 Members · 3 Replies
  • 3 Replies
  • Phil Largilliere

    March 21, 2016 at 3:02 pm

    Thanks Dave for your answer…

    In fact, I just need to create one marker per comp on the timeline. By now, I have to create it manually on the 40 comps of my projects. They all need this information at different levels.

    So I tried to create marker by a different way, but it’s doesn’t work well. Do you have any solution ?

  • Walter Soyka

    March 21, 2016 at 4:37 pm

    Adding comp markers via scripting is not obvious, but not impossible either. You have to cheat a bit! With your target comp open and active, no layers selected, and the current time set to when you want to add the marker:

    app.executeCommand(app.findMenuCommandId("Add Marker"));

    This invokes the Add Marker command under the Layer menu.

    Dave, you can add arbitrary comp markers (besides the 1-0 hotkey comp markers) this same way through the UI — deselect all layers, Layer > Add marker. The hotkey is NumPadAsterisk. Personally, I prefer Alt+NumPadAsterisk, which adds a marker and options the dialog box that lets you rename it immediately.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Phil Largilliere

    March 21, 2016 at 5:35 pm

    Perfect Walter,

    Thank you so much, it works perfectly well. Just a last question : how can I rename the marker ? By now, the marker is added with no number, and I would like it was named “1”.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy