Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions layer index of parent comp

  • layer index of parent comp

  • Nathan Apffel

    January 28, 2018 at 9:50 pm

    is there a way to reference the layer index of the parent comp? I want to set a value based on the layer number of the current comp in its parent comp. make sense?

    i know there is a thisComp.parent.layer but thisComp.parent.layer.index doesn’t work and i’m not sure how to index works here.

    thanks

  • Dan Ebberts

    January 28, 2018 at 10:38 pm

    You have to reference the parent comp by name:

    comp(“Main Comp”).layer(thisComp.name).index

    Dan

  • Nathan Apffel

    January 29, 2018 at 4:19 pm

    Thanks Dan!

  • Chris O’Dowd

    November 18, 2021 at 9:25 pm

    so if I have 900 precomps and they all are going to have different names … then I cant refrence the parent without manually pasting the name ?

  • Dan Ebberts

    November 18, 2021 at 10:27 pm

    The only way to reference another comp (parent or otherwise) is by name. Sometimes, depending on how you have things set up, you might be able to build the name of the other comp on the fly, based on the name of the precomp where the expression lives.

    Dan

Viewing 1 - 5 of 5 posts

Log in to reply.

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