Adobe AfterEffects CS6 scripting

Does anyone have experience with scripting in Adobe AfterEffects CS6?
I created a composition as a template, now I want to copy-to-new composition, update name of composition and update text in 2 text layers. Composition name and text are stored in a list (Excel, csv, txt - whatever will make it easier).

Well, digging through manuals, guides and Google for 2 hours has paid off. created script that updated what I needed in seconds instead of 7-8 hours manually :slight_smile:

This experience definitely made me appreciate the work involved for the credits at the end of the movie. There is a lot of work to add over 350 names to the credit roll (thats what I am working on)

Don’t leave us hanging :). How did you do it?

I wasn’t sure if anyone cared :). I will add info when I get home.

Background:
this part of the project is for the ending credits for dance school year end show video that I am working on. This year I wanted to do something interesting with credits and decided to do them in AfterEffects. There are over 300 kids, so I quickly realized that doing all of them manually will take a while.
Setup:

  • Each Dance title is in it’s own composition
  • Each dancers name is in it’s own composition
  • Each Dance compilation (dance title and dancer’s names) is in it’s own composition

Process:

  1. I created a “template" for the dancers name. copied & paste as many times as there names. "” so that copies will paste at the beginning of the Project List.
  2. Compiled list of dancers in Excel.
  3. created formula to make the corresponding code.

actual code snippet is here:

var myProperty = "Source Text";
var myComp = app.project.item(1); var CompName = "ArtemusMaximus"; var Text1 = "Artemus"; var Text2 = "Maximus";myComp.name = CompName; myComp.layer(2).property(myProperty).setValue(Text1);  myComp.layer(3).property(myProperty).setValue(Text2);
var myComp = app.project.item(1); var CompName = "Chief Delphi"; var Text1 = "Chief"; var Text2 = "Delphi";myComp.name = CompName; myComp.layer(2).property(myProperty).setValue(Text1);  myComp.layer(3).property(myProperty).setValue(Text2);

Because it’s JavaScript based I was able to flatten code into one line and made Excel formula much easier to create. So “pretty” code would look like this:

var myProperty = "Source Text";

var myComp = app.project.item(1); 
var CompName = "ArtemusMaximus"; 
var Text1 = "Artemus"; 
var Text2 = "Maximus";
myComp.name = CompName; 
myComp.layer(2).property(myProperty).setValue(Text1);  
myComp.layer(3).property(myProperty).setValue(Text2);


var myComp = app.project.item(1); 
var CompName = "Chief Delphi"; 
var Text1 = "Chief";
var Text2 = "Delphi";
myComp.name = CompName; 
myComp.layer(2).property(myProperty).setValue(Text1);  
myComp.layer(3).property(myProperty).setValue(Text2);

Here I created test credits. Nothing fancy, but it’s better than before:

See, I told you. Nobody cares LOL

I would be willing to bet that your post will be visited by plenty of people from random Google searches looking for a solution to the same problem you had.

If you have knowledge to share, why not share it? What help is it to keep it all to yourself? :slight_smile:

True, but it does help to know that it is useful to someone and time spent on sharing information is not wasted :).

Thanks for your post Keaton!

A little update.
Doing credits this way while looking good, it does require fair amount of computing power to render. 3 sets of credits took over 72 hours to render.