A collection of helpful scripts for After Effects that run natively or with a 3rd party script launcher..
To run the script natively in After Effects use File > Script > Run Script File...
and choose this script.
Add an adjustment layer above the currently selected layer to break the 3D space of After Effects. If no layers are selected the adjustment layer will be added at the top.
Add a camera and 3D null as a controller to the current composition.
Add a 16x9 fuscia rectangle shape layer with guide layer enable to serve as a guide for compositions with larger or smaller dimensions. Helpful with precomposed character rigs.
Add an expression to all selected properties.
Add the Fill effect to all selected layers while cycling through red, green, blue, yellow, magenta, and cyan.
Add a composition marker at each outpoint of every layer in the composition.
Add a new maker to all selected layers with an optional comment.
Add an adjustment layer to the current composition to cut the framerate in half. Animation will now happen on 2s.
Add an expression to all selected properties to cut the framerate in half. Animation will now happen on 2s. Existing expressions will be preserved.
Add all selected properties to Essential Graphics Panel using effect names instead of property names for expression controls.
Add a checkbox that controls the visibility (opacity) for a selected layer.
Calculate the difference between two keyframe values.
Calculate the distance between any two layers. Two 2D layers will result in 2D distance (composition space). Two 3D layers will result in 3D distance (world space). One 2D layer and one 3D layer will result in 3D distance (world space). Hold the ALT key to force the result to be 2D distance (composition space). Forcing 2D distance (composition space) will result in the optical distance between two layers.
Center the composition in the Composition Panel. Hold the ALT key or SHIFT key for other zoom levels.
Change the background color of the current composition using a hexcode. All nested precomps will be affected as well (and precomps within those precomps and so on).
Change the composition and all layers to the given duration. All nested precomps will be affected as well (and precomps within those precomps and so on).
Change the composition and all layers to the given frame rate. All nested precomps will be affected as well (and precomps within those precomps and so on).
Set the label color of all layers in the current composition to "None." All nested precomps will be affected as well (and precomps within those precomps and so on).
Rename all the layers within all nested compositions.
Change the composition resolution factor. All nested precomps will be affected as well (and precomps within those precomps and so on).
Clean out the Render Queue.
Clean unused items from any selected folders. Remove empty folders unless they are top level.
Copy all markers (duration, comments, and labels) from the current composition to the currently selected layer.
Counterpart scripts to "Copy Layer Makers to Composition.jsx"
Copy the Work Area from the active composition. Hold the ALT key to paste the copied Work Area to the active composition.
Copy all markers (duration, comments, and labels) from the currently selected layer to the current composition.
Counterpart scripts to "Copy Composition Markers To Layer.jsx"
Used specifically for a current project. Creates an eye rig for a selected eye layer. Probably pretty usless outside of this specific use case but has some nice code to steal for future scripts.
Add a new Text Layer in the current composition for each line of text in the file in the selected text file.
Cycle the composition background color between black, gray, and white.
Disable all of the specified effects in the project. Alt + click to enable. Add additional effects to be checked into the matchNames object.
Exactly like selected layer and hitting CMD/CTRL + D. But instead of moving the duplicated layer above the selected layer, move the duplicated layer below the selected layer. This script currently only supports duplicating the first selected layer and will ignore any other selected layers.
Export path points for a selected path property. Currently outputs a text file straight to the desktop.
Essential Properties from a nested composition can not be directly added to the Essential Graphic Panel of the parent composition. Instead, run this script to expose those Essential Properties by using an intermediate expression controller. Select a layer to add all properterties or select specific properties to add them. This script does not currently support Dropdown Menu Control.
Find all instances of a specific effect in the current project and alert the layer which the effect is applied. Searching is done via matchName for better specificity.
Iterate recursively through all precomps and all layers to change the Size property of all Turbulent Displace effects.
Force the Composition Panel to refresh the current frame.
Disable (toggle the eyeball icon) on all unselected layers.
Invert selected keyframe values.
Lock every layer in every conmposition in the project.
Lock all layers in a composition that are a null layer.
Convert selected keyframes into hold keyframes.
Match the in point of all selected layers to the layer directly below it.
Match the start time of all selected layers to the layer directly below it.
Attempt to move all selected and newly imported items into their matching and previously existing folders.
Multiply selected keyframe values by a provided value.
Append ".value;" to the end of the expression on selected properties. Typically used immediately after using the pickwhip to quickly set the expression.
For each selected layers, parent the closest layer in composition space. Typically used for prepping artwork for Motion Botique's Newton plugin.
Parent each selected layer to the layer directly below it.
Posterize all selected keyframes in a composition to be on 2s.
Posterize the start time of all layers in a composition to be on 2s.
Randomly shift the start time of all selected layers within a provided range.
Randomize the value for selected 1 dimensional keyframes.
Remove all proxies set within the project.
Rename selected puppet pins added to arm layers in preparation for Duik
Rename the current composition to the same name as the project.
Rename the first layer in each selected composition to match the name of the composition.
Rename selected project items and append zero padded numbers.
Rename the source of the currently selected layer.
Rename the sources of the currently selected layers.
Rename selected layers and append each character along with character count.
Rename selected layers and append zero padded numbers. Selecting a single layer will not append zero padded numbers.
Rename the source of the selected layer to match.
Replace text in the name of all selected project items.
Set the Work Area to cover the entire composition.
Round the position values of selected layers to the nearest whole number.
Round the values for all selected keyframes to the nearest whole number. Currently works with 1 dimensional properties (Opacity, Rotation, etc.), 2 dimensional properties (2D Scale, 2D Position, etc.), and 3 dimensional properties (3D Scale, 3D Position, etc.).
Save the current frame as a PNG to the desktop. This does support transparency but the image is not amazing quality.
Output will match the following format: "Comp Name YYYY-MM-DD HH.MM.SS AM.png"
Select all layers parented to the currently selected layer.
Select all layers in a composition that are not a null layer.
Select all layers in the current composition that are disabled. Disabled means the eyeball icon is toggled OFF.
Select layers below any layer with label 16 (Black).
If there is only one layer selected, and the selected layer has a parent layer, then unlock and select the parent layer.
Randomly select layers from a given composition. Layer selection is currently skewed towards 20% layer selection rather than 50% layer selection.
Select all unparented layers in the current composition.
Reset the label colors for all items in the active project as None.
Reset the label colors for all layers in the active composition as None.
Reset the label colors for all track matte layers in the active composition as label number 16. Label number 16 is Black (#FFFFFF) in my label preferences and is always used for track matte layers.
Set new color based on original color, blend mode, and opacity.
Automatically set proxies to all rendered MOV files in a folder that match compositions within the project.
Set the Z Position of all selected layers to a random value between RANDOM_MIN and RANDOM_MAX.
Set the track matte for all selected layers to the layer above it. Currently uses a Luma Inverted track matte type.
Automatically enable Time Remapping, set the appropriate keyframes, and apply the loopOut() expression to correctly loop a layer.
Set the last selected layer to the average position of all other layers. Hold the ALT key to set the first selected layers to the average position of all other layers.
Shift all selected layers to the Current Time Indicator as a group while maintaining relative timing.
Force effects wih selected position properties such as CC Bend It or Gradient Ramp to stick properly to a layer.
Swap the values of two selected properties. They must be the same property type.
For each selected property, swap the property values. For example, use this script to swap the X and Y size for a rectangle shape layer.
Toggle the blend mode of the selected layers between Normal and Difference. Hold the ALT key to force all selected layers to Normal blend mode. Hold the SHIFT key to force all selected layers to Difference blend mode.
Disable or enable an expression that maintains the visual scale of a layer as it's positioned in Z Space.
Toggle onion skinning in the current composition.
Toggle selected puppet pins between Position type and Advanced type.
Toggle the expressions for selected properties
Sometimes the transparency grid colors are too agressive and the grid size is too small. Toggle between the default preferences and a custom "dark mode" with larger grid cells.
Unlock every layer in every conmposition in the project.
Typically my main compositions will end in a version number "_v05". This script will automatically version-up any comp with a version number such as "_v06".
Zero out the position of all selected layers.