Prompt Details
Model
Completion - GPT-3.5 (text-davinci-003)
Token size
111 ($0.00220 / call)
Example input
Create a script that creates a null layer above every selected layer.
Example output
{
// Get the active comp
comp = app.project.activeItem;
// Make sure the active item is a Comp
if (!comp || !(comp instanceof CompItem)) {
alert("Please select a composition first!");
} else {
// Get all selected layers
layers = comp.selectedLayers;
// Iterate through all selected layers
for (var i = 0; i < layers.length; i++) {
// Create a null layer
var nullLayer = comp.layers.addNull();
nullLayer.name = layers[i].name + "_null";
// Position the null layer above the current layer
nullLayer.moveBefore(layers[i]);
}
}
}
By purchasing this prompt, you agree to our terms of service
TEXT-DAVINCI-003
This script can help you create After Effects scripts and expressions fast. It allows you to describe what you want to do and it will create After Effects code that an executed in most cases.
For more complex scripts you need to submit multiple times.
Programming knowledge is not required but helps you find out faster why something doesn't work!
Save AE scripts as JSX and import into AE.
...more
Added over 1 month ago

