Highlighted

Motion Array's Auto Scaling Text Box code (sourceRectAtTime) suddenly not working

Explorer ,
Oct 06, 2020

Copy link to clipboard

Copied

Hello,

 

I often use Motion Array's Auto Scaling Text Box code in my workflow. It has always worked flawlessly. However, I am trying it now and for whatever reason it is not working. Unless my lack of sleep is catching up with me and I'm just missing something painfully obvious, is there anyone else experiencing issues with sourceRectAtTime coding not working in AE 17.1.4?

 

The code (which I've used successfully a million times!) is:

 

s=[pickwhip to source text]

 

w=s.sourceRectAtTime().width;

h=s.sourceRectAtTime().height;

 

[w,h]

 

Auto Scale Not working.png

As you can see, the code is in, and the box should be the size of the text above, but it isn't.

 

I have tried toggling between JavaScript and Legacy ExtendScript for my Expressions Engine--neither has worked. I have purged the cache. I have uninstalled and reinstalled AE.

 

WHAT AM I MISSING?

You should pickwhip s to the text layer itself, not its source text.

 

Dan

TOPICS
Expressions, Scripting

Views

79

Likes

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

Motion Array's Auto Scaling Text Box code (sourceRectAtTime) suddenly not working

Explorer ,
Oct 06, 2020

Copy link to clipboard

Copied

Hello,

 

I often use Motion Array's Auto Scaling Text Box code in my workflow. It has always worked flawlessly. However, I am trying it now and for whatever reason it is not working. Unless my lack of sleep is catching up with me and I'm just missing something painfully obvious, is there anyone else experiencing issues with sourceRectAtTime coding not working in AE 17.1.4?

 

The code (which I've used successfully a million times!) is:

 

s=[pickwhip to source text]

 

w=s.sourceRectAtTime().width;

h=s.sourceRectAtTime().height;

 

[w,h]

 

Auto Scale Not working.png

As you can see, the code is in, and the box should be the size of the text above, but it isn't.

 

I have tried toggling between JavaScript and Legacy ExtendScript for my Expressions Engine--neither has worked. I have purged the cache. I have uninstalled and reinstalled AE.

 

WHAT AM I MISSING?

You should pickwhip s to the text layer itself, not its source text.

 

Dan

TOPICS
Expressions, Scripting

Views

80

Likes

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
Oct 06, 2020 0
Explorer ,
Oct 06, 2020

Copy link to clipboard

Copied

Here's the error code I get...but I don't think I typed anything wrong.

Auto Scale Error.png

Likes

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
Reply
Loading...
Oct 06, 2020 0
Guide ,
Oct 06, 2020

Copy link to clipboard

Copied

You should pickwhip s to the text layer itself, not its source text.

 

Dan

Likes

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
Reply
Loading...
Oct 06, 2020 1
Explorer ,
Oct 06, 2020

Copy link to clipboard

Copied

Of course! Thank you. I guess I do need some more Zzz's

Likes

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
Reply
Loading...
Oct 06, 2020 0
Community Beginner ,
Oct 06, 2020

Copy link to clipboard

Copied

Hi Evan,

 

if you pickwhip the Layer instead of the sourceText, it should work?

 

Likes

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
Reply
Loading...
Oct 06, 2020 0
Adobe Community Professional ,
Oct 07, 2020

Copy link to clipboard

Copied

For more complex dynamic text layouts and boxes, my extension Pins & Boxes is also very helpful:

https://aescripts.com/pins-and-boxes/

 

And if all you need is a very simple box that grows with your text, here is a very good approach that creates this just with a few effects on the text layer itself:

https://mamoworld.com/motion-graphics-ebook/content47.html

 

Likes

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
Reply
Loading...
Oct 07, 2020 0