Channels
A collections class allowing for array access into a document's channels,
while also providing familiar methods from ExtendScript, like getByName
Copied to your clipboard1// Iterate through all channels in the document2app.activeDocument.channels.forEach(h => console.log(h.name));
Indexable
▪ [index: number]: Channel
Used to access the channels in the collection
Copied to your clipboard1// Iterate through all channels in the document2app.activeDocument.channels.forEach(h => console.log(h.name));
Properties
名称 | 类型 | 访问 | 最低版本 | 描述 |
---|---|---|---|---|
length | number | R | 23.0 | Number of Channel elements in this collection. |
parent | Document | R | 23.0 | The owner document of this Channel collection. |
typename | string | R | 23.0 | The name for this object collection: Channels. |
Methods
add
23.0Create a new alpha channel in this document.
getByName
23.0Find the first channel with the matching name.
Parameters
名称 | 类型 |
---|---|
name | string |
removeAll
23.0void
Remove all Alpha channels in the parent document.