I’m trying to iterate over all layers in the document to get the “layerID” property for each layer.
This is easy for the “name” property using
const photoshop = window.require("photoshop").app;
const activeDocument = await photoshop.activeDocument;
const layers = await activeDocument.layers;
for (i = 0; i < layers.length; i++){
let layerName = await layers[i].name;
console.log(layerName)
}
But is there way to do this for the “layerID” property instead of the “name” property? I don’t see a way to do it with an API, and batchPlay doesn’t accept “layers[i]” as a reference.