Used to access the Layer Comp in the collection
Adds a Layer Comp to the document's collection. If no options are given, only visibility will be recorded.
Note: This command will fail if the document is flat, that is, only a Background and no other layers.
Optionaloptions: LayerCompCreateOptionsAn optional object literal containing key/value pairs as described by LayerCompCreateOptions
const options = {
name: "mockup",
comment: "First attempt",
visibility: true,
position: true
};
await require('photoshop').app.activeDocument.layerComps.add(options);
A collections class allowing for array access into a document's Layer Comps
Access this collection through Document.layerComps property. For example, following adds a new Layer Comp to the collection:
See
https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/layercomps/
Example
Min Version
24.0