Skip to main content
Participant
January 13, 2012
Question

Nested comp targeting element in a layer present in the containing comp..?

  • January 13, 2012
  • 2 replies
  • 1343 views

I am wanting to source the text for a Text layer with the following (as used by the pickwip)

thisComp.layer("Name of Layer")

However I would like to make a text style-template (as a comp, so I can use it in other comps) and then have custom text in those main comps which the template would use for the text in those instances.

So how do I target a layer in the main comp (maybe with a predefined name)?

Or is there a better way to do this?

Thanks

This topic has been closed for replies.

2 replies

Participant
January 13, 2012

Ok, thanks, but what if I want to be flexible about "Main Comp" so that the template comp with that expression could be used inside multiple comps without having to commit to one?

Dan Ebberts
Community Expert
Community Expert
January 13, 2012

Well, an expression can't figure out what comp its own comp is nested within, if that's what you're asking. What workflow were you envisioning for connecting the template to the appropriate comp?

Dan

Participant
January 13, 2012

I am basically wanting to create a animating piece of text in a particular style for series of comps that make up the master comp.

The text is to be used for labels throughout the main movie so there are many instances of it.

What I would like is to have the animation and style of the text labels to be only in one place so I can refine or change it later without having to edit all the instances.

I am used to using CSS in webpages to the same effect.

Dan Ebberts
Community Expert
Community Expert
January 13, 2012

I'm not sure if this is what you're after:

comp("Main Comp").layer("Name of Layer").text.sourceText

Dan