1

I would like to duplicate a layer set and all it's contents (layers + layersets) via Photoshop scripting (JS).

Is it possible to completely clone a layer set out of the box, or does anyone known of a known script that suits that purpose?

2 Answers 2

1

The layerset object has a duplicate method on it - so it is just a matter of running something like this:

 app.activeDocument.activeLayer.duplicate()
Sign up to request clarification or add additional context in comments.

Comments

0

Just in case, if you don't want the dialog window when you duplicate a layer it can be done this way:

var _ = displayDialogs;                     // save original prefs
app.displayDialogs = DialogModes.NO;        // disable dialogs
activeDocument.activeLayer.duplicate();
app.displayDialogs = _;                     // restore original prefs

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.