Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Measuring hierarchical (nested) distance between comps?

  • Measuring hierarchical (nested) distance between comps?

    Posted by Evan Viera on July 7, 2013 at 12:47 am

    Let’s say I have a comp called conform, which holds a series of precomposed comps 10 deep. Is there a way to return the hierarchical distance between each of those comps and conform?

    ie. this hierarcy

    conform -> comp1 -> comp2 -> comp3 -> comp4

    where comp1 would return “1”, comp2 “2”, and so on.

    thanks

    Mitch Mann replied 12 years, 10 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    July 7, 2013 at 6:31 am

    It would be complicated, and it would only work if the expression had a list (array) of all the nested precomp names, it could go into each comp looking for layers matching the other comp names and possibly construct a hierarchy from that. The key constraint is that comps can only be referenced by name, so there’s no mechanism for an expression to find out the name of its comp’s parent comp.

    Dan

  • Evan Viera

    July 7, 2013 at 7:10 pm

    Ah I see, thanks Dan for the response. Yea that would be more trouble than it’s worth. I’ll just do it manually.

  • Mitch Mann

    July 8, 2013 at 1:47 pm

    You could potentially have a script that you run separately that finds it for you.

    I believe that if its a script (not expression), you could use “.parent”

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