1
votes

in Photoshop, you can create folder with layer in it. I would like to do this with Photoshop script (JS). I have been looking to the documentation but didn't found any way to do it. Can someone show me the command or lead me to a related question please ? Thank you !

The doc I looked at : https://www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-scripting-guide-2020.pdf

1

1 Answers

1
votes

I found this and it seems to work :

var group = app.activeDocument.layerSets.add();
group.name = "Annotations";

var layerGroup = app.activeDocument.layerSets.getByName("Annotations");
var layerRef = layerGroup.artLayers.add();
layerRef.name = "Annotations";
layerRef.blendMode = BlendMode.NORMAL;