1
Get brush via script
Engaged
,
/t5/photoshop-developers-discussions/get-brush-via-script/td-p/14512065
Mar 25, 2024
Mar 25, 2024
Copy link to clipboard
Copied
All the the scripts I've done for Photoshop over the years I've never needed to access brushes... until now:
// select brush by name
var idslct = charIDToTypeID( "slct" );
var desc577 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref311 = new ActionReference();
var idBrsh = charIDToTypeID( "Brsh" );
ref311.putName( idBrsh, "my fancy synthetic brush #4" ); //brush name
desc577.putReference( idnull, ref311 );
executeAction( idslct, desc577, DialogModes.NO );
So far so good, this will select a brush where "my fancy synthetic brush #4" is the name of the required brush. Nice.
I'd like to know:
Does Photoshop seem to ignore brush folder names??
And
If there are two or more brushes named the same (accidental duplicate) does it take the first one??
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Have something to add?
Join the conversation

