get toolpresets for certain tool
Hi everybody,
I have a question again. Is it possible to filter from the list of toolpresets only those for a certain tool (not the active tool)
In the code sample you get the name, but is there still a type that you can call to recognize what a toolpreset it is eg. for a stamp, or brush.
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);
}
return presetNames;
};
Is there a solution?
Thanks in advance for the help
