Activity › Forums › Adobe After Effects › Powering off an effect in several compositions
-
Powering off an effect in several compositions
Posted by Veronica Barron on November 8, 2021 at 4:08 pmHi,
I have made a lot compositions of an After effects project where several layers use an specific effect.
The time of rendering is too large, and I suppose that the reason is the use of this effect, so…
¿Is there a quick way to power off this specific effect in all the compositions at the same time?
Jake Brown replied 4 years, 5 months ago 4 Members · 5 Replies -
5 Replies
-
Meng Zhiqun
November 8, 2021 at 5:09 pmSomeone asked about this not too long ago.
I replied with a script. You can see it here.
Script to activate or mute effects and layers from multiple pre-comp
-
Anders Hattne
November 8, 2021 at 5:12 pm“Pt Effects Search” Script..
Seems maybe a bit pricey for what it does though. -
Jake Brown
November 8, 2021 at 6:48 pmHello, I just wrote a script that allows you to target a specific effect across all comps. This should work just fine for your needs.
var effectName = prompt("Name of effect", "Hue/Saturation");
var effectNameStr = effectName.toString();
var projItem = app.project.items;
var counter = 0;
for (i = 1; i < app.project.items.length; i++) {
// Check if item is a composition
if (projItem[i] instanceof CompItem) {
var myComp = projItem[i];
// Cycle thru comp layers
for (n = 1; n <= myComp.numLayers; n++) {
// Test if layer has effect in question;
if (myComp.layers[n].property("Effects").property(effectNameStr) != null) {
var bool = myComp.layers[n].property("Effects").property(effectNameStr).enabled;
while (myComp.layers[n].property("Effects").property(effectNameStr).enabled === bool) {
// Toggle effects on/off
myComp.layers[n].property("Effects").property(effectNameStr).enabled = !myComp.layers[n].property("Effects").property(effectNameStr).enabled;
counter++;
};
};
};
};
};
// Report what the script did
if (counter > 0) {
alert("Success! " + counter + " " + effectNameStr + " enabled/disabled");
} else {
alert("Could not find any instances of layers with " + effectNameStr);
}
Reply to this Discussion! Login or Sign Up