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

Photoshop tool preset list, by current/active tool?

New Here ,
Mar 16, 2016 Mar 16, 2016

Copy link to clipboard

Copied

0down votefavorite

Ok so I know that this has been asked before but In a more general way(recently). I'm trying to get the list of toolpresets but only those of the active tool selected. So If I have the Brush tool selected, It would only scan/output for just the brush tool. I know you can do the tool presets list as a whole(see script below), but I'm trying to run a make new tool preset option(not the default) that you input the tool preset name you want, It scans the current active tool presets to see if that name exists, if it does already exist it error messages and restarts the input process again, halting. I can get it to check the whole list and work fine, but I'd like ONLY to check by active tool selected, so it only checks those of that type vs the entire list. By default photoshop already does it, it only checks the list of the tool you are using, i'm trying to do the same. Other wise as it stands now if there is a name for example in the eraser tool presets, and i try inputting that name as a regular brush tool preset, it finds the name and says i cannot process because the name already exists(in erasers), that's why Im asking. I hope this makes sense. What i started with was this script on the forums:

function getToolPresetNames() {
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var appDesc = executeActionGet(ref); var List = appDesc.getList(stringIDToTypeID('presetManager'));
var presetNames=[];
var list = List.getObjectValue(7).getList(charIDToTypeID('Nm '));
for (var i = 0; i < list.count; i++) {
var str = list.getString(i);
presetNames
.push(str); } r
eturn
presetNames;

}

TOPICS
Actions and scripting

Views

3.6K

Translate

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
Adobe
Contributor ,
Jan 22, 2019 Jan 22, 2019

Copy link to clipboard

Copied

r-bin, thank you!! This is excellent and works perfectly. Now we can get an individual list of any tool preset and save it to disk as a .txt file, which can allow us to assemble a better way to select tool presets, which I am still working on

Votes

Translate

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
Contributor ,
Apr 19, 2024 Apr 19, 2024

Copy link to clipboard

Copied

LATEST

Hello everyone and welcome back

 

To continue this topic... 

 

How can we get the name of the current tool preset being used?

Votes

Translate

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