So a few weeks ago I've undertaken the endeavor of creating a proper brush manager. Of course, some time into it I've discovered MagicSquire and BrushBox, each of which would have been great as they are for my needs, but since I'm already quite far along, I might as well finish making my own. It looks like this currently: I've decided to store the brushes as Tool Presets because (I assumed) Tool Presets would have unique names and I wouldn't have a problem selecting them, as well as possibly adding other types of tools to the manager later. The thumbnail generation is done by creating a document of the appropriate size, creating a curve or curve point, and stroking them. I'm pretty happy with the result, but I'm not happy with Photoshop displaying the process and would have preferred to just have a loading cursor. An object called viewlessDocument has been mentioned around, but it seems like it's only useful for reading data from a document, and not manipulating its contents.. Brushbox seems to load its thumbnails very quickly and I'm assuming it either has direct access to Photoshop's brush thumbnails/sample data, or is reading it from a file using knowledge of the ABR/TPL file formats. But it doesn't seem to have the ability to display stroke previews on a line which would require active generation. I generate the Tool Presets from Brush Presets by dragging the Brush Preset onto my panel, which gives me the brush data. I wanted to do the same with the Tool Presets, so I could just have my button point to an existing Tool Preset, but alas, drag and drop from the Tool Presets panel doesn't register anything on the panels onDrop event. Alternatively, I wanted to create a button that you could click, which would return the currently selected Tool Preset, but alas, unlike the Brush Presets, there doesn't seem to be a way to retrieve the currently selected Tool Preset. So my third option was just to create a new tool based on whatever my brush is currently set to. Now I've come to adding functionality for loading ABRs and TPLs directly into my panel. ABRs were easy since it's just loading the ABR into my Brush Presets, figuring out which ones are new based on comparing a before and after of the list length, creating a Tool Preset for each, and deleting the Brush Presets. Now I've come to dealing with TPLs and it's more of an issue. Apparently Tools don't actually have unique names, they only encourage you to make one when you create a tool, but you can still rename it to become a duplicate, and importing a TPL can also add duplicates. Additionally, I wasn't able to figure out a way to select a Tool Preset by index, and it appears indices seem to change in relation to Tool Preset names. So as opposed to the Brush Presets, which appends brushes to the end of the list, appending a TPL would distribute it inside the list, and since names are not unique I might point to the wrong tool with a duplicate name. So I figured my best course of action now would be as follows: Save and clear current Tool Presets. Load the TPL. Convert the Tool Presets to brushes. Load the original Tool Presets. Convert the new Brush Presets to Tool Presets once more (with my consistent naming convention) Delete the new Brush Presets. So that's about it, my story of frustration with Photoshop Scripting/Extensions so far. More, no doubt, to come. As for the extension itself, as I'm working on it on my employer's time (though not part of my regular job description) it's up to them on how it's going to be released, but it's likely it will be free (probably as in beer, rather than as in speech). I'd appreciate any suggestions anyone might offer to solve any of my, err, challenges.
... View more