Brushes
Brushes
Section titled “Brushes”app.activeDocument.brushes
Description
Section titled “Description”A collection of Brush objects in a document.
Properties
Section titled “Properties”Brushes.length
Section titled “Brushes.length”app.activeDocument.brushes.length
Description
Section titled “Description”The number of objects in the collection
Number; read-only.
Brushes.parent
Section titled “Brushes.parent”app.activeDocument.brushes.parent
Description
Section titled “Description”The document that contains this brushes collection.
Object; read-only.
Brushes.typename
Section titled “Brushes.typename”app.activeDocument.brushes.typename
Description
Section titled “Description”The class name of the referenced object.
String; read-only.
Methods
Section titled “Methods”Brushes.getByName()
Section titled “Brushes.getByName()”app.activeDocument.brushes.getByName(name)
Description
Section titled “Description”Gets the first element in the collection with the specified name.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
name | String | Name of element to get |
Returns
Section titled “Returns”Brushes.index()
Section titled “Brushes.index()”app.activeDocument.brushes.index(itemKey)
Description
Section titled “Description”Gets an element from the collection.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
itemKey | String, Number | String or number key |
Returns
Section titled “Returns”Example
Section titled “Example”Counting brushes
Section titled “Counting brushes”// Counts all brushes in the active document
if (app.documents.length > 0) { var numberOfBrushes = app.activeDocument.brushes.length;}