# How to get all brush or tool presets?

**URL:** <https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168>\
**Category:** UXP Plugin API\
**Tags:** api, uxp, batch-play\
**Created:** [November 26, 2023, 4:25pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168 "2023-11-26T16:25:49Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [November 26, 2023, 4:25pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/1 "2023-11-26T16:25:49Z")

</div>

Is there a way to get tool/brush preset list? Thought maybe it’s not in Alchemist app properties list and tried `toolPreset` & `toolPresets`, but it seems there are no such properties indeed. I’d like to get the list of these presets and then allow to select them with a click of the button in a panel

---

<div class="post-metadata">

**Author:** ![tomzag](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/tomzag/32/2464_2.png) [@tomzag](https://forums.creativeclouddeveloper.com/u/tomzag)\
**Post date:** [November 27, 2023, 6:55am UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/2 "2023-11-27T06:55:52Z")

</div>

Yes, there is. Since you are developing (have developed) a competing product that seems to have the same features as my plugin, I’m not sure if I should tell you how to do it 😉

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [November 27, 2023, 1:38pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/3 "2023-11-27T13:38:52Z")

</div>

I understand Thomas’ point of view, but honestly, seeing @Jarda’s reaction to Thomas’ comment is very disappointing and discouraging ☹ This makes me think, that help is prioritised based on the earlier relationship between devs. Especially when Jarda is now on Adobe team ☹

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [November 27, 2023, 3:43pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/4 "2023-11-27T15:43:19Z")

</div>

I am not judging who’s project is better or who should give advice under what circumstances. I just found out that reaction was funny and interesting. If you two would switch names on this topic my reaction would be the same. That is all 😃

Also, my contract expired. I am not on the Adobe team anymore.

---

<div class="post-metadata">

**Author:** ![AnthonyK](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@AnthonyK](https://forums.creativeclouddeveloper.com/u/AnthonyK)\
**Post date:** [November 27, 2023, 8:02pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/5 "2023-11-27T20:02:25Z")

</div>

Apparently you’re looking for something besides this, but maybe this will help someone else.

![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/e/ebb0cc15ff32d669db213195ef8cacbea03db7d9.png)

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [November 27, 2023, 8:29pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/6 "2023-11-27T20:29:53Z")

</div>

I thin it is even twice there

```auto
const {batchPlay} = require("photoshop").action;

const result = await batchPlay(
   [
      {
         _obj: "get",
         _target: [
            {
               _property: "presetManager"
            },
            {
               _ref: "application",
               _enum: "ordinal",
               _value: "targetEnum"
            }
         ],
         _options: {
            dialogOptions: "dontDisplay"
         }
      }
   ],
   {}
);

const pinned = result[0].presetManager[0];

```

```auto
const {batchPlay} = require("photoshop").action;

const result = await batchPlay(
   [
      {
         _obj: "get",
         _target: [
            {
               _property: "brushes"
            },
            {
               _ref: "application",
               _enum: "ordinal",
               _value: "targetEnum"
            }
         ],
         _options: {
            dialogOptions: "dontDisplay"
         }
      }
   ],
   {}
);

const pinned = result[0].brush;

```

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [November 28, 2023, 9:41am UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/7 "2023-11-28T09:41:24Z")

</div>

> [@Jarda](#):
>
> Also, my contract expired. I am not on the Adobe team anymore.

Did not know that ☹  
In any case, I consider you as one of the very best devs for Ps and seeing this reaction made me feel sad, especially when I was assuming you knew what the solution was 🤷‍♂️ I hope you can understand my reaction from my point of view 😕

* * *

> [@AnthonyK](#):
>
> Apparently you’re looking for something besides this, but maybe this will help someone else.
> 
> ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/e/ebb0cc15ff32d669db213195ef8cacbea03db7d9.png)

Was looking into it, but it’s only for currently selected tool

* * *

> [@Jarda](#):
>
> I thin it is even twice there

I don’t think I noticed `presetManager` property in Alchemist 🧐 Will double check later in the evening, but sounds like exactly what I was looking for. Thank you so much! 🙇‍♂️ I didn’t check `brushes` at all I think - will check also 🙏

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [November 28, 2023, 8:43pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/8 "2023-11-28T20:43:05Z")

</div>

It seems `presetManager` has all the info I need. And I see it’s in Alchemist. Probably missed it when I didn’t know what exactly I was looking for ☹

Also in your example for brushes you use `brushes`, but in Alchemist it’s `brush`. Both return exact same `brush` data. Just an alias? 🤔

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [November 29, 2023, 11:08am UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/9 "2023-11-29T11:08:04Z")

</div>

You can check for their typeID to find out. If both share same typeID then it is an alias.

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [November 29, 2023, 12:03pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/10 "2023-11-29T12:03:02Z")

</div>

Not sure what you mean by that. Where would I look for that typeID?

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [November 29, 2023, 12:46pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/11 "2023-11-29T12:46:01Z")

</div>

[https://developer.adobe.com/photoshop/uxp/2022/ps\_reference/media/photoshopaction/#getidfromstring](https://developer.adobe.com/photoshop/uxp/2022/ps_reference/media/photoshopaction/#getidfromstring)

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [December 2, 2023, 3:15pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/12 "2023-12-02T15:15:59Z")

</div>

I noticed, that preset selection does not differentiate if there are multiple presets with the same name. Same with brushes. Descriptors are:

```auto
{
   "_obj": "select",
   "_target": [
      {
         "_ref": "toolPreset",
         "_name": "Tool Preset Name"
      }
   ]
}

{
   "_obj": "select",
   "_target": [
      {
         "_ref": "brush",
         "_name": "Brush Name"
      }
   ]
}

```

Is there a way to specifically define which brush/preset to select if there are multiple by the same name?

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [December 2, 2023, 5:30pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-all-brush-or-tool-presets/7168/13 "2023-12-02T17:30:15Z")

</div>

With layer styles… patterns have their own GUID and that can be used instead of name. But for tool presets… good luck… choose very unique names.
