width of a text layer and other text questions

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
flaviocpontes
Posts: 2
Joined: July 19th, 2007, 7:19 am

Is there a way to get the real width value from a text layer, instead of the width of the compositions it's in?

Is there a way to set character attributes, like font, size and color through scripting?

I'd really like to know this. My boss wants me to try to automate the creation and render of text-based animations that we must do every week.
flaviocpontes
Posts: 2
Joined: July 19th, 2007, 7:19 am

I just figured I posted the topic in the wrong forum. sorry.
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

AE CS3 has a sourceRectAtTime() method for retrieving a text layer's size. Nab posted a good solution for AE7 on page 4 of this topic:
viewtopic.php?t=150

Scripting doesn't have access to the character attributes. You can get the script to add text animators and control it that way, as I've done with my karaoke script:
viewtopic.php?t=380

I'm not aware of a way to change the font. A new text layer is created using the font that is selected in the Character panel.
Darkmoon_UK
Posts: 62
Joined: September 5th, 2006, 3:45 am
Location: Chiswick, London, UK
Contact:

These are both issues which I have written and phoned Abobe several times about; straining to emphasize that these two holes in AE's scripting capabilities bring its entire use in our graphics pipeline to hang in the balance.

I manage the graphics pipeline for interactive DVD projects where I script the generation of thousands of assets heavily involving text. So far we've had to kludge our way around certain issues or simply persuade our clients that they don't really *need* Italics etc. which isn't fun to have to do.

Its great to hear about the CS3 function: that came out quietly, the changelog didn't mention any new scripting features? Without the time to test it right now, is anyone else in a position to confirm that it does work as you'd expect for text layers? What about when the text layer is partially off screen?

PS I have experimented a lot with the various suggested methods for reading the bounding rectangles of text in AE7
Post Reply