如何选中多个图层
例如:选中图层2和图层5
select_layer("图层 2");
select_layer("图层 5", true);
function select_layer(nm, add)
{
try {
var r = new ActionReference();
r.putName(stringIDToTypeID("layer"), nm);
var d = new ActionDescriptor();
d.putReference(stringIDToTypeID("null"), r);
if (add == true) d.putEnumerated(stringIDToTypeID("selectionModifier"), stringIDToTypeID("selectionModifierType"), stringIDToTypeID("addToSelection"));
executeAction(stringIDToTypeID("select"), d, DialogModes.NO);
}
catch (e) { alert(e); throw(e); }
}

Photoshop脚本:选择多个图层的技巧
本文介绍了一段Photoshop的JavaScript脚本,用于通过名称选择多个图层。通过调用`select_layer`函数并传入图层名称,可以实现添加到当前选择或将选择替换为特定图层的功能。这对于批量处理或组织复杂的图层结构非常有用。
557

被折叠的 条评论
为什么被折叠?



