This script removes disabled effects from layers in your comp. While disabled effects don’t do anything, they mess up the workspace, create confusion, increase the size of the project file and can cause problems if you’re sharing the project to machines that don’t have the effects.
So here’s a quick script I wrote when I had a bazillion layers with disabled effects that I wanted to prune. For once it was actually quicker than doing it manually. I must be getting better at js (oh, the shame, the shame).
A quick note on usage. If you have layers selected it will only clean those layers, if you have no layers selected it will clean the whole comp. I figure that’s a better approach than giving you an error and telling you to select some layers. It’s the metaphor that I’m going to adopt for all my scripts from now on: none selected == all selected.