• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

129

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)

Votes

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)

Votes

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

Votes

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

Votes

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