跳转到内容

画笔

app.activeDocument.brushes

文档中的画笔对象集合。


app.activeDocument.brushes.length

集合中的对象数量。

数字;只读。


app.activeDocument.brushes.parent

包含此画笔集合的文档。

对象;只读。


app.activeDocument.brushes.typename

引用对象的类名。

字符串;只读。


app.activeDocument.brushes.getByName(name)

获取集合中具有指定名称的第一个元素。

参数类型描述
name字符串要获取的元素的名称

画笔


app.activeDocument.brushes.index(itemKey)

从集合中获取一个元素。

参数类型描述
itemKey字符串, 数字字符串或数字键

画笔


// 统计活动文档中的所有画笔数量
if (app.documents.length > 0) {
var numberOfBrushes = app.activeDocument.brushes.length;
}