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?
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
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");
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?
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?
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.
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.
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.
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
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
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.
Copy link to clipboard
Copied
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.