Page 1 of 1

Remove hidden properties and effects

Posted: October 2nd, 2020, 2:42 pm
by Jonath

How to delete hidden properties (Like Fill - Stroke - Trim Paths of shape layers) and effects from selected layers?
This script removes hidden Fill:

Code: Select all

function myHandler1(g){
if (g.matchName === "ADBE Vector Graphic - Fill" && g.enabled == false) g.remove();
function scoutContent(g, handler){
var n, child;
if (!g.content) return;
g = g.content;
for (n=g.numProperties; n>0; n--){
child =;
if (Object.isValid(child) && child.content) scoutContent(child, handler);

scoutContent(app.project.activeItem.selectedLayers[0], myHandler1);

What can I do to:
Affect all selected layers not just one?
Delete all properties and effects not just fill?

Thank you!