Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kiyaga edwin #AfterEffects #Script #KBar Create solid named background with a ramp effect
//Create solid named background with a ramp effect
myComp = app.project.activeItem;
app.beginUndoGroup("Add Ramp")
mySolid = myComp.layers.addSolid([0,.8,.4], "BG", myComp.width, myComp.height,1);
mySolid.startTime = 0
myEffect = mySolid.property("Effects").addProperty("Ramp");
app.endUndoGroup();
@aescripts
Copy link
Author

aescripts commented Nov 27, 2017

"Ramp" needs to be changed to "Gradient Ramp" from CC 2016 on... they changed the name of the effect.

myComp = app.project.activeItem;
app.beginUndoGroup("Add Gradient Ramp")
mySolid = myComp.layers.addSolid([0,.8,.4], "BG", myComp.width, myComp.height,1);
mySolid.startTime = 0
myEffect = mySolid.property("Effects").addProperty("Gradient Ramp");
app.endUndoGroup();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment