Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Report duration of all projects Comps

  • Report duration of all projects Comps

    Posted by Erick Pinell on August 31, 2009 at 7:33 pm

    Is there a script that will report the duration of each comp in a project? I’ve searched several forums but haven’t been able to find anything useful.

    Thanks,
    Erick.

    Filip Vandueren replied 17 years ago 2 Members · 1 Reply
  • 1 Reply
  • Filip Vandueren

    September 1, 2009 at 10:08 pm

    This should do it…
    right now it just writes the result to the Javascript Console of the extendscript editor, and displays a dialog.
    If you have a hundred comps in the project, that dialog might get bigger than the screen, just hit enter !

    comps=extractCompItems(app.project);

    report="Comp-length Report\r";
    for (c in comps) {
    report+=("Comp \""+comps[c].name+"\" has a duration of "+comps[c].duration+" sec\r");
    }
    $.writeln(report);
    alert(report,'report');

    function extractCompItems(prj) {
    comps=[];
    if (prj.numItems) {
    for (i=1;i<=prj.numItems;i++) {
    it=prj.item(i);
    if(it.typeName=="Composition") {
    comps.push(it);
    }
    }

    }
    return comps;
    }

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