Thanks Dan, I'll give that a try... Can't say I fully understand the whole rectAtTime thing... It's hard to visualize. I know that when I select the text layer the bounding box selection is around the text itself.
I just got schooled. Here is the result. Nice clean, elegant text layer fitting //Get Text Layer Width var myTextLayer = compElement.layers var rect = myTextLayer.sourceRectAtTime(1, true); var TextWidth = rect.width; //If the layer is too big, scale it down if(TextWidth > targetW){ var Y = (100*(t...
I've figured out how to add a shape layer to a comp but am unclear how to add a shape to the layer. How do I add a rectangle to the shape layer and access properties for the rectangle like; size, position, roundness? How do I add a stroke to the rectangle and access it's properties? The API has no i...
I figured out that if the project contains no errors that it pops up alerts for each progress. Apparently, there is something called error severity. Some of the error severities are NAKED, PROGRESS and PROBLEM. Anyone know where I can find documentation on the different severity types? This script w...
I'm using this code to primarily catch errors in the render (watch folder). (ie) Missing effects, fonts, etc... It works but it also wants to prompt me for everything it is doing, as in non-error functions. (ie) When opening project, where it is saving render, etc. It seemed to work yesterday and no...
After Effects CS4 added more scripting support for text properties, but I don't think the documentation is available yet. Here's an example of how you'd query and change the font and font size: { // select a text layer before running this script var activeItem = app.project.activeItem; var theValue...
I have a script that prompts the user to select a CSV file. The script then parses the CSV into a table. I'm not sure how to tell it to ignore the first line of the table. Here is the script: var table = new Array(); var lines = encoded_data.split(/\r*\n/); for (i = 0; i < lines.length; i++) { table...
This works perfectly! I'm getting some hitch in the animation though. At some point in the animation (no association with a key frame) the last name moves towards the first name and then away within two frames and the note line does the same towards the last name and then away.
I checked and they are both justified left. I tested the expression again by creating a new project with just the first and last name. It worked perfectly but I found the problem. It works when I have the last name parented to the first name but when I add another text layer and parent it to the las...