Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects scripting: addComp or precompose method?

  • scripting: addComp or precompose method?

    Posted by Scott G on March 19, 2006 at 9:11 am

    hey script dudes,

    i’m trying to automate a repetitive task, and this automation involves (at the most basic level) taking a selected layer, precomposing it, creating two new comps that each contain that first precomp, and then putting the original precomp (A) and the two new comps (B,C) into a containing comp (D).

    the precomping of the selected layer is working fine.
    now, if i want to create two new comps each containing (A), should i addComp and then (choosing (A) by name) add it to (B), and do the same for (C),
    or
    should i precompose (A), thus creating (B), then repeat to create (C)?

    i guess that seems like a redundant question, but i’m trying to figure out what would be more efficient. i could script it either way, i guess i’m asking which methodology you guys think is better.

    Scott G replied 20 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Jeff Almasol

    March 19, 2006 at 11:38 pm

    Hi Scott,

    I’m not sure I follow how the second procedure is the same as the first. The precompose() method occurs in the context of a comp, so if you’re precomposing the selected layer, the selected layer becomes a precomp layer. So if you’re precomposing the original precomp A (the precomp layer in the original comp), comp B is now in the original comp. Then, if you’re repeating to create C, are you precomping the precomp A layer which is now in comp B?

    In any case, I think I’d go with your first procedure. Seems clearer to me, and also supports the ability to add layers to comps that don’t have the same dimensions, durations, and pixel aspects, which may or may not be important in your scenario. If I’m misunderstanding your second procedure, if it just shaves off a statement or two but might be difficult to debug/follow at some later date, it’s not worth it to me. YMMV.

    Jeff

  • Scott G

    March 20, 2006 at 1:57 am

    thanks jeff, i started thinking i’d go with the first method last night. the reason i tossing up between the two is so all my comps would inherit the dimensions/frame rate/duration of my original piece of footage, but now i know i can make them inherit using either methodology.
    thanks again!

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