Skip to main content
rob art | illustration
Known Participant
September 28, 2025
Question

How to get actual brush display names (not internal names) in UXP 6?

  • September 28, 2025
  • 1 reply
  • 148 views

I've been banging my head against the wall trying to build a brush panel plugin that captures the currently selected brush with its proper display name. The problem is that Photoshop's APIs keep giving me useles internal names instead of what users actually see.

 

  What I'm trying to do:

  - Detect the currently selected brush

  - Get its real display name (like "Rob's Main Brush" or "Soft Round")

  - Ideally also get the brush preview/thumbnail image

 

  What I've tried so far:

 

  1. currentToolOptions - This gives me crap like "hair 4" or "brush 4" instead of the actual brush names users see. Completely useless.

  2. presetManager - Contains thousands of items but they're mixed with

  tool presets, crop settings, text presets, etc. Not just brushes. Also has duplicates across different loaded brush sets.

  3. brush property (JSON) - This has the actual brush database with real

  names, but only seems to contain custom ABR brushes, not default Photoshop brushes.

  4. Action listeners - Tried listening for brush selection events but they're unreliable and don't give better name data.

 

  Current situation:

  - Some brushes work (custom ones from ABR files via reverse lookup)

  - Default Photoshop brushes return generic internal names

  - No consistent way to get display names

  - Can't get brush preview images at all

 

  This should be simple! In any normal API you'd have something like

  getCurrentBrush().displayName and getCurrentBrush().previewImage but

  apparently Adobe doesn't believe in consistency.

 

  Questions:

  1. Is there a reliable way to get the actual brush display name that users see in the brush picker?

  2. Can we access brush preview/thumbnail images through UXP/batchPlay?

  3. Why do currentToolOptions return internal names instead of display names?

  4. Is there a way to distinguish between actual brush presets vs other tool presets in presetManager?

 

  I've spent weeks on this and I'm about ready to give up. Any help would be massively appreciated.

 

  Environment:

  - Photoshop 2025

  - UXP 6

  - Multiple loaded ABR brush sets

 

  Thanks in advance for any guidance. This community is usually great at solving these kinds of API mysteries

1 reply

creative explorer
Community Expert
Community Expert
September 28, 2025

@rob art | illustration working beside someone who said this:

Yeah, there is a reliable way, a two-step cross-reference involving batchPlay and the presetManager.

  • Get the Brush Identifier. Use batchPlay with a get descriptor on the current tool to reliably get the active brush's internal unique ID or key. This is a more stable internal identifier than the simple strings sometimes returned by currentToolOptions

 

  • Cross-Reference with presetManager. Fetch all brush presets using the presetManager. The display names ("Rob's Main Brush," "Soft Round") are stored within the objects returned by presetManager.getPresets(). You must then iterate through this (potentially very large) list and match the ID from Step 1 to the corresponding brush object.

 

This should work because the currentToolOptions and the batchPlay descriptor give you the active state (the internal identifier), while the presetManager holds the metadata (the display name) for every available brush asset.

m
rob art | illustration
Known Participant
September 29, 2025

Unfortunately, the suggested two-step cross-reference approach using
batchPlay + presetManager does not work in UXP. Here's what I found when
implementing it:

The Code I Tested:

// STEP 1: Get the active brush's internal unique ID using batchPlay
const toolOptionsResult = await executeAsModal(async () => {
return await batchPlay([{
_obj: "get",
_target: [
{ _ref: "property", _property: "currentToolOptions" },
{ _ref: "application", _enum: "ordinal", _value: "targetEnum"
}
]
}], {});
}, { commandName: "Get Current Tool Options" });

// Extract brush identifier
let brushIdentifier = null;
if (toolOptionsResult && toolOptionsResult[0] &&
toolOptionsResult[0].currentToolOptions) {
const toolOptions = toolOptionsResult[0].currentToolOptions;
if (toolOptions.brush) {
brushIdentifier = toolOptions.brush.name ||
toolOptions.brush.uuid ||
toolOptions.brush.id ||
toolOptions.brush._name;
}
}

// STEP 2: Cross-reference with presetManager
const presetManager = require('photoshop').presetManager;
const allBrushPresets = await presetManager.getPresets('brush');

The Results:

Step 1 ✅ WORKS: Successfully extracted brush identifier "hair 4" from
currentToolOptions.brush.name

Step 2 ❌ FAILS:
- require('photoshop').presetManager exists but has no methods
- presetManager.getPresets('brush') returns undefined
- presetManager.getPresets() also returns undefined

Console Output:
🔍 Step 1 - Brush data: {_obj: "sampledBrush", diameter: {…}, angle: {…},
roundness: {…}, name: "hair 4", …}
🔍 Step 1 - Extracted brush identifier: hair 4
🔍 Found presetManager via require
🔍 presetManager methods: []
🔍 getPresets method not available

Conclusion:

While Step 1 (getting the brush identifier via batchPlay) works
perfectly, Step 2 (cross-referencing with presetManager) is not possible
because:

1. presetManager.getPresets() method doesn't exist in UXP
2. The presetManager object has no available methods
(Object.keys(presetManager) returns [])
3. Alternative batchPlay queries for presets return "command not
available" errors

So unfortunately, the forum suggestion is incorrect - there is no
reliable way to get brush display names in UXP using this approach. The
presetManager API appears to be non-functional or heavily restricted in
the UXP environment.

practice safe design | use a concept~ Petrula Vrontikis