Copy link to clipboard
Copied
Hey i heard about a script like Dugr script but with precomp reacting to the script. So you could select effects and layers from multiple pre-comp and put them in a "folder" in this script and then activate or mutin them in one clic threw the script pannel without opening every locations.. Does it bells guys and girls ? Sanks a lot if it does
Copy link to clipboard
Copied
For a simple way to turn on/off effects of a nested comp, you can use this after selecting that comp in your mastercomp. However, this turns All effects on all layers off and on. To keep a history of which layers in which comp has effects turned off/on before switching them, you can write a tmp text file to read later. Hope this helps!
var proj = app.project;
var projComp = app.project.activeItem;
var selLay = projComp.selectedLayers;
var foundFx = 0;
for(var i = 0; i <= selLay.length-1; i++){
var curLay = selLay[i];
curLay.selected = false;
if(curLay.source.typeName == "Composition"){
var curSNumLay = curLay.source.numLayers;
for(var ci = 1; ci <= curSNumLay; ci++){
var curSLay = curLay.source.layer(ci);
if(curSLay.effectsActive == true){
foundFx = 1;
break;
}
}
if(foundFx == 1){
for(var ci1 = 1; ci1 <= curSNumLay; ci1++){
var curSLay = curLay.source.layer(ci1);
curSLay.effectsActive = false;
}
}else{
for(var ci1 = 1; ci1 <= curSNumLay; ci1++){
var curSLay = curLay.source.layer(ci1);
curSLay.effectsActive = true;
}
}
}
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now