Skip to main content
Participant
June 7, 2023
Question

Expression help. Linking Text style from one layer to another.

  • June 7, 2023
  • 1 reply
  • 379 views

Well I have been racking my brain on this, and I read over previous discussions and tried using the same code.  I simply want to create a master text layer and then link all the other text layers in all the other comps I'm making so that when the client asks me to use a different font and size, I just have to change it once.

 

Every time I use the .text.sourceText.style I get an error in my expression.  If I link source Text from one layer to another it links that and copies the text.  I specifically want the Text Style.  I'm working in AE 2022 and using Monotype.  I'm not sure if that is what is affecting my script.

Thanks

This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
June 7, 2023

If all you're trying to do is apply the master style to the local text, then something like this should work:

comp("master").layer("Master Text").text.sourceText.style
Participant
June 7, 2023

 I keep getting the same error message. That the property or method named 'style' in Class 'TextProperty is missing or does not exist.  It may have been renamed, moved, deleted.

Dan Ebberts
Community Expert
Community Expert
June 7, 2023

Ah, you must either have an old version of After Effects or you have File>Project Settings>Expressions set to Legacy ExtendScript instead of JavaScript