Im not an expression whiz, but I know a little bit.
I wanted to know if there is a way for an expression to refer to a layer inside the comp in which it is nested without actually typing out the name of the comp it is nested within. To clarify, as far as I know AE allows you to refer to "thisComp" or another comp by name. But Im working on a project where if I could easily refer to the comp which that layer is nested within, it would save me a LOT of trouble. Any help would be appreciated.
[Brian Walsh]"I wanted to know if there is a way for an expression to refer to a layer inside the comp in which it is nested without actually typing out the name of the comp it is nested within."
Not automatically. It's a scope problem -- the precomp has no idea what (if anything) it's nested within.
You can, however, use an object so that you'd only have to refer to the main comp once. Open your expression with: c = comp("Main Comp");
Now, instead of continually referring to comp("Main Comp") in your expression, you can use c as a kind of shorthand: c.layer("Black Solid in Main Comp").transform.position
You can also change which composition the entire expression refers to by changing only that first line.
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events