ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

External Scripts /Txt files to drive AE comps

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Zak Chamberlain
External Scripts /Txt files to drive AE comps
on Feb 13, 2018 at 4:11:55 pm

Hi I am working on a project with multiple titles. I need to be able to change colour and spacing via an external script that can then drive After effects (AE) externally and render out all the comps with variable keyframes .

For example
text_comp_1 : 33 frames
line one
underline
line two

text_comp_2: 66 frames
line one but longer text
underline (matches length of line one)
line two

Is there a way if there was a global change of colour and spacing. I could use a script/txt file to change the global colour and spacing between the text and render out all the title comps with there own varied keyframes.

Extra question. For the underline if it is a shape layer is there an expression that can make the mask/shape layer follow the length of the line 1 length.

example
line 1

line one of another comp with a coloured underline

Eager to hear any ideas
Thanks


Return to posts index

Walter Soyka
Re: External Scripts /Txt files to drive AE comps
on Feb 15, 2018 at 10:21:35 am

I think you can do all this with an adaptation of an off-the-shelf script. Michael Cardeiro's CompsFromSpreadsheet script [link] can handle a lot of what you want to do.

You could handle color and tracking with expressions, and feed your template the data as text from your spreadsheet.

You can handle the underline with a shape layer and the sourceRectAtTime() method:
http://evanabrams.com/sourcerectattime-expression-adobe-after-effects-tutor...

Note that if you're working with Premiere, a lot of this may be unnecessary. You could use the Essential Graphics Panel:
https://helpx.adobe.com/premiere-pro/using/essential-graphics-panel.html

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Zak Chamberlain
Re: External Scripts /Txt files to drive AE comps
on Feb 15, 2018 at 5:47:54 pm

Thanks for your reply.

The comps from script is handy and something i will look into.

As for the expressions... that control the layer to look at a data text file and change the color of all the text in the whole project. What are they? I understand the data file will be JavaScript, but what is the aescript to source the file for color from the text file.

The underline expression wont work as i am not using a shape layer. It is a layer held within its own comp, that I have a mask over to define the underline. It would be great if the mask could move as a child length top the text line above it.

We aren't using premiere pro but good to know what it does and doesn't have.

Thanks for you help. If you can offer any more that would be really helpful.


Return to posts index


Walter Soyka
Re: External Scripts /Txt files to drive AE comps
on Feb 16, 2018 at 10:06:38 pm

[Zak Chamberlain] "As for the expressions... that control the layer to look at a data text file and change the color of all the text in the whole project. What are they? I understand the data file will be JavaScript, but what is the aescript to source the file for color from the text file."

Imagine your spreadsheet has a column for Red, a column for Blue, and a column for Green. In each of those columns in your spreadsheet, you put a single 0-255 value to represent its color component value. You also create text layers named ^Red, ^Green and ^Blue.

The CompsFromSpreadsheet script will then populate those values

Put a Fill effect on your text layer, Alt+click the Color stopwatch, and paste an expression like this:
r = parseInt(thisComp.layer("^Red").text.sourceText) / 255;
g = parseInt(thisComp.layer("^Green").text.sourceText) / 255;
b = parseInt(thisComp.layer("^Blue").text.sourceText) / 255;
[r, g, b, 1];




[Zak Chamberlain] "The underline expression wont work as i am not using a shape layer. It is a layer held within its own comp, that I have a mask over to define the underline. It would be great if the mask could move as a child length top the text line above it."

Instead of using a mask, use a shape layers as the track matte for your underline comp.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

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