Archive for Scripting

Problems with multi-column output from system.callSystem() in After Effects 7?

I’ve been experimenting with system.callSystem() in After Effects 7. It’s a way to call commands and applications like you would from the command line but from within the After Effects scripting environment and get the output returned to the javascript variable. Works pretty great, but I’ve run into what seems like a bug and offer a small work around

If I call

var systemCall = system.callSystem('ls');
alert(systemCall);

I get a nice alert box with my local directory. If I call

var systemCall = system.callSystem('ls -a');
alert(systemCall);

I get a nice alert box including . entries (which is really just to test using the -a command switch to make sure I can send parameters through system.callSystem()). If i call

var systemCall = system.callSystem('ls -la');
alert(systemCall);

I lock up AE7. I’m guessing it doesn’t like the multi-column output? Because if I pipe the ls -la to awk like so

var systemCall = system.callSystem('ls -la | awk '{print $1}');
alert(systemCall);

I get a nice listing of my directory permissions which is the first column of the ls -la standard output.

So, it looks like the workaround if you freeze After Effects 7 with a system.callSystem() command that ouputs multi column output is to grab each column of interest with something like awk’{print $1}’ where $1 etc. is the column to grab. Not sure if this is a bug or a limitation of the standard output to After Effects. Would love some feedback from anybody that knows for sure.

Comments (2)

Analyzing access logs to find patterns, or “Just how many bots are out there anyway?”: In which we give a gentle introduction to command-line tools.

You find the most interesting stuff in access logs. I spend a fair amount of time digging around in web analytic software. Looking at who is referring to us, analyzing traffic patterns, figuring out peak usage times…you get the picture. Sometimes though, you just need to get right down into the raw logs to figure out what’s going on, and that situation happened to me a while back.

Around the middle of last year a security exploit was found in the implementation of the XML-RPC protocol in PHP. PHP is obviously a very popular web scripting language and dozens of content management systems, including the blogging software I use for this blog, utilize the language. Now an open security hole in such a popular language is just an invitation for the underground to attempt to exploit the situation, and try to exploit they did.

It started out as just a trickle, but before long it became obvious that the underground was attempting to exploit the security hole. How’d we know? By analyzing our logs.

Read the rest of this entry »

Comments (6)

iPhoto to After Effects Slideshow

I’m taking a slight detour from my Final Cut Pro to After Effects tutorial series to post an application I wrote while experimenting with AE and JSON import and export. iPhotoToAESlideshow allows you to export an iPhoto album to a slideshow in Adobe After Effects.

iPhotoToAESlideshow is a proof-of-concept application and I can see it being fleshed out in many new directions including a dashboard widget, iPhoto Export plugin, etc. and the knowledge I’ve gained will definitely show up in my FCP and AE efforts.

The application itself is largely based on an Apple sample project available here with a huge assist from Blake Seely with his NSDictionary category BSJSonAdditions for the JSON and the BSRoundedBox framework for the nifty rounded box code (thanks Blake).

This is definitely beta code, give me a buzz at dale(at)creative-workflow-hacks(dot)com if you find any bugs or ideas for improvements. I also plan on open-sourcing the source once I’ve debugged and cleaned everything up.

BTW, I realize almost all of the hacks I’ve posted here so far have been OSX-centric. I’m definitely platform agnostic, but I end up being a bit of a Mac-head in my personal work. My plan is to adapt the .jsx version of the enclosed script to run from already imported photos that are selected in the project window. I’ll post those here once I’ve finished them up.

The files are available here: iPhotoToAESlideshow.dmg

Comments (8)

Automating “Guess 3:2 Pulldown” in After Effects

It’s a common problem to run into fields issues when working with imported footage in After Effects. An equally common way to address the problem is to use the Interpret Footage->Main Dialog(Command or Control-F) and press the“Guess 3:2 Pulldown” button in this dialog. Multiply this times 100 footage items (You can only select one footage item for Interpret Footage to be available) and you’ll be crying out for help. The following script gives you that help.
Read the rest of this entry »

Comments (2)

MOVING BETWEEN FINAL CUT PRO AND AFTER EFFECTS: THE SCRIPTING OPTION

With the release of Automatic Duck as a free product there really isn’t a great reason to use this script except as an example of XML parsing and Comp creation from parsed properties. For general FCP to AE workflows I’d recommend downloading Automatic Duck Pro Import AE 5.0. Depending on what happens with FCPX I may write new tools for import from FCPX to AE.

Update 04.17.2007

I’ve posted a small application and tutorial at Final Cut Pro to After Effects Scripting without the hassle for those that find the scripting presented here a little daunting. The following article covers the steps and ideas encapsulated in the application if you’re more interested in the process for learning to script After Effects and Final Cut Pro yourself.

I work a lot in Final Cut Pro and After Effects. They are both really strong programs and more than once I’ve had reason to move projects, art, text, etc. between the two programs.

Until recently, the only option you had to do this kind of interchange was a product called Automatic Duck (which I highly recommend btw) and in previous versions you still had to use Avid’s interchange format and jump through a few hoops to move between the programs.

Now with Final Cut XML and more robust scripting available in After Effects you can finally flow between the two programs with relative ease. In this first installment, I’ll outline a simple workflow for getting clips in a FCP sequence into a AE project. In future posts I’ll go over text elements, filters, generator items etc., but all of these follow the same general development cycle and will just be elaborations on a theme.

Read the rest of this entry »

Comments (31)

« Newer Posts