Comp name as source text?
Copy link to clipboard
Copied
Hi guys,
is it possible to get the name I chose for a comp as source text for a text field inside this comp?
I do not mean this "thisComp.name" expression, because it takes the comp name from its origin. I want to use the name I entered for the instances I put into my timeline. Any chance?
Cheers,
Stefan
Copy link to clipboard
Copied
Are you talking about a precomp's layer name within another comp? If so, I don't think there's any way to get that from within the precomp.
Dan
Copy link to clipboard
Copied
Thank you, Dan. I already thought that might be impossible.
Anyway, in other words: In my timeline, I have one composition (template) that contains beside some shape layers a text field. Then I duplicated this composition 50 times and changed the position (x,y). Now I thought, it would be nice, if could change the text for each copy/duplicate.
But when I add an "thisComp.name;" to the text source, it outputs just "template", the name of the composition in my project window instead of the names I chose in the timeline for each duplicate.
I guess, that's what you meant, right?
Copy link to clipboard
Copied
Yes, you'd have to create (and name) the duplicates in the project panel. Also, there's no way to get duplicate precomp layers that have the same source comp to render differently.
Dan
Copy link to clipboard
Copied
Ok, thank you!
Copy link to clipboard
Copied
Hey Stafang, I'm almost 5 years to late but had the same problem today.
It is possible!
Within de pre-comp/template (wich contains the text-layer) you ad the 'Source Text' you want to change to the 'Essential Graphics'-panel.
Now when you use this pre-comp/template in an comp it contains a new propertie in its properties called 'Essential Properties'. Here you can ad an expression to the Source Text propertie you added: 'thisLayer.name'.
Now he will use the layer name as source text for only that version/layer of your pre-comp/template.
So you can have multiple duplicates of the same template-comp with different text.

