If you want to stay in touch + hear about new tools/resources, signup here →
How to use the script
Always check code before running it on your computer. Even basic scripts like this one. If you’re not a developer, ask an LLM like ChatGPT, Claude, or Gemini to verify it for you.
Option 1: Install to your AE Folder
Download and install the below .jsx file in your After Effects Script folder. You can then run it using the scripts menu, or by using a launcher like Quick Menu 3.
Option 2: Adapt the script yourself
Alternatively copy the code below and develop your own version. If you’re not a developer you can do this easily with an LLM like ChatGPT.
End Hold Script
JV End Hold.jsx1.1KB
(function() {
var comp = app.project.activeItem;
if (!comp || !(comp instanceof CompItem)) {
alert("Please select a composition.");
return;
}
var layer = comp.selectedLayers[0];
if (!layer) {
alert("Please select a layer.");
return;
}
app.beginUndoGroup("Apply Time Remapping");
// Enable time remapping for the layer
layer.timeRemapEnabled = true;
var timeRemap = layer.property("ADBE Time Remapping");
// Add a keyframe at the current time
var currentTime = comp.time;
var keyIndex = timeRemap.addKey(currentTime);
// Make the keyframe an ease-in keyframe
var easeIn = KeyframeInterpolationType.BEZIER;
timeRemap.setInterpolationTypeAtKey(keyIndex, easeIn, easeIn);
// Add a hold keyframe immediately after
var holdKeyIndex = timeRemap.addKey(currentTime + comp.frameDuration);
var hold = KeyframeInterpolationType.HOLD;
timeRemap.setInterpolationTypeAtKey(holdKeyIndex, hold, hold);
// Remove the last keyframe
var lastKeyIndex = timeRemap.numKeys;
timeRemap.removeKey(lastKeyIndex);
app.endUndoGroup();
})();
End Split Script
JV End Split.jsx1.3KB
(function() {
var comp = app.project.activeItem;
if (!comp || !(comp instanceof CompItem)) {
alert("Please select a composition.");
return;
}
var layer = comp.selectedLayers[0];
if (!layer) {
alert("Please select a layer.");
return;
}
app.beginUndoGroup("Apply Time Remapping With Pre-Split");
// 1) Split first, move the new part forward
var currentTime = comp.time;
var splittedLayer = layer.splitLayer(currentTime);
splittedLayer.startTime += 1.0;
// 2) Time-remap the first layer
layer.timeRemapEnabled = true;
var timeRemap = layer.property("ADBE Time Remapping");
// Add a keyframe at the current time
var keyIndex = timeRemap.addKey(currentTime);
var easeIn = KeyframeInterpolationType.BEZIER;
timeRemap.setInterpolationTypeAtKey(keyIndex, easeIn, easeIn);
// Hold keyframe
var holdKeyIndex = timeRemap.addKey(currentTime + comp.frameDuration);
var hold = KeyframeInterpolationType.HOLD;
timeRemap.setInterpolationTypeAtKey(holdKeyIndex, hold, hold);
// Remove the last keyframe
var lastKey = timeRemap.numKeys;
timeRemap.removeKey(lastKey);
// 3) Extend the first layer by one second
layer.outPoint = currentTime + 1;
app.endUndoGroup();
})();