picture home | pixelblog | qt_tools

omino code blog

We need code. Lots of code.
David Van Brink // Sun 2007.02.25 12:48 // {scripting}

Two Handy After Effects Scripts

Two Handy After Effects Scripts


After Effects is just about my favorite application. Sure, I use Photoshop more. But Photoshop (and Illustrator, for that matter) lacks the elegance, the flexibility, the ruthless consistency of After Effects. After Effects has its user model of layers and compositions and timelines and parameters, and just goes all the way. It’s a beautiful app.

And around version 6.5 they added scripting. And the scripting works. Photoshop 7.0 and later also has scripting, but unlike After Effects the script execution is strangely slow and usually you can see it visibly manipulating the UI.

From this, I speculate that the internal architecture of After Effects is a bit tidier than Photoshop’s.

The First Script: launcher.jsx

Such speculation is fun, but I have work to do, and scripts help me to do it. Running a script from After Effects is a bit of a tedious affair. You have to choose a submenu from File, and then select the script to run. Well, how ever could we make that into a one-button process? Ah ha! With a script.

This little script, Launcher, scans one or more directories, and presents a set of buttons, one for each script it finds.

It’s a bit like the included “DemoPalette.jsx” but dynamically reads a directory. Also, it has a handy checkbox to drop into the debugger before running the script, if you’re developing fresh ones.

How To Use It:

  • Download it from the code-display below, with the download button. Put it in either <After Effects>/Scripts (to run it manually) or <After Effects>/Scripts/Startup (to have it start automatically).
  • Edit the file and change the first lines to point to where you keep your scripts. Be default, it just includes the regular scripts folder

The Second Script: rerenderMostRecent.jsx

This next one is trivial but handy. Sometimes I’m doing rough renders and I change my comp just at little and want to try again. This script simply redoes the last render you did. Thanks go to Dan Ebberts for helping work around a bug in the RenderQueueItem.duplicate method.

How To Use It:

  • Download it from the display below. Put it somewhere convenient (perhaps where Launcher can see it). Run as needed.
  • Caveat — it does not properly handle “based-on template” items. Create a unique Template from Edit:Templates:Output Modules instead.

Post Scriptum

Actually, I use Eclipse (a Java IDE) more than any other program, what with the Day Job and all. Another fine program, that.

oh, i dont know. what do you think?

(c) 2003-2011 omino.com / contact poly@omino.com