Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions ExtendedScript – Update Layer Marker

  • ExtendedScript – Update Layer Marker

    Posted by Mackie John on January 12, 2020 at 9:10 am

    I’m trying to to a marker update using extendedScript (Layer->Marker->’Update Marker from Source’). But to do this the layer on which this needs to be done needs to active. In my case it’s an audio layer.

    Here is what I have done so far with some help from the this link: https://forums.creativecow.net/thread/227/43715

    Now the problem here is the code only works if the item (or composition) is opened. If the project is loaded but the item/composition is closed the above code doesn’t work. If I open the item/composition manually and execute the above code works fine. The question now is how do I open the item/composition from the loaded project.

    var bodyComp = app.project.items[13]; //MyComposition on the project which relates to item 13
    var test= bodyComp.layers[8]; // my layer (audio in my case)

    test.selected = true; //select the audio layer
    app.executeCommand(2539); // execute the 'Update Marker from Source' from the menu

    Andrei Popa replied 6 years, 3 months ago 2 Members · 1 Reply
  • 1 Reply
  • Andrei Popa

    January 12, 2020 at 2:28 pm

    var bodyComp = app.project.items[13]; //MyComposition on the project which relates to item 13
    var test= bodyComp.layers[8]; // my layer (audio in my case)

    bodyComp.openInViewer();
    test.selected = true; //select the audio layer
    app.executeCommand(2539); // execute the 'Update Marker from Source' from the menu

    Andrei
    My Envato portfolio.

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