Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions copy markers from layer markers to comp markers

  • copy markers from layer markers to comp markers

  • Roei Tzoref

    July 13, 2016 at 8:01 pm

    about the money – I was slightly joking. I would like to make service to the community so I could help if you have an urge to do that. for free and the script could be for free too.

    about loading the script and what I wrote in the previous comment: I want to load the script with as few steps as possible. I tried placing it in Ae Scripts folder and Startup and it’s not making it appear under scripts (file->scripts). am I doing something wrong or it is not possible with the script that you provided?

    now I have 4 steps to make:
    1. click file
    2. go to scripts
    3. run script file
    4. click twice at the script

    anyway to make this shorter?

  • Dan Ebberts

    July 13, 2016 at 8:13 pm

    >I tried placing it in Ae Scripts folder

    That should work. You have to restart AE though. Then it should just be File > Scripts > select your script from the list.

    Dan

  • Roei Tzoref

    July 13, 2016 at 8:18 pm

    I thought so too… tried it again and it works. probably I did something wrong before.

    thank you Dan you did it again.

    BTW I also posted a feature request to make copy layer markers to comp marker a feature. hope someone will notice. doing my little part. and of course If I ever come across somebody looking for a way to copy layer markers to comp markers – will give him that Jsx.

    thanks.

  • Roei Tzoref

    November 6, 2017 at 12:24 pm

    Hi Dan and everyone.

    returning to this thread after a while. 5 months after the initial post, Ae released the November update (Ae CC 2017 14.0) with extended scripting support to various things including Comp Markers.

    so surely now there’s a way to copy layer markers to comp markers and retain the comment, right? if I may be so bold to ask you to revise the script. of course if you feel this is a tool worth publishing and getting paid for, i would buy that tool but no scripting tool available.

    Thank you.

    Roei Tzoref
    2D/VFX Generalist & Instructor
    ♫ AeBlues Tutorials ♫
    http://www.tzoref.com

  • Dan Ebberts

    November 6, 2017 at 4:51 pm

    I fleshed it out a little:


    function CopyLayerMarkersToComp(){
    var theComp = app.project.activeItem;
    if ((theComp == null) || ! (theComp instanceof CompItem)){
    alert ("No comp active.");
    return;
    }
    if (theComp.selectedLayers.length == 0){
    alert("No layer selected.");
    return;
    }
    var theLayer = theComp.selectedLayers[0];
    var theMarker = new MarkerValue("");
    var theTime;
    for (var i = 1; i <= theLayer.property("Marker").numKeys; i++){
    theTime = theLayer.property("Marker").keyTime(i);
    theMarker = theLayer.property("Marker").keyValue(i);
    theComp.markerProperty.setValueAtTime(theTime,theMarker);
    }
    }
    CopyLayerMarkersToComp();

    Dan

  • Roei Tzoref

    November 6, 2017 at 8:13 pm

    Great. thanks Dan for putting this out there.

    Roei Tzoref
    2D/VFX Generalist & Instructor
    ♫ AeBlues Tutorials ♫
    http://www.tzoref.com

  • Fernando Almeida

    October 27, 2018 at 7:27 pm

    Is it possible invert this action?
    Send comp markers to marker layer.

  • Dan Ebberts

    October 27, 2018 at 7:52 pm

    Something like this:


    var myComp = app.project.activeItem;
    var myLayer = myComp.selectedLayers[0];

    var sourceProp = myComp.markerProperty;
    var destProp = myLayer.property("Marker");

    for (var i = 1; i <= sourceProp.numKeys; i++){
    destProp.setValueAtTime(sourceProp.keyTime(i),sourceProp.keyValue(i));
    }

    Dan

  • Fernando Almeida

    October 28, 2018 at 2:37 am

    Dan Thanks very much for your help!
    Very very useful script, Congrats
    See you

  • Rasel Islam

    April 22, 2020 at 3:15 pm

    It’s possible to copy from multiple layers?

Viewing 11 - 20 of 25 posts

Log in to reply.

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