# Zack Lovatt's Scriptlets A series of small, simple AE utilities for [kbar2](https://aescripts.com/kbar), [Tool Launcher](https://aescripts.com/tool-launcher/), [Quick Menu 2](https://aescripts.com/quick-menu/) or any other script file launcher. Note that these all worked at the time they were developed; as AE has evolved, some may stop working. I'm absotively not liable if anything breaks; run at your own discretion 💝 All tools © 2023 Zack Lovatt unless otherwise stated. All rights reserved. ## Installation Instructions - Click on the name of the scriptlet you'd like to download - `File > Save` this to your computer, ensuring you're saving as "[filename].jsx" - In AE: `File > Script > Run Script File...` and choose this script! ## Adobe Illustrator Scripts See the [Illustrator](/illustrator/) folder for a few AI scripts.
---
#### [Add Random Effect]()
Adds a random layer effect to your first selected layer 🙃
---
#### [Add Trim Paths]()
Adds Trim Paths to selected shape layers, including a keyframe to start and one to end the animation. | Modifier | Effect | | -------- | --------------------- | | SHIFT | Skip adding keyframes |
---
#### [Add Wiggle Paths]()
Adds Wiggle Paths to selected shape layers. Open the script and change wiggle Size, Detail, and Frequency numbers to automatically set those when running the script.
---
#### [Apply Colour File To Colorista Free]()
Prompts user to select a CCC/CDL, creates an adj layer w/ Colorista Free, using settings from the CDL.
---
#### [Apply Expression to Selection]()
Prompts user for an expression, and applies it to selected properties.
---
#### [Blink Selected Layers]()
Adds a scene blink controller & blinks selected layers by linking each layer's opacity to a central checkbox. When the checkbox is OFF, these layers are OFF. When the checkbox is ON, so are the layers. | Modifier | Effect | | -------- | -------------------------------------------------------- | | SHIFT | Invert the blink expression (layer ON when checkbox OFF) |
---
#### [Change Selected Comps Background]()
Changes the background colour of all selected comps in the project panel to the specified hex value.
---
#### [Convert New Gaussian Blur to Old]()
Convert the new (CC 2015.3+) Gaussian Blur effect to Gaussian Blur (Legacy)
---
#### [Count Keyframes]()
Counts all of the keyframes (including markers) in selected comps in project panel, or the open comp if none selected. Will recurse into precomps.
---
#### [Create Average Position Null]()
Creates a new null at the center of selected layers (or all comp layers, if none selected), and set this null as those layers' parent. | Modifier | Effect | | -------- | ----------------------------------- | | SHIFT | Don't parent the layers to the null |
---
#### [Create Dropdown From Text]()
Provides a panel to quickly create a populated dropdown effect on a layer.
---
#### [Create Layer Selector Dropdown]()
Creates a null with a dropdown menu to select any layer in current comp, toggling its visibility. Also adds dropdown to EGP.
---
#### [Create Slider Driver]()
Creates a simple Slider Driver system for a given property.
---
#### [Default Folders v2.0]()
Creates a number of folders (or, if ran as a window, lets you customize folder names to create). Based on [DefaultFolders by Impudent1](http://aenhancers.com/viewtopic.php?t=37).
---
#### [Delete Keys at Time]()
Delete all keys at current time
---
#### [Freeze Properties]()
Uses expressions to freeze selected properties (or layers) to current value. Run the script again to unfreeze selected properties/layers. ##### Notes: - Skips properties that already have expressions.
---
#### [Generate Font Weight Selector]()
Looks at an existing text layer, and tries to create an expression to select font weight, based on the existing text layer's font. ##### To use: - Select a text layer - Run script - It will create a slider on the text layer, and an expression on sourceText - The slider will animate from 1 to the # of weights found - The expression will list all available font weights it can detect! ##### Notes: - this may not work in every case. Fonts are weird. - this relies on CC 2019+. - Font PostScript name logic from [Ten](https://github.com/ten-A/Extend_Script_experimentals) and licensed under MIT (included in the file)
---
#### [Get Property Value]()
![Get Property Value UI](https://github.com/zlovatt/zl_Scriptlets/raw/master/img/getPropertyValue.png) Displays the current value of the selected property (after expressions), letting you copy & paste it elsewhere. If run as a script (or from kbar), panel will display the value immediately. If run as a ScriptUI Panel (if installed in AE), you can dock the panel to get values quickly. ##### Notes: - The panel also includes an experimental 'copy to clipboard' function; it usually takes a few seconds to actually copy to clipboard, so be patient with it.
---
#### [Get Selected File Paths]()
Gets file paths of selected files in the project panel.
---
#### [Get Total File Size]()
Calculates the total file size of selected project items. Useful for when you're trying to figure out just how beefy this baby is.
---
#### [Hoist Essential Properties]()
Hoists essential properties from selected layers onto to new controller.
---
#### [Keep Every N Keys]()
Looks at your keyframes and keeps every # of them. By default, will keep every 2nd keyframe, and delete the rest. Note that the first and last keyframes are always kept. Intended for use with baked expressions, such as when exporting with Bodymovin. ##### Example: Based on 10 keyframes (🔷) | Interval | Result | | ------------- | ----------------------------- | | 1 (no change) | 🔷 🔷 🔷 🔷 🔷 🔷 🔷 🔷 🔷 🔷 | | 2 (default) | 🔷 ✖️ 🔷 ✖️ 🔷 ✖️ 🔷 ✖️ 🔷 🔷 | | 3 | 🔷 ✖️ ✖️ 🔷 ✖️ ✖️ 🔷 ✖️ ✖️ 🔷 | | 4 | 🔷 ✖️ ✖️ ✖️ 🔷 ✖️ ✖️ ✖️ 🔷 🔷 | | 5 | 🔷 ✖️ ✖️ ✖️ ✖️ 🔷 ✖️ ✖️ ✖️ 🔷 | | Modifier | Effect | | -------- | -------------------------- | | SHIFT | Specify the interval value |
---
#### [Key Sets]()
![Key Sets Example](https://github.com/zlovatt/zl_Scriptlets/raw/master/img/keySets.gif) Save & load sets of selected keyframes, even if the timing or value changes. You can overwrite a selection by saving over an existing Key Set. The top button will SAVE selection, while the bottom button will LOAD that selection. | Modifier | Effect | | -------- | -------------------------- | | SHIFT | Specify the name for a set | ##### If run as a kbar Script button: - Specify a unique Kbar Argument to save/restore that key set - You can have infinitely many sets, as long as each has a unique name - Press the button to SAVE - Hold SHIFT to LOAD that selection. ##### Notes: - If you add intermediate keyframes, delete layers or properties, add extra effects, etc., Key Sets may not be able to restore the full selection.
---
#### [Key Stumbler]()
![Key Stumbler Example](https://github.com/zlovatt/zl_Scriptlets/raw/master/img/keyStumbler.gif) Takes a pair of keyframes and adds extra randomly stumbling, staggering keyframes between them. Helpful for making realistic progress bars, and probably not much else! Options for the # of keyframes to create, the chance of each keyframe being hold or bezier (vs linear, the default); the chance of bezier keyframes being autobezier or continuous, and the min # of frames to keep between keyframes.
---
#### [Load Last Autosave]()
Tries to find the last autosave project based on your current AEP, and open it. ##### Notes: - Only works in English installs of AE at the moment.
---
#### [Loop Selected Layers]()
Enables time remapping on selected layers, and adds a loopOut("cycle") to loop the layer. | Modifier | Effect | | -------- | ------------------------- | | CTRL | Loop IN instead of OUT | | SHIFT | PINGPONG instead of CYCLE | | BOTH | Loop IN with PINGPONG |
---
#### [Mistika VR to AE Null]()
Translates a Mistika VR .grp file to null sliders for yaw/pitch/roll
---
#### [Move First Layer of Selected Comps to End]()
Moves the first layer of each selected comp in project panel to the end of each comp
---
#### [New Text Layer]()
Makes a new empty text layer. | Modifier | Effect | | -------- | ------------------------------------------------------- | | SHIFT | Create Paragraph (box) text layer instead of Point text |
---
#### [Parent Each Layer to Layer Above]()
Parent each selected layer to above layer
---
#### [Points to Nulls]()
Adds nulls to points of selected shape layers or masks. This was developed before the official "Paths to Nulls" panel 😅
---
#### [Phone a Friend]()
Generates Touch Tone noises for your input in AE! Uses markers & expressions-- move markers & change text to change audio!
---
#### [Quick Freeze Expressions]()
Adds a simple `posterizeTime(0)` to selected properties' expressions.
---
#### [Quick Rename Layers]()
Quickly renames all selected layers to text of your choice, adding an incrementer # to the end of the layer name.
---
#### [Quick Save Frame]()
Quickly prompts to save current comp frame as a png file.
---
#### [Randomize Shape Group Order]()
Randomize order of selected shape groups
---
#### [Recursive Enable Moblur]()
Recursively enable motion blur on selected comps, including all layers & precomps
---
#### [Remove All Rulers]()
Removes every guide ruler from every item in the project.
---
#### [Replace Items With Placeholders]()
Replaces all eligible selected items with placeholders
---
#### [Reveal Current File]()
Opens a Finder/Explorer window to the current AEP
---
#### [Reveal Layer Source In Project]()
Reveals source of first selected layer in project
---
#### [Reverse Shape Group Order]()
Reverse shape group order in a shape layer
---
#### [Search Replace Fonts]()
"Simple" utility to search & replace fonts in a project. TO USE: - Open the panel & hit "Load Fonts" to get installed system fonts - If a text layer is selected, it'll set the "Search" dropdown to this font - Select a text layer and press "Get Selected Font" to set the "Search" font - Change the "Replace" font - Press "Replace" to replace all layers with "Search" font to the "Replace" font - If you have layers selected, it will only search in these layers - If you have no layers selected, it will search all layers in the comp ##### Notes: - this may not work in every case. Fonts are weird.
---
#### [Select Alternating Keyframes]()
Selects every other keyframe on a given property. | Modifier | Effect | | -------- | ------------------------------ | | SHIFT | Select EVEN keyframes, not ODD |
---
#### [Select Duplicate Source Layers]()
Select all layers that are multiple instances of the same file source. So-- if you have two instances of the same movie file, this will select them both.
---
#### [Select Keys at Current Time]()
Select all keys at current time indicator. | Modifier | Effect | | -------- | ---------------------------------------------------------- | | SHIFT | Add keyframes to current selection, vs replacing selection |
---
#### [Select Keys in Work Area]()
Select all keys under the work area. | Modifier | Effect | | -------- | ---------------------------------------------------------- | | SHIFT | Add keyframes to current selection, vs replacing selection |
---
#### [Select Last Layer]()
Selects the last layer in your comp, deselecting the rest.
---
#### [Select Later Layers]()
Selects all layers in your comp that start after the selected layer.
---
#### [Select Mattes]()
Selects all layers that are track mattes in the current comp.
---
#### [Select Orphan Layers]()
Selects unparented layers in current comp.
---
#### [Set Comp Duration to X Frames]()
Sets the active comp's duration to a specified number of frames
---
#### [Smart Separate Dimensions]()
Separates a layer's position dimensions, preserving easing if keyframes exist. ##### Notes: - If you've adjusted the spatial interpolation (by changing bezier handles in comp viewer), this won't maintain that. That's... hard.
---
#### [Smarten Quotes]()
Convert flat to curly ("smart") quotes in your AE text layers.
---
#### [Solo Traveler]()
Turns all guide layers into non-guide layers, in selected comps in project panel. Will recurse into precomps. | Modifier | Effect | | -------- | --------------------------- | | CTRL | Skip locked layers | | SHIFT | Don't recurse into precomps |
---
#### [Sort Layers By Time]()
Sorts selected layers based on their in points, ascending.
---
#### [SRT to Text Layer Sequence]()
Takes a selected SRT file (or files), and creates a new comp per file with each line of text taking up exactly 1 frame. Very niche, but maybe it helps 🙃
---
#### [Swap Item Names]()
Swaps the names of 2 selected project items.
---
#### [Time Stretch Layer]()
Uses Time Remap to stretch layers, prompting user to enter speed. Also lengthens comp to fit, if necessary. | Modifier | Effect | | -------- | -------------------------- | | CTRL/CMD | Remap to half (0.5x) speed | | SHIFT | Remap to double (2x) speed |
---
#### [Toggle AE Brightness]()
Toggles AE brightness between min and max
---
#### [Toggle All Layer Effects]()
Toggles on/off all effects on layers in the project
---
#### [Toggle Expressions]()
Enables, disables, or toggles all expressions in current comp, disabling them by default (see modifiers below). Operates on selected layers, or all layers in the comp if none are selected, recursing into precomps. | Modifier | Effect | | -------- | --------------------------------------------------------- | | SHIFT | Enable all expressions, vs disable | | CTRL/CMD | Enable disabled expressions & disable enabled expressions |
---
#### [Toggle JS Debugger]()
Toggles Javascript debugger enabled/disabled
---
#### [Toggle Legacy UI (for all scripts)]()
Toggles 'Use Legacy UI' to either ON or OFF (depending on your tastes) for all installed scriptUI panels
---
#### [Toggle Temporal Continuous]()
Toggles Continuous on selected keys. | Modifier | Effect | | -------- | ------------------------------------- | | SHIFT | Disable Continuous, instead of Enable |
---
#### [Ungroup Selected Shape Groups]()
Ungroups all selected shape groups. ##### Notes: - This assumes that each group ONLY has a 'path' within it. If there's more, it'll fail. - I know this isn't great, buuut it's a start! 🤷‍♀️
---
#### [Update Default Import FPS]()
Prompts the user for to update default import FPS. This is used when importing image sequences, the fps that AE interprets it as.
---
#### [Write Item Uses To Comment]()
Counts the # of times a project item is used, and writes it to the item comment field (which can be sorted!).
---
#### [Write Layer Names to File]()
Writes layer names to a file, one layer name per line.