Skip to content

Instantly share code, notes, and snippets.

@aescripts
aescripts / Set BG Color of Selected Comps.jsx
Created November 17, 2020 21:56
#AfterEffects #Script #KBar #Scriptlet Set BG Color of Selected Comps
//Sets the color of the selected comps in the project panel to the bgColor
var bgColor = [0, 0, 0]; //RGB in float (0..1)
for (var i = 0; i < app.project.selection.length; i++) {
if (app.project.selection[i] instanceof CompItem) {
app.project.selection[i].bgColor = bgColor;
}
}
@aescripts
aescripts / Solid Settings Changer.jsx
Last active May 5, 2023 15:22
#AfterEffects #Script #KBar #Scriptlet Solid Settings Changer
// Solid Settings Changer
// Select items in the Project panel
// Enter new dimensions and click Do it!
// ©2020 Lloyd Alvarez https://aescripts.com/
la_SolidSettingsChanger(this);
function la_SolidSettingsChanger(thisObj) {
@aescripts
aescripts / Make Layers React to a Mask.jsx
Last active August 20, 2022 06:10
#AfterEffects #Expression #ThePowerOfExpression
// Make Layers React to a Mask
// Based on knowledge from The Power of Expression Book
// https://aescripts.com/the-power-of-expression/
//
// Requires the new 'Javascript' expressions engine introduced in AE 16.0 (CC2019)
// You can set this in File -> Project Settings: https://drop.aescripts.com/NQurXWmG
// If you replace all "let" to "var" this expression will should work in previous versions
//
// v1 initial version
// v2 added feathering support
@aescripts
aescripts / Move Layer XYZ at CTI Scriptlet.jsx
Created February 27, 2020 15:07
#AfterEffects #Script #KBar #Scriptlet Move Layer XYZ at CTI
// move layer xyz at CTI scriptlet
// v1.0
// Lloyd Alvarez https://aescripts.com/
//
// Works in KBar as a JSX or Scriptlet with an argument X,Y,Z (Z is optional) to move the selected layers by that amount at the current time marker (CTI)
// For example: 10,20,-30
// Would move the selected layer 10 pixel in X, 20 in y and -30 in z
// If no argument is set then it will prompt for it
var isKBarRunning = (typeof kbar !== 'undefined');
@aescripts
aescripts / Move Layer XYZ.jsx
Last active August 20, 2022 06:11
#AfterEffects #Script #KBar #Scriptlet Move Layer XYZ
// move layer xyz scriptlet
// v1.2
// Lloyd Alvarez https://aescripts.com/
//
// Works in KBar as a JSX or Scriptlet with an argument X,Y,Z (Z is optional) to move the selected layers by that amount
// For example: 10,20,-30
// Would move the selected layer 10 pixel in X, 20 in y and -30 in z
// If no argument is set then it will prompt for it
var isKBarRunning = (typeof kbar !== 'undefined');
@aescripts
aescripts / Move by a predefined number of frames in the timeline.jsx
Created September 29, 2018 13:21
#AfterEffects #Script #KBar Moves the active comp's current time indicator by the defined amount
/*
Move by a predefined number of frames in the timeline.jsx
Moves the active comp's current time indicator by the defined amount
*/
try{
var framesToMove = -5; //make this a negative to move backwards
app.project.activeItem.time = app.project.activeItem.time + framesToMove * app.project.activeItem.frameDuration;
}
catch (e) {}
@aescripts
aescripts / AutoTrace and copy Masks from Layer Above.jsx
Last active August 20, 2022 06:42
#AfterEffects #Script #KBar #AutoTrace Auto Traces and copies the masks from the layer above
/*
AutoTrace and copy Masks from Layer Above.jsx
By Lloyd Alvarez https://aescripts.com/
Selects the layer above
Invokes Auto-Trace...
Copies the masks to the layer below
Deletes the layer above
*/
try{
app.beginUndoGroup("Auto-trace and copy masks from Layer Above");
@aescripts
aescripts / Time-Reverse Keyframes.jsx
Created June 18, 2018 13:41
#AfterEffects #Script #KBar #Time-Reverse-Keyframes
//Time-Reverse Keyframes.jsx
//©2009 aescripts.com
//
// Executes the Time-Reverse Keyframes Keframes Assistant found in the Animation menu
// Assign it to a KBar button or keyboard shortcut: https://helpx.adobe.com/after-effects/using/keyboard-shortcuts-reference.html
//
app.executeCommand(app.findMenuCommandId("Time-Reverse Keyframes"));
@aescripts
aescripts / objFile vertices to AE Nulls.jsx
Created June 8, 2018 14:43
Will read an OBJ file and create After Effects nulls for every vertex #AfterEffects #Script #KBar #OBJ #Nulls
// objFile vertices to AE Nulls
// © 2018 Lloyd Alvarez https://aescripts.com/
//
// Select a comp first then run the script and select the OBJ file
//
objFile_vertices_to_AE_Nulls();
function objFile_vertices_to_AE_Nulls () {
var objFile = File.openDialog("Please choose OBJ file");
@aescripts
aescripts / Cycle Through Letters.jsx
Last active August 20, 2022 06:33
#AfterEffects #Expression as requested by @ABAOProductions https://twitter.com/abaoproductions/status/940609265638760454
/*
As requested by @ABAOProductions https://twitter.com/abaoproductions/status/940609265638760454
Add this expression to the SourceText property of a Text Layer
*/
a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
fps=1;
a.charAt((timeToFrames(time,fps)%a.length-1)+1);