Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
1

Get brush via script

Engaged ,
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??

 

 

 

Views

80
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation