final update July 15, 2006
Added a new Point of Interest expression instead of dealing with the Auto-Orient dialog as detailed in the comments.
second update July 14, 2006
Chris Prosser suggested a decent workaround of using app.executeCommand(app.findMenuCommandId(”Auto-Orient…”)) to auto-launch the Auto Orient dialog. Which in my opinion makes the script pretty usable, even with the slider range problem. Right now, I’m launching a dialog that reads “Auto Camera Rig” needs to have Auto-Orient set to “Off”, please set it in the following dialog and then immediately launching the Auto-Orient dialog. I’d be interested in feedback on whether I should leave the two dialog boxes for context or use a saveSetting() preference to give the user a Never Show Again option as well as Ok. Power users could always just comment out the alert line. Scripting UI’s are always difficult for me, I think I know how I’d handle it in a regular mac app, but I’m not so sure how to handle it here.
update July 14, 2006
Stu Maschwitz pointed out some deficiencies with the original version of this script and provided a sample project of a much better implementation of a rigged camera project. Unfortunately, there seem to be a couple of show stoppers for recreating his project via scripting and I’d love some feedback if anybody has worked through these issues, and if not I’ll send them off to aebugs@adobe.com. The first is the addCamera() method assumes a point of interest in its constructor. That seems to make the UI equivalent of layer:transform:Auto Orient:Off impossible. I’ve tried setting the property to Null, etc. with no success. Interestingly, there is a useful assistant to set the property. Secondly, I can’t seem to set the slider control range via scripting. I can set the value but not the range so this may be less of a show stopper than the first. I’ve uploaded the changes that reflect Stu’s sample project, so if you find running the script then turning Auto orient off (command-option 0, on the Mac..control-alt 0, windows? I don’t have a Windows box handy), and can live with the slider range limitation, then great. Send any fixes my way and I’ll incorporate them. I think I see why nobody took this one on .
I was doing a bit of research and ran across Kyle Sim’s request to automate his process of rigging an After Effects camera on aenhancers and the adobe forums. Seemed like a really useful script and as near as I can tell nobody has tackled it, so I decided to give it a shot.
Usage is really straight forward, copy the script to After Effects:Scripts and run it from the scripts menu with an active Comp selected. I’m not doing any layer name checking because I think it’s possible that you might want more than one camera and null, although we’d have to adjust the expressions accordingly.
When I run the script my effect window for the Mover Null looks like this and it does a great job of making the camera move really straight forward.
You’ll have to thank Kyle or whoever set up the original expressions for the idea, this just automates the creation of the rig.
Update 04.21.2007
Paul Tuersley kindly updated this script with some cool new features.
I've attached an update to your db_autoCameraRig script.
I've added a check for AE8 which then automatically
turns of Auto-Orient.
I also streamlined the bit that sets the position / POI
values.
Here’s Paul’s new script, and I’ve left the original up as a legacy 1.0 version in case we get any problems out in the field.
JSX script With Paul’s Improvements
Original Source JSX script
Update 06.10.2007
Paul kindly sent me additonal updates to his modification of the script.
Paul writes…
I’ve tweaked how this version deals with the Auto-Orient issue, which
you may want to check out. In AE6.5 it puts up an alert to tell you
to turn Auto-Orient off, in AE7 it does the same and then opens the
Auto-Orient dialog and in AE8 it turns Auto-Orient off automatically.
I also added expressions to all the properties you shouldn’t alter,
effectively locking them.
Thanks Paul.
Paul’s lates modifications – JSX script in a zip archive