Skip to main content
This topic is closed to new replies. Start a new post to keep the conversation going.

50 replies

Participating Frequently
May 29, 2023

Hi. is there a way to skip the Hue/Saturation layers from the list, because they are getting added too?

Thanks,

Mukul

Translate
Stephen Marsh
Community Expert
Community Expert
May 29, 2023
quote

Hi. is there a way to skip the Hue/Saturation layers from the list, because they are getting added too?

Thanks,

Mukul


By @chandubhau

 

What method are you using, the one from @jazz-y or another one?

Translate
Participating Frequently
May 29, 2023

Yes, the one from @jazz-y .

Translate
Stephen Marsh
Community Expert
Community Expert
May 13, 2017

This is also possible with ExifTool using the following command:

exiftool -Photoshop:LayerNames PATH-TO-FILE-or-FOLDER

Which would output the following (which may be a little cryptic, see the screenshot below for a visual):

Color Fill 1, </Layer group>, Layer 0, Layer 1, Layer 2, Layer 3, Group 1, Layer 4, Invert 1

For an Adobe Illustrator .AI file, the command would be:

exiftool -a -XMP-egLayL:LayersName PATH-TO-FILE-or-FOLDER

Translate
natrev
Legend
October 23, 2015

Hi maninthebox390,

Try this Code..... and Big Thanks to c.pfaffenbichler.

-yajiv

#target photoshop

var theLayers = collectLayers(app.activeDocument, []);

////// function collect all layers //////

function collectLayers (theParent, allLayers) {

      if (!allLayers) {var allLayers = new Array}

      else {};

        var theNumber = theParent.layers.length - 1;

      for (var m = theNumber; m >= 0;m--) {

          var theLayer = theParent.layers;

        // apply the function to layersets;

          if (theLayer.typename == "ArtLayer") {

          OutFoldCSV("~/Desktop",theLayer.name);

          }

          else {

          allLayers = (collectLayers(theLayer, allLayers))

        // this line includes the layer groups;

          OutFoldCSV("~/Desktop/Layer_Data",theLayer.name);

          }

      };

      //return allLayers

  };

     function OutFoldCSV(App_Path,Layer_name){

        var outfolder = new Folder(App_Path)

            if (outfolder.exists == false){

                outfolder.create();

                var myLogFile = new File(outfolder + "/LayerRef.xls");

                myLogFile.open("a", undefined, undefined)

                myLogFile.write(Layer_name);

                myLogFile.write("\n");

            }

            else{

                var myLogFile = new File(outfolder + "/LayerRef.xls");

                myLogFile.open("a", undefined, undefined)

                myLogFile.write(Layer_name);                

                myLogFile.write("\n");

            }

    }

Translate
Inspiring
October 23, 2015

This is a useful working script. I would like to customize the script by adding the file name to the list of layers in the xml file. Can someone provide guidance to achieve this result.

Translate
JJMack
Community Expert
Community Expert
October 23, 2015

Photoshop is not a file editor and new documents have no associated files till you save one.  Do you want the full file path and name and extension?

Translate
JJMack