-
Reference to it self in other comp
Ok, this might be a bit hard for me to explain since english isn’t my first language, but I’ll try.
Here’s the situation. I have a comp with 250 precomps in it, lined up so the whole comp is opaque. In all of these precomps there’s a 3d-box (simple box made i AE).
The thing is that I want to rotate them at a random time 360 degrees on the y-axis, and when they hit 270 degrees I want the visible side of the 3d-box to change.
What I’ve done is to make to layers in each precomp with this expression on one of them:
a=comp("Zoom-comp").layer("H2").transform.yRotation
if (a<=270) 100 else 0
And this on the other:
a=comp("Zoom-comp").layer("H2").transform.yRotation
if (a>=270) 100 else 0The thing is that if I do it this way, I have to rewrite the code 512 times, on for each layer in each precomp. Så basically what I’m looking for is an expression that replace the “.layer(“H2″)” with something that always points to itself, so I can write the expression only once and then just duplicate the precomp.
Thanks alot!
Hannes