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]
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
Copy link to clipboard
Copied
Here's the error code I get...but I don't think I typed anything wrong.
Copy link to clipboard
Copied
You should pickwhip s to the text layer itself, not its source text.
Dan
Copy link to clipboard
Copied
Of course! Thank you. I guess I do need some more Zzz's
Copy link to clipboard
Copied
Hi Evan,
if you pickwhip the Layer instead of the sourceText, it should work?
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