New Plugin: Auto Focus
Jesse Toula on May 23, 2011 at 9:27 pm

I'm currently working on a new stock After Effects template, and while doing so, I realized there were a couple things that I kept on doing. One was setting the anchor point to the center of a text layer. (Which is why I made the Move Anchor Point Script) The other was setting the cameras focus distance to the layer it was looking at. Even though setting the focus distance of a camera is easy, I thought it could be a little quicker. So I wrote this plug-in that automatically sets the focus distance for the active camera to the selected layer.

Once downloading and installing, Auto Focus will show up in the 'Layer' menu between 'Guide Layer' and 'Add Marker'. (May differ depending on the selections in your layer menu). To use, simple select the layer you want to focus on and click 'Auto Focus'.

The selected layer must be a 3D layer and can't be a light or a camera. If there is no active camera when you run the script, you will receive an error. Cameras can't be set to a negative focus distance, or course, so if the layer is behind the camera, you will be asked if you would like to set the focus distance to what it would be if the camera was facing the selected layer.

Auto Focus (For After Effects CS3 and Up) is free to download. If you have any issues, comments or questions, leave a comment.

Download Auto Focus

Share New Plugin: Auto Focus
On Google+ Twitter and Facebook



November 21, 2011 at 9:38 pm
I've tried everything but i can't get this to work. i have a cam layer, and all my layers are 3D. i select a layer and autofocus doesn't become available at all. HALP!

Jesse T.

November 21, 2011 at 10:23 pm
Sorry for the inconvenience. What version of After Effects and what OS do you have?


December 08, 2011 at 6:22 am
Hi, I have AE CS 4 (Mac, German) and can't get it working either. It just gives me "syntax error in line 0". I'd really love to use the plugin ...

Jesse T.

December 18, 2011 at 8:19 pm
At this time Auto Focus is only compatible with the English version of AE. I plan on making it available to other languages in the near future. Sorry for the inconvenience.


November 08, 2012 at 3:25 am
I have the 32 bit Mac version installed on on CS5. I can't get it to work. The only time Auto Focus isn't grayed out is when I have the camera selected.

Alejandro Ortiz

March 19, 2014 at 9:06 am
Does AF work on CC ? All I get is: Unable to execute script at line 0.

Jesse T.

March 19, 2014 at 7:35 pm
Auto Focus does work in CC. Send me an email ( with the details and I'll try to help figure things out.

Leave A Comment

Invalid Email
Invalid Website
Post Comment
The website you have entered is not formatted correctly. Would you like to submit your comment without a website?