-
Script to add an effect to selected layers
Hi all,
In the general After Effects forum someone suggested that you can create hotkeys for applying effects by creating a script that applies the effect and then assigning that a hotkey. I think it’s a great idea, so wanted to try it out.
I haven’t done scripting for AE before but have a little bit of general knowledge so thought I might be able to piece it together, but haven’t had much luck. Through amalgamating stuff from a few sites I came up with something like this, but it doesn’t work…
var effectsGroup = app.project.activeItem.selectedLayers;
myEffect = effectsGroup.Effects.addProperty(“ADBE Fast Blur”);I thought that by following the guide from redefinery I could combine the first 2 parts (check if a layer can have effects applied, then apply an effect), but that hasn’t worked either.
https://www.redefinery.com/ae/fundamentals/effects/
Thanks for any guidance, I think this should be pretty straightforward but i’m a bit stuck 🙂
Cheers,
Stuart