ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Is it possible to create text flags for custom text styles for Motion Graphics Templates?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Clint Porter
Is it possible to create text flags for custom text styles for Motion Graphics Templates?
on Jun 16, 2020 at 1:58:16 pm

Hi everyone,

I've been making more and more Motion Graphics Templates for my editor coworkers, and I'd love to be able to give them a way to set individual words in bold, italic, or perhaps a custom callout color.

Is there an expression I can write that would allow me to use some agreed-upon markers in the text string, like perhaps < b >< /b >, and < i >< /i >, to switch out the font or the text fill color?

Thanks so much!


Return to posts index

Filip Vandueren
Re: Is it possible to create text flags for custom text styles for Motion Graphics Templates?
on Jun 18, 2020 at 8:25:09 pm

AFAIK, you can now get and set the style of a text-layer via expressions,
but you can only set the style of the entire layer, not individual letters/words, ranges.

Alternatively, you could do faux Bold, faux italic, and colors easily using textAnimators.
A Bold would be a thicker Stroke on some letters, Italic would be a slight Skew, Fill and Stroke colors can be set with textAnimators too.

Using some expressions on The sourceText and expression Selectors on those animators, a Frankenstein html-parser can be created, although - of course - it renders horribly slow.

Here's something I spitballed together:
14189_htmlparser.aep.zip



Return to posts index

Clint Porter
Re: Is it possible to create text flags for custom text styles for Motion Graphics Templates?
on Jun 18, 2020 at 8:50:56 pm

Wow Filip, that's really amazing! Nice job on that!

While I'm really looking forward to the day that After Effects can give Premiere users something more flexible, I think I'll try to incorporate the color fill code into what I'm making.

Thanks again! -Clint


Return to posts index


victor ribbs
Re: Is it possible to create text flags for custom text styles for Motion Graphics Templates?
on Jul 9, 2020 at 3:34:28 pm

Hello,
this is exactly what I'm looking for but I have a error typeError ranges.toSource is not a function, I populate the text field with a script.
could you help me ?


Return to posts index

Filip Vandueren
Re: Is it possible to create text flags for custom text styles for Motion Graphics Templates?
on Jul 9, 2020 at 3:36:47 pm

This project uses the old Javascript engine.
Project Settings -> Expressions -> Extendscript Legacy.

I'll try and fix it tomorrow, but it's still just a proof of concept, don't know if this is production-ready.



Return to posts index

Filip Vandueren
Re: Is it possible to create text flags for custom text styles for Motion Graphics Templates?
on Jul 9, 2020 at 3:49:33 pm

ranges.toSource();

has to become:

JSON.stringify(ranges);

and every eval() has to be changed to JSON.parse()



Return to posts index


victor ribbs
Re: Is it possible to create text flags for custom text styles for Motion Graphics Templates?
on Jul 9, 2020 at 3:54:44 pm

thank-you

on https://helpx.adobe.com/after-effects/using/legacy-and-extend-script-engine...
i have find this

props.join("\n");
Returns an array of strings listing the properties and methods available.


Return to posts index

victor ribbs
Re: Is it possible to create text flags for custom text styles for Motion Graphics Templates?
on Jul 9, 2020 at 4:04:02 pm

thank-you
it works with your corrections


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]