Activity › Forums › Adobe After Effects › Remove hidden properties and effects
-
Remove hidden properties and effects
Posted by Antoine Dupont on October 2, 2020 at 9:37 pmHow to delete hidden properties (Like Fill – Stroke – Trim Paths of shape layers) and effects from selected layers?
Antoine Dupont replied 5 years, 9 months ago 3 Members · 5 Replies -
5 Replies
-
Brendon Murphy
October 3, 2020 at 2:55 amNot quite sure what you’re asking. You can twirl down all the properties for your shape layer in the timeline. Select each one you don’t want and press “delete”. For effects, select the unwanted effect in the “effect controls” panel and press “delete”.
-
Antoine Dupont
October 3, 2020 at 10:51 amSorry for not being clear.
I’m looking for a script that does that.
-
Brendon Murphy
October 3, 2020 at 6:56 pmI think I get what you mean. I had a few minutes to get you started – this script will delete all disabled effects on selected layers.
app.beginUndoGroup(“Delete Hidden”);
var activeComp = app.project.activeItem;
var allLayers = activeComp.selectedLayers;
var numLayers = allLayers.length
var layerCheck = allLayers[0];
//make sure something’s selected
if (!layerCheck ) {
alert(“Please select layers inside the active comp.”);
} else {
//CYCLE THROUGH LAYERS
for (var f =0; f <= activeComp.numLayers-1; f ++) {
var currLayer = allLayers[f];
var numEffects = currLayer.Effects.numProperties;
var removeThese = [];
for (var i =1; i <= numEffects; i ++) {
var currEffect = currLayer.effect(i);
if (currEffect.enabled ==false){
removeThese.push(currEffect.name);
//currEffect.remove();
};//end if statement
};//end effects loop
for (var j =0; j <removeThese.length; j ++) {
var currentRemoval = removeThese[j];
currLayer.effect(currentRemoval).remove();
};
};//end layers loop
};
app.endUndoGroup();
Reply to this Discussion! Login or Sign Up