Set Font Style not working when sourcing text from different layer.

New Here ,
Aug 31, 2022 Aug 31, 2022

Copy link to clipboard

Copied

Hello wizards

I'm being buffled by a simple expression somebody might help me with.

I am trying to .style.setFont()  a text layer which sources its text from a master layer from another comp.

Now, when I use this expression all works fine

fabioB_0-1661947201408.png

but when I source the text from another layer,

fabioB_1-1661947299928.png

It stops sourcing the right text and shows the actaual layer text instead,

meaning I lose the capacity to link it to external text sources, which makes it useless for me.

 

Any idea why this might be happening and/or how to fix it?

Thanks in advance for your help fellas

 

 

 

TOPICS
Error or problem , Expressions

Views

41

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 31, 2022 Aug 31, 2022

Try it this way:

txt = comp("XX").layer("YY").text.sourceText;
style.setFontSize(100).setText(txt)

Likes

Translate

Translate
Community Expert ,
Aug 31, 2022 Aug 31, 2022

Copy link to clipboard

Copied

Try it this way:

txt = comp("XX").layer("YY").text.sourceText;
style.setFontSize(100).setText(txt)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 31, 2022 Aug 31, 2022

Copy link to clipboard

Copied

great so i only missed teh ";"...

not sure if I feel better or worst ut thanks a lot

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 31, 2022 Aug 31, 2022

Copy link to clipboard

Copied

LATEST

sorry ignore my previous comment. Still processing this

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines