Skip to main content

Guides

Automation Blocks contains an entire collection of scripts to simplify working with guides.

Create

You can use this script to create guides in the active composition.

Just execute the script Guides - Create and the following dialog will appear:

After Effects Script: Guides - Create - Dialog

Choose the orientation of the guides, and define where they should be created.

The values can be in pixels (px) and percentages (%). If no unit is defined, the default is pixels. To create multiple guides at once, you can enter multiple values separated by a comma.

Examples of valid values

  • 100, 200 (create guides at 100px and 200px)
  • 10px (create guides at 10px)
  • 10%, 90% (create guides at 10% and 90% of the comp size)
  • 10, 20px, 30%, -40, -50px, -60% (you can mix percentage and px values)

Mirror Option

If you enable the mirror option, the tool creates a symmetrical set of guides. If you enter a position of 100px, for example, it will create guides both 100px away from the left (and/or top) and the right (and/or bottom) edge of the comp.

Create Grid

After Effects Script: Guides - Create Grid

This script creates a grid of guides in the active composition. You can specify the width and height of the cells, as well as an optional gutter (set gutter to 0 to disable it). If you enable the center option, the grid will be aligned to the center of the composition. Otherwise, the grid is aligned to the top left corner of the composition.

Note that the script does not delete existing guides (but you can do this with the Ae menu View->Clear Guides before running the script).

Create Around Selected Layers

After Effects Script: Guides - Create Around Selected Layers

This script creates guides along the bounding box of the selected layers. If either creates guides around each of the selected layers individually, or calculates a single bounding box that includes all the selected layers and then creates guides for this one.

The script can create guides at the top/bottom and right/left edges of the bounding box, and optionally also at the center. With the margin option, you can specify that the box formed by the guides is a little bigger than the actual bounding box of the layer(s).

Save

You can use this script to save the guides in the active composition as a preset.

Just execute the following script:

  • Guides - Save

When you execute the script, a dialog pops up where you can choose the preset name, the orientation of the guides, and define which unit they should be saved as.

After Effects Script: Guides - Save - Dialog
Units

A guide saved at 100px will always be in the same position, independent of the composition dimensions, but a guide at 10% will be dynamically positioned in relation to the composition dimensions.

Customize Preset Folder

By default, the presets are stored in the folder ~/Documents/Automation Blocks/Guides Library/. If you prefer a different location, you can customize it easily in the block code:

choose custom folder for guides presets

If you do this, make sure to change the folder in both the scripts "Guides - Load" and "Guides - Save".

Load

You can use this script to load a guides preset into the active composition.

Just execute the following script:

  • Guides - Load

When you execute the script, a dialog pops up where you can select a preset and the orientation of the guides you want to load.

After Effects Script: Guides - Load - Dialog

Mirror

Use this script to mirror guides from the active composition. This is useful to create symmetrical guide setups. If you mirror a guide that is 100px from the left edge of the comp, for example, the result will be a guide that is 100px away from the right edge.

After Effects Script: Mirror Guides Example

Just execute the script Guides - Mirror to open this dialog:

After Effects Script: Guides - Mirror - Dialog

In the dialog you can select which guides you want to mirror. You can mirror

  • all horizontal guides,
  • all vertical guides,
  • all vertical and horizontal guides, or
  • choose one specific guide.