ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Essential Graphics lower third template – Editing source text changes font size

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Bendik Ramm
Essential Graphics lower third template – Editing source text changes font size
on Oct 10, 2018 at 3:33:17 pm

Hello great people!

I am making a lower third template for a client in After Effects and need it to be dummy proof and editable inside Premiere Pro.

The lower third template has two lines of text: name and title. The two lines of text use different fonts with a different font size for hierarchical purpose. Behind the text there is a shape layer that automatically resizes to the width of the text. For this auto-resizing to work my two lines of text are placed inside the same Text layer (with a line-break to separate the two lines) so that the "sourceRectAtTime" code on my shape layer scales to the widest of the two lines.

I have exported this whole composition as an "Motion Graphics Template" through the Essential Graphics panel and it's imported into Premiere Pro without problems. Everything looks as it should until I try editing the Source Text. When doing so my second line of text is suddenly formatted the same as the first line (same font and size). So my question is simply if there is a way around this?

Here are three possibilities I have considered:

1. Separate the lines into two text layers
But how do I then get the "sourceRectAtTime" to pick the width of the widest/longest line of text? Is this possible somehow using if/else commands?

2. Separate the lines and precompose
But then the "sourceRectAtTime" extracts the width of the entire precomp, not just the width of the text.

3. Define shape layer width through a slider control
Instead of auto-resizing the box I could define the width of the shape layer through a slider that I include in the Essential Graphics template, but then I won't have control of the margins, and I do not trust the client to use it correctly.

I would immensely appreciate any help I could get!
Thank you very much for your time :)

s =thisComp.layer("Text");
a = ((s.sourceRectAtTime(time-s.inPoint,true).width)+72);
x = a*effect("Slider Control")("Slider");
y = 142;

[x,y]


Return to posts index

Dan Ebberts
Re: Essential Graphics lower third template – Editing source text changes font size
on Oct 10, 2018 at 5:34:59 pm

Probably option 1. It will probably look something like this:

s1 =thisComp.layer("Text 1");
w1 = s1.sourceRectAtTime(time-s1.inPoint,true).width;
s2 =thisComp.layer("Text 2");
w2 = s2.sourceRectAtTime(time-s2.inPoint,true).width;
w = Math.max(w1,w2);
a = w+72;
x = a*effect("Slider Control")("Slider");
y = 142;

[x,y]


Dan



Return to posts index

Bendik Ramm
Re: Essential Graphics lower third template – Editing source text changes font size
on Oct 10, 2018 at 6:41:46 pm

Thank you so much Dan Ebberts, to be honest I'm a bit starstruck that you replied! I greatly appreciate you taking the time to solve this. It works like a charm. This is actually far from the first time you've saved a project of mine, and I just want to extend my gratitude to people like you putting so much time and energy into helping others out. You're the very best!


Return to posts index

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