Created
November 13, 2014 11:27
-
-
Save darkwark/4b7601f273009d92dae3 to your computer and use it in GitHub Desktop.
Script duplicates selected layer and places it on the top of layers stack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Adobe Photoshop Script | |
| * | |
| * DESCRIPTION: | |
| * Script duplicates selected layer and places it on the top of layers stack | |
| * | |
| * INSTALATION: | |
| * To access script from "File > Scripts", place it into "Photoshop/Presets/Scripts" and restart your Photoshop | |
| * You can also set up hotkey in "Edit > Keyboard Shortcuts..." | |
| * | |
| * (c) Kamil Khadeyev, 2014/NOV | |
| * http://twitter.com/darkwark | |
| */ | |
| //Duplicate selected layer and place it on the top | |
| var actLayer = app.activeDocument.activeLayer, | |
| newLayer = actLayer.duplicate(app.activeDocument.layers[0], ElementPlacement.PLACEBEFORE); | |
| //OPTIONAL: Rename duplicated layer | |
| //newLayer.name = "[DUPLICATE]" + actLayer.name; | |
| //Select duplicated layer: | |
| app.activeDocument.activeLayer = newLayer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment