Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Add project item to an active comp

  • Add project item to an active comp

    Posted by Rainier Raydán on May 16, 2017 at 5:53 pm

    Hi!

    I`m trying to add 2 items from the project to a bunch of comps.

    I have this:

    var itemOne = app.project.item(16);
    app.project.activeItem.layers.add(itemOne);

    the console says : undefined is not an object…
    Can anybody help me?

    Rainier Raydán replied 9 years ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    May 16, 2017 at 7:28 pm

    I just tried it and it worked for me, but that assumes that a comp is the active item. You mentioned adding 2 items to a bunch of comps–how are you switching comps?

    Dan

  • Rainier Raydán

    May 16, 2017 at 8:01 pm

    Hey Dan!

    I dont know… Im a beginer in scripting… this is what I got

  • Dan Ebberts

    May 16, 2017 at 8:18 pm

    Ah, it looks like you have ExtendScript Toolkit linked to itself, not After Effects (in the dropdown directly above your code).

    Dan

  • Rainier Raydán

    May 16, 2017 at 8:31 pm

    DUH!!!!!! sorry… Works just fine! Thanks!

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