Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions (Dual comps) Refer layer name to own comp name?

  • (Dual comps) Refer layer name to own comp name?

    Posted by Stanley Gucwa-bucasas on May 2, 2011 at 12:55 am

    Hi,

    x = comp(“DualComp”).layer(“Stan1”).transform.position[2];

    most of you know this links the z position of two layers that are located in separate comps.

    Layer “Stan1” is a composition nested in comp “DualComp”

    Within the “Stan1” comp, I applied the above expression to a layer.

    My question: because my comp name “Stan1”, becomes its layer name when I nest it in “DualComp”, is there a code i can replace “Stan1” with in the above expression?

    I want to be able to duplicate nested comp “Stan1” within “DualComp” and have the expression update accordingly.

    for example:

    x = comp(“DualComp”).layer(USE THE NAME OF THE COMP YOU ARE IN).transform.position[2];

    haha

    Thank you!

    Stanley Gucwa-bucasas replied 15 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 2, 2011 at 1:25 am

    Like this:

    x = comp(“DualComp”).layer(thisComp.name).transform.position[2];

    Dan

  • Stanley Gucwa-bucasas

    May 2, 2011 at 1:39 am

    should have known that!

    thanks again Dan, really appreciate it

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