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

How to actually use the new text expressions

Community Beginner ,
Nov 04, 2019 Nov 04, 2019

Copy link to clipboard

Copied

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?

TOPICS
Expressions , How to

Views

4.0K

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 Beginner , Nov 06, 2019 Nov 06, 2019

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

 

Votes

Translate

Translate
Explorer ,
Nov 04, 2019 Nov 04, 2019

Copy link to clipboard

Copied

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");

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
Enthusiast ,
Nov 04, 2019 Nov 04, 2019

Copy link to clipboard

Copied

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?

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
Explorer ,
Nov 05, 2019 Nov 05, 2019

Copy link to clipboard

Copied

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?

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
Enthusiast ,
Nov 05, 2019 Nov 05, 2019

Copy link to clipboard

Copied

Here's a screen grab of the version info, the expression, and the error banner. This is on the MacOS version of AE CC 2020. I might try deleting the app and reinstalling.

 

AE Text Expressions Error.jpg

 

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
Explorer ,
Nov 05, 2019 Nov 05, 2019

Copy link to clipboard

Copied

Very strange. I, unfortunately, do not have an answer for you. Reinstalling AE may fix it, however, before doing that, have you tried different properties, such as, .setFontSize()? If that does not work, I suggest starting a new project if you haven't already and/or deleting your preferences before reinstalling.

Let us know how things go, and if you find a different solution.

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
Enthusiast ,
Nov 06, 2019 Nov 06, 2019

Copy link to clipboard

Copied

Okay, the fix turns out to be simple.

 

The problem setting was Project Settings->Expressions->Expressions Engine

 

This has to be set to "Javascript" for the new text expressions to work.

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
Community Beginner ,
Nov 06, 2019 Nov 06, 2019

Copy link to clipboard

Copied

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

 

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
Valorous Hero ,
Nov 04, 2019 Nov 04, 2019

Copy link to clipboard

Copied

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

Motion Graphics Brand Guidelines & Motion Graphics Responsive Design Toolkits

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
Valorous Hero ,
Nov 04, 2019 Nov 04, 2019

Copy link to clipboard

Copied

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.

Motion Graphics Brand Guidelines & Motion Graphics Responsive Design Toolkits

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 ,
Oct 13, 2020 Oct 13, 2020

Copy link to clipboard

Copied

LATEST

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.

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