Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Help. Script. How to insert comp from project panel…

  • Dan Ebberts

    January 18, 2010 at 5:32 pm

    Here’s an example of adding a specific footage item from the project bin to a selected comp:

    {

    // script assumes destination comp is selected

    var footageName = “zipper 1.avi”;
    var myProject = app.project;
    var myComp = myProject.activeItem;

    // find the footage item
    var myFootage = null;
    for (var i = 1; i <= myProject.numItems; i++){ myFootage = myProject.item(i); if (myFootage.name == footageName && myFootage instanceof FootageItem){ break; } } if (myFootage == null){ alert ("Can't find " + footageName); }else{ myComp.layers.add(myFootage); } } Dan

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