Asset 13Version 3.1.3

Auto Crop

Version 3.1.3

Auto Crop crops a composition to the size of its contents with a single click.

What's new in Auto Crop 3.1.3?

Compatibility

Auto Crop 3.1.3 is compatible with After Effects CS6 and newer

Installing

If you purchased Auto Crop through aescripts.com, you can use the aescripts + aeplugins manager app to take care of the installation

Auto Crop has two parts, the plug-in and the dockable panel. The panel is not required if you would prefer to run Auto Crop only from the menu. The location of where these files need to be installed will depend on your operating system and your version of After Effects. Within your Auto Crop download, open the folder that matches your operating system.

Important: Plug-in files are OS specific. Auto_Crop.aex is for Windows and Auto_Crop.plugin is for Mac, however the script file Auto_Crop_Panel.jsxbin is the dockable panel which is used for both Windows and Mac.

Windows

Copy Auto_Crop.aex into one of the following directories.

To install for a specific version of After Effects:

C:/Program Files/Adobe/After Effects VERSION/Support Files/Plug-ins

To install for all versions of After Effects, version CC and newer:

C:/Program Files/Adobe/Common/Plug-ins/7.0/MediaCore

The Auto Crop.jsxbin file needs to be copied into each version of After Effects where you want the panel to be available, there is no common location.

C:/Program Files/Adobe/After Effects VERSION/Support Files/Scripts/ScriptUI Panels/

Mac

Copy Auto_Crop.plugin into one of the following directories.

To install for a specific version of After Effects:

~/Applications/After Effects VERSION/Plug-ins

To install for all versions of After Effects, version CC and newer:

/Library/Application Support/Adobe/Common/Plug-ins/7.0/MediaCore

The Auto Crop.jsxbin file needs to be copied into each version of After Effects where you want the panel to be available, there is no common location.

~/Applications/After Effects VERSION/Scripts/ScriptUI Panels

Script UI Alternative

In After Effects CC 2019 and newer, you can also install Script UI panels from within After Effect by going to:

File > Scripts > Install ScriptUI Panel...

Using Auto Crop

There are 4 different options for running Auto Crop. To keep the clutter down in the menu, Auto Crop only shows up in a single menu slot. Each of the 4 options can be accessed by using a different combination of modifier keys. (You can also select the different options by using the dockable panel.)

On Mac, you must hold the modifier keys before opening the menu

Modifier Keys Function
None Standard Auto Crop
Ctrl / CMD Auto Crop Duration
Shift Auto Crop Preferences
Shift + Ctrl / Shift + CMD Mask Crop

Standard Auto Crop

A standard Auto Crop will crop the selected pre-comp(s) at the current frame. If a composition is cropped that is being used in other compositions within the project, all instances of that composition will be automatically corrected after the crop has completed.

The standard Auto Crop can crop a pre-comp or the current composition. To crop a pre-comp, just select it in the Timeline panel. (You can crop any number of pre-comps at once by selecting all of the layers you would like to crop). To crop the current composition, verify that no layers are selected in the Timeline panel, but that either the Timeline or Composition panel is active. Then go to:

Layer > Auto Crop

The Auto Crop menu item will be disabled if the current selection is invalid

Auto Crop Duration

Auto Crop Duration will crop a composition while taking its entire length into account. This is perfect if you have animated layers within a composition and you want to get the smallest possible composition dimensions without cutting off any details.

Things to remember when running Auto Crop Duration:

To use Auto Crop Duration, select a pre-comp in the Timeline. If you would like to crop the current composition, verify that no layers are selected in the Timeline, but the Timeline or Composition panel is active. (Unlike the standard Auto Crop, you can not run Auto Crop Duration on multiple pre-comp layers at once)

Then hold Ctrl or CMD and go to:

Layer > Auto Crop Duration

Mask Crop

Mask Crop will modify the bounds of a composition to match the bounds of a mask that is applied to it.

Mask Crop can only be run on pre-comps, you can not run it on the current composition.

To run Mask Crop, select a pre-comp that has a mask applied to it.

Then hold Shift + Ctrl or Shift + CMD and go to:

Layer > Mask Crop

Mask Crop can only take a single mask into account when cropping:

If you need to expand the size of a composition, Mask Crop can be used with a mask that is larger than the composition being "cropped" and it will actually be enlarged.

Auto Crop Preferences

Auto Crop Preferences Panel

To open the Auto Crop Preferences, hold Shift, then go to:

Layer > Auto Crop Preferences

Or choose 'Preferences' from the Auto Crop dockable panel.

Delete mask after Mask Crop

This setting only applied to 'Mask Crop', and is fairly self-explanatory. If this option is checked, Auto Crop will crop the pre-comp to the bounds of the mask and the delete the mask after cropping is complete. If this is left un-checked, the mask will be left un-touched.

Padding

Padding applied to all crop types. This option allows you to specify an amount in pixels that will be added to each crop, basically adding a buffer. Negative values can be used to crop an extra amount, however if a negative value is used that is more than half the size of the content, you will get errors.

Expand

If layers in a composition are outside the composition bounds, you can choose to automatically expand the composition to include those layers, and then crop it down to the minimum size. Because Expand will include content outside the boundaries of the current composition, it may result in compositions where the "cropped" version is actually larger than the original. The expand amount specifies the number of pixels that Auto Crop will search in each direction. Larger search areas will result in slightly slower processing times. If there is no content outside the composition's viewable area, Expand will have no effect.

Expand only works with standard crops. It will have no affect in 'Crop Duration' or 'Mask Crop'.

Include Masks

This option applied to Auto Crop and Auto Crop Duration only. If this option is checked, the crop will not recognize any content that is hidden by masks applied to the pre-comp. If this is left un-checked, any masks applied to the pre-comp will be disregarded.

Resolution

Auto Crop works best when it analyzes the full resolution data, however it will also be slightly slower (depending on the complexity of the composition) than if it analyzes at 1/2, 1/3, 1/4 or any other lower resolution. If you are working at a resolution other than 'Full', by default, Auto Crop will always ask if you would like to crop at full resolution or at the current resolution.

Changing this preference will prevent Auto Crop from asking each time. You can choose to either always use the full resolution or always use the current resolution.

If you crop without using the full resolution, your crop will not be pixel-accurate at full-res

Pre-compose 3D Comps

If the composition you are cropping contains 3D layers, changing the size of that composition can cause the 3D layers to shift unexpectedly. Pre-composing the composition will copy the entire composition into a secondary composition and then crop the secondary composition. Otherwise, it will just crop the comp as usual and may have unexpected and inaccurate results.

Inaccuracies from 3D comps will be more noticeable as layers are pushed further back or further forwards in Z-space. For the most accurate results every time, pre-composing is recommended, however it might be worth testing the non-pre-composed version to see if its results are acceptable.

This preference can be set to 'Always Ask', which will show a popup each time a composition is found with 3D layers inside. If you do not want to see the popup, you can choose either 'Always Pre-compose' or 'Never Pre-compose'

Buttons

Save

Save the current preferences

Cancel

Disregard any changes to the preferences and revert to the previous settings.

Panel

Customize which Auto Crop functionality is available directly from the Auto Crop Script UI panel. If there are preferences you change often or features that you don't use, you can easily customize the panel to show exactly the features you need.

About / Register

If your copy of Auto Crop is not registered, you will see the 'Register' button. Clicking this will bring up another window where you can enter your serial number. If you do not register Auto Crop, you will be running in Trial Mode which is limited to one crop per day for 10 days.

If you have already registered Auto Crop, you will see the 'About' button. Clicking this will bring up another window showing the currently installed version of Auto Crop and the name of the registered user. This window also contains an option to de-activate the current license in the event that you need to activate it on another computer.

Help

The help button will open the online version of this help guide.

Script UI Panel

The Auto Crop Script UI Panel is optional. If you prefer to have the functionality on screen at all times, this panel can be placed or docked anywhere on the screen.

The Auto Crop panel has none of its own functionality built in, meaning it will still need the Auto Crop plugin installed as well. This panel just provides an optional interface for running and interacting with Auto Crop.

If you would like to customize the buttons and preferences that are visible directly in the panel, open the Auto Crop preferences and click on the 'Panel' button.

Execute Script

Auto Crop is shipped with an additional script file that will allow Auto Crop's main functionality to be triggered by other scripts. This file also has built in KBar support, allowing you to call Auto Crop from KBar, if desired.

KBar

The included script can be loaded directly by KBar and controlled using the Script function or argument input:

KBar Settings Panel

KBar is available at aescripts.com.

To control which of the Auto Crop functions to run, simply modify the argument. The table below shows the options (You can choose to enter the option as a number or string)

Function String Option Numeric Option
Auto Crop CROP 1
Crop Duration DURATION 2
Mask Crop MASK 3
Open Preferences PREF 4

Call Auto Crop from your scripts

You can choose to run the script manually whenever you need it, but if you would like the functionality to always be available when AFter Effects Starts, simply place the executeAutoCrop.jsxbin file into the 'Startup' scripts folder.

On Windows

C:/Program Files/Adobe/After Effects VERSION/Support Files/Scripts/Startup

On Mac

~/Applications/After Effects VERSION/Scripts/Startup

Calling the exposed function

This will make a function called executeAutoCrop available in the global space. This function accepts a single parameter to determine which one of the 4 possible processes should be run. The value passed in can be a number 1-4 or a string:

// Options for running a standard auto crop
executeAutoCrop("CROP");
executeAutoCrop(1);

// Options for running a crop duration
executeAutoCrop("DURATION");
executeAutoCrop(2);

// Options for running a mask crop
executeAutoCrop("MASK");
executeAutoCrop(3);

// Options for opening the preferences
executeAutoCrop("PREF");
executeAutoCrop(4);

Currently, there is no way to determine when the cropping has completed from this call.

Version History

3.1.1 - September 7, 2019

Changed

3.1.0 - June 18, 2019

Added

Changed

Fixed

3.0.1 - May 17, 2019

Fixed

3.0.0 - May 16, 2019

Initial Release

Questions / Comments

If you have any questions or comments, please send an email to contact@batchframe.com or use the contact form at www.BatchFrame.com/contact