Home > Web Front-end > JS Tutorial > How to batch modify layer names in PS using JS_javascript skills

How to batch modify layer names in PS using JS_javascript skills

WBOY
Release: 2016-05-16 17:02:17
Original
1516 people have browsed it
Copy code The code is as follows:

#target photoshopapp.bringToFront();
if (documents. length == 0) {
alert("No document to process");
} else {
var visibility = false;
var docRef = activeDocument;
var layers = docRef. layers;
if (layers.length == 1 && docRef.activeLayer.isBackgroundLayer == 1) {
alert("The Background layer can not be hidden when it is the only layer in a document.");
} else {
for (var i = 0; i < layers.length; i ) {
var tempName = "name" i;//Modified name
layers[i] .name = tempName;
}
}

}

Save the above code as a .jsx file and run it as a script in ps.

can only support all layer modes and does not work on groups.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template