Giter Site home page Giter Site logo

zlovatt / zl_scriptlets Goto Github PK

View Code? Open in Web Editor NEW
113.0 13.0 22.0 674 KB

Series of small, simple AE utilities for kbar (or any other script launcher)

JavaScript 100.00%
aftereffects extendscript kbar fttoolbar ft-toolbar aenhancers after-effects

zl_scriptlets's Introduction

Zack Lovatt's Scriptlets

A series of small, simple AE utilities for kbar2, Tool Launcher, Quick Menu 2 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 folder for a few AI scripts.


Adds a random layer effect to your first selected layer ๐Ÿ™ƒ


Adds Trim Paths to selected shape layers, including a keyframe to start and one to end the animation.

Modifier Effect
SHIFT Skip adding keyframes

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.


Prompts user to select a CCC/CDL, creates an adj layer w/ Colorista Free, using settings from the CDL.


Prompts user for an expression, and applies it to selected properties.


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)

Changes the background colour of all selected comps in the project panel to the specified hex value.


Convert the new (CC 2015.3+) Gaussian Blur effect to Gaussian Blur (Legacy)


Counts all of the keyframes (including markers) in selected comps in project panel, or the open comp if none selected. Will recurse into precomps.


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

Provides a panel to quickly create a populated dropdown effect on a layer.


Creates a null with a dropdown menu to select any layer in current comp, toggling its visibility.

Also adds dropdown to EGP.


Creates a simple Slider Driver system for a given property.


Creates a number of folders (or, if ran as a window, lets you customize folder names to create).

Based on DefaultFolders by Impudent1.


Delete all keys at current time


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.


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 and licensed under MIT (included in the file)


Get Property Value UI

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.


Gets file paths of selected files in the project panel.


Calculates the total file size of selected project items. Useful for when you're trying to figure out just how beefy this baby is.


Hoists essential properties from selected layers onto to new controller.


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 Example

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 Example

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.


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.


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

Translates a Mistika VR .grp file to null sliders for yaw/pitch/roll


Moves the first layer of each selected comp in project panel to the end of each comp


Makes a new empty text layer.

Modifier Effect
SHIFT Create Paragraph (box) text layer instead of Point text

Parent each selected layer to above layer


Adds nulls to points of selected shape layers or masks.

This was developed before the official "Paths to Nulls" panel ๐Ÿ˜…


Generates Touch Tone noises for your input in AE!

Uses markers & expressions-- move markers & change text to change audio!


Adds a simple posterizeTime(0) to selected properties' expressions.


Quickly renames all selected layers to text of your choice, adding an incrementer # to the end of the layer name.


Quickly prompts to save current comp frame as a png file.


Randomize order of selected shape groups


Recursively enable motion blur on selected comps, including all layers & precomps


Removes every guide ruler from every item in the project.


Replaces all eligible selected items with placeholders


Opens a Finder/Explorer window to the current AEP


Reveals source of first selected layer in project


Reverse shape group order in a shape layer


"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.


Selects every other keyframe on a given property.

Modifier Effect
SHIFT Select EVEN keyframes, not ODD

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 all keys at current time indicator.

Modifier Effect
SHIFT Add keyframes to current selection, vs replacing selection

Select all keys under the work area.

Modifier Effect
SHIFT Add keyframes to current selection, vs replacing selection

Selects the last layer in your comp, deselecting the rest.


Selects all layers in your comp that start after the selected layer.


Selects all layers that are track mattes in the current comp.


Selects unparented layers in current comp.


Sets the active comp's duration to a specified number of frames


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.


Convert flat to curly ("smart") quotes in your AE text layers.


Sorts selected layers based on their in points, ascending.


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 ๐Ÿ™ƒ


Swaps the names of 2 selected project items.


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

Toggles AE brightness between min and max


Toggles on/off all effects on layers in the project


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

Toggles Javascript debugger enabled/disabled


Toggles 'Use Legacy UI' to either ON or OFF (depending on your tastes) for all installed scriptUI panels


Toggles Continuous on selected keys.

Modifier Effect
SHIFT Disable Continuous, instead of Enable

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! ๐Ÿคทโ€โ™€๏ธ


Prompts the user for to update default import FPS.

This is used when importing image sequences, the fps that AE interprets it as.


Counts the # of times a project item is used, and writes it to the item comment field (which can be sorted!).


Writes layer names to a file, one layer name per line.

zl_scriptlets's People

Contributors

zlovatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zl_scriptlets's Issues

Loop Selected Layers โ†’ will skip/lose one frame on every loop (time remapping)

Hey Zack!

As I was working on some perfect loops and did video previews with some repeats for easy reviewing the loop behaviour, avoiding loop point stuttering on a video player, this came to my attention:
I also was used to the old trick / workaround regarding looping precomps via time remapping and doing the adding on key prior to the last keyframe and then deleting the last key - just as your script does.
Well, it turns out, this will remove the one empty frame (or one doubled frame on clips), BUT this will result in skipping/losing one frame each loop ๐Ÿ˜ฑ.
So, a proper fix seems to be: Doing as you / we all did all the time - adding one key prior to the last keyframe, but instead of deleting the last key, replacing it with the first keyframe.

I just did a test again, for precomps and an image sequence (which of course can get a proper loop via the import option) and attached it for you to have a look at it.

Cheers, Lars.

loopCheck.zip

SRT to Text Layer Sequence

I have been trying this script:https://github.com/zlovatt/zl_Scriptlets/blob/master/SRT%20to%20Text%20Layer%20Sequence.jsx

AE makes a new text layer for me but this is absolutely empty, with no name, no keyframes, and no text source.
Mine is AE CC 2017 if it could make a difference. Tried with different .srt files from different origins and even codings.

By the way would it be possible to make "Text layer Text Source keys to SRT file" script as well?
Thank you very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.