Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expressions operating in nested comps?

  • Expressions operating in nested comps?

    Posted by Paul Ducco on October 23, 2022 at 12:38 am

    Hi all, I’ve done a quick search…but probably not using specific terms that reflect what has been used before.

    I’m wondering if it’s possible to reference nested comps in expressions.
    i.e, I’ve created a number of variables which can be controlled through Essential Graphics so multiple versions of the same base comp can exist and be customised.

    What I’m wondering is…if there’s some way to write expressions in the base comp that take values from the comp it is placed in (i.e, I assume this is referred to as the Parent comp?)
    And example of such a script would be that the name of the comp layer would control a text layer within the reusable comp. The only way I’ve been able to do this is with a simple/additional script being added to the placed comp IN the parent comp.

    While it is functional this way…I’m trying to keep the reusable comps contained in a single reusable element, without the need for additional tweaks once placed.

    Hope this makes sense. Happy to clarify.

    Thanks in advance.

    Paul Ducco replied 3 years, 6 months ago 2 Members · 5 Replies
  • 5 Replies
  • Filip Vandueren

    October 23, 2022 at 8:56 am

    Hi Paul,

    If you want to use variables from the comp where the precomp is placed (like its name), you have to add the expression to the essential property of that instance.

    So, if you use it in multiple comps, you indeed have to add the expression everywhere manually.

    Hope that’s clear.

  • Paul Ducco

    October 23, 2022 at 9:41 am

    Dammit. Thanks Filip, it’s the answer I’d expected…but didn’t really want.

    Are there any work arounds on this? Trying to build a suite of tools that can be used across a production team, so ideally it would be a relatively “drag-set-and-forget” type solution.

  • Filip Vandueren

    October 23, 2022 at 5:25 pm

    Can you give a concrete example?

  • Filip Vandueren

    October 23, 2022 at 5:28 pm

    For a kind of foolproof solution:

    The expression could be in an animation preset.

    And you could build the precomp in such a way that it has ginormous pink letters screaming ‘don’t forget to apply animation preset “ActivateLowerThird”!’

    Which disappears when the preset it applied ?

  • Paul Ducco

    October 24, 2022 at 9:52 pm

    Thanks Filip. The solution you propose isn’t completely out of the question.

    I might have to rethink the approach a little.

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