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

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

New Here ,
Aug 31, 2022 Aug 31, 2022

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
284
Translate
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)
Translate
Community Expert ,
Aug 31, 2022 Aug 31, 2022

Try it this way:

txt = comp("XX").layer("YY").text.sourceText;
style.setFontSize(100).setText(txt)
Translate
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

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

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

Translate
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
LATEST

sorry ignore my previous comment. Still processing this

Translate
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