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
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
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
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.
Apparently you’re looking for something besides this, but maybe this will help someone else.
I thin it is even twice there
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];
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;
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
Was looking into it, but it’s only for currently selected tool
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
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?
You can check for their typeID to find out. If both share same typeID then it is an alias.
Not sure what you mean by that. Where would I look for that typeID?
I noticed, that preset selection does not differentiate if there are multiple presets with the same name. Same with brushes. Descriptors are:
{
"_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?
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.