Share to EffectHub.com

You can earn money or coins from your share:)

Tips: you can use Sparticle for uploading away3D effects.

Tips: you can download Sparticle for uploading effects.

Tips: The ActionScript editor is supporting Away3D, Starling, Dragonbones and Flex frameworks.

Tips: paste the web page URL then click button:)

How do I duplicate multiple PS layers (lots of them!) so that each layer is below its copy



how to duplicate multiple Photoshop layers (hundreds of them!) so that each layer is below its copy, i.e. rather than all the copies being in one group and the original in the other (as normal)? Hope this posted in correct forum. Would be grateful of any advice.

E.g. from this:
layer4
layer3
layer2
layer1

Duplicated to this:

layer4 copy
layer4
layer3 copy
layer3
layer2 copy
layer2
layer1 copy
layer1

Rather than this:
layer4 copy
layer3 copy
layer2 copy
layer1 copy
layer4
layer3
layer2
layer1

Tags

2205 views    1 answers

The Best Answer

0


Not sure what version of PS you are using, but here is a simple script I lifted from the Photoshop CC Javascript guide ("ArtLayer.jsx" page 62-4) and it seems to work here on CC (if you want to change the sort order, change "ElementPlacement.PLACEAFTER" to "ElementPlacement.PLACEBEFORE"):

// sort the layers by name
for (var x = 0; x < app.activeDocument.layers.length; x++) {
for (var y = 0; y < app.activeDocument.layers.length - 1 - x; y++) {
// Compare in a non-case sensitive way
var doc1 = app.activeDocument.layers[y].name
var doc2 = app.activeDocument.layers[y + 1].name
if (doc1.toUpperCase() > doc2.toUpperCase()) {
app.activeDocument.layers[y].move(app.activeDocument.layers[y+1], ElementPlacement.PLACEAFTER)
}
}
}

If you are going to use this often, I suggest saving it in a plain text editor as sort.jsx or something similar (the .jsx extension is necessary for PS for most current versions) in the startup scripts folder for photoshop so it loads everytime and you can attach a hotkey, too.

Lemme know how it works.

Save early. Save often.

2014-07-14     0 Comments

trytrymore

2014-07-14

Public Question, everyone could view answers and download attachments.

Finish this task then you can earn 10

Task Finished


>>Back to Task List


Sponsor


You may interest with



Share

Join Effecthub.com


Or Login with Your Email Address:

Or Sign Up with Your Email Address:
This field must contain a valid email
Password should be at least 1 character