Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 66447

Re: script or an action that deletes invisible layers.

$
0
0

perfect! thank you so much!

 

for anyone that's looking for the same thing here's the script with the unlocking and deleting:

 

processArtLayers(activeDocument);

///////////////////////////////////////////////////////////////////////////////

// Function: processsArtLayers

// Input: document or layer set

///////////////////////////////////////////////////////////////////////////////

function processArtLayers(obj) {

    for( var i = obj.artLayers.length-1; 0 <= i; i--) {

        try {

            if(!obj.artLayers[i].visible)

            {

                 obj.artLayers[i].allLocked = false;

                 obj.artLayers[i].remove();

 

            }

            }

        catch (e) {}

        }

    for( var i = obj.layerSets.length-1; 0 <= i; i--) {

        processArtLayers(obj.layerSets[i]);

        }

   }


Viewing all articles
Browse latest Browse all 66447


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>