ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How to find the index of a nested comp in it's parent comp?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Carey Pagan
How to find the index of a nested comp in it's parent comp?
on Jun 23, 2017 at 8:38:50 am

I want to create an expression on a layer of a comp, that references the comp's index inside the parent comp.

Something like

index = comp("Parent Comp").thisLayer.index

is there a way?


Return to posts index

James Ronan
Re: How to find the index of a nested comp in it's parent comp?
on Jun 23, 2017 at 8:51:43 am

Almost!

index = comp("Parent Comp").layer("Child Comp").index;

Replace Child Comp with whatever your precomp is named.


Return to posts index

Carey Pagan
Re: How to find the index of a nested comp in it's parent comp?
on Jun 24, 2017 at 5:46:41 am

Yeah I knew it could be referenced by name but there are more than 50 instances of the same pre comp so I really wanted a way to have their expressions reference the index of that particular instance of the pre comp inside it's parent comp.

Is there any other way to get a reference to 'self' like in c?


Return to posts index


Dan Ebberts
Re: How to find the index of a nested comp in it's parent comp?
on Jun 24, 2017 at 6:32:33 am

There's no way to do that. Otherwise, you could have the same precomp rendering differently in different layer instances, which can't happen.

Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]