Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Can a comp reference an instance of itself?

  • Can a comp reference an instance of itself?

    Posted by Joe Hamilton on January 29, 2009 at 12:19 am

    Can a comp, if embeded in another comp, reference the instance of itself, when used, to source variables?

    For example if this were possible you could make a special comp that had a piece of text and a circle in it and some expressions to achieve the following.
    When the special comp is placed in another comp at layer 1 the text would be at a scale of 100% and the circle would have a position of [10px, 10px]. Then if it was on layer 2 the text would have a scale of 200% and the circle would have a position of [20px, 20px].

    That example is not that exciting but if it is possible you could create really flexible and reusable comps which would save time in keeping things consistent. Kind of like object orientated coding stuff.

    any ideas on this or other ways of making flexible comps would be appreciated.

    Joe Hamilton replied 17 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 29, 2009 at 12:37 am

    Expressions can only refer to other comps by name. So if you only have one instance of the precomp in your main comp, an exprssion in the precomp could find its comp in the main comp by looking for the layer with the same name in the main comp. If you have more than one instance, you’re pretty much hosed.

    It wouldn’t work anyway (more than one instance) because as soon as you change something in the precomp, all instances of that precomp in other comps will be changed.

    Dan

  • Joe Hamilton

    January 29, 2009 at 4:34 pm

    Thanks for that dan.
    I think it would be really great to see this type of flexibility in After Effects…
    I guess some type of flash/after effects hybrid!
    They are heading in that direction with the new 3dish stuff and video capabilities in flash. Interested to see where it goes.
    thanks again for the feedback.

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