Skip to main content
Inspiring
November 3, 2022
Open for Voting

I wish that when Text layer gets its text via expression, that all formatting came with it

I have a project with many comps that have similar text in them. I wanted to use expressions to link each text layer to a Primary comp that would control all the other text layers. This way, all the comps automatically have the same text as the Primary comp, and if I fix a typo in the primary comp, all the layers pointing to it automatically update.

The expression I'm using on the "subscribing" text layer looks like this:

comp("PrimaryComp").layer("[TEXT LAYER] 04-TextLayer").text.sourceText

 It works to get the text from the 04-TextLayer in PrimaryComp, but the text formatting doesn't appear the same. 

Hence my wish that formatting would appear in the layers using this expression.

4 replies

Bruno Quintin
Inspiring
November 4, 2022

What is your version of after effects?

Translate
wesplateAuthor
Inspiring
November 3, 2022

I used your expression, however it does not help. It behaves the same way as when I use the pickwhip to create the expression in my original post. The Primary comp's text layer includes text of different font sizes. When I use expressions, either what AE generates or with yours, the different text sizes do not come across into the expressioned layer.

Translate
wesplateAuthor
Inspiring
November 3, 2022
Thank you, how can I get this via the pickwhip?
Translate
Bruno Quintin
Inspiring
November 3, 2022
var ref = comp("PrimaryComp").layer("[TEXT LAYER] 04-TextLayer").text.sourceText;
ref.style.setText(ref);
Translate