Skip to main content
Participating Frequently
November 4, 2019
Answered

How to actually use the new text expressions

  • November 4, 2019
  • 3 replies
  • 5195 views

The new text expressions look really useful, but the documentation is not at all helpful.

https://helpx.adobe.com/after-effects/using/expressions-text-properties.html

 

How do I actually use these in context? The documentation just keeps listing things about styles but never shows how to put it all together. When I try to use any of it, it just tells me it's not a function or gives other unhelpful errors. 

 

Let's start with this. How do I override the font of my source text?

This topic has been closed for replies.
Correct answer andras.olah

I actually had the same problem and even got turned down by Adobe Customer Service Representative saying that I should turn to the 'manufacturer' of the expression (WTF, seriously?!) Another CSR member was kinder but he couldn't solve the problem either, unfortunately.

 

Marvin had the solution under a Youtube of School of Motion's:
https://www.youtube.com/watch?v=vufghNC9hGw

 
I solved the issue by switching from ExtendScript to JavaScript in project settings > expressions

 

3 replies

Roland Kahlenberg
Legend
November 4, 2019

And Mikey Borup has an Animation Preset that provides easy access to a few features - https://youtu.be/2usuL8-hqE0

 

The new Text-centric Expressions also seem to allow changing Text Alignment albeit via a long-winded manner since there is no direct way to change Paragraph Alignment.

Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
Participant
October 13, 2020

What are these Text-centric Expressions you are referring to? I cannot find anything about it. This seems like the missing link for useful text manipulation through expressions.

Roland Kahlenberg
Legend
November 4, 2019

Kyle Hamrick who's also an ACP here provides a few examples in this tutorial - Text Styling begins at about the 13:40 mark.

https://www.schoolofmotion.com/tutorials/exploring-new-features-after-effects-17-0

Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
ProbePointGrant
Known Participant
November 4, 2019

I do not yet know the best way of doing it, but this is taken straight from the link you sent: 

text.sourceText.createStyle().setFont("Impact");

Inspiring
November 5, 2019

This expression gives me this error:

 

text.sourceText.createStyle is not a function

 

I've also tried several of the other example expressions, and none of them work. They all throw errors, many telling me the style property doesn't exist. For example, the expression:

 

fontName = thisComp.layer("Original text").text.sourceText.style.font

 

gives me the error:

 

property or method named 'style' in class 'TextProperty' is missing or does not exist. It may have been renamed, moved, deleted, or the name may have been mistyped

 

This is all driving me kind of crazy, since I've been wishing for these features for a very long time. I'm like a kid on Christmas morning who can't figure out how to put his shiny new bike together! What might I be doing wrong?

ProbePointGrant
Known Participant
November 5, 2019

I just put that expression I posted right into the Source Text of a Text Layer and no errors. Are you doing your expressions in the latest version of AE?