Well, I’d be interested in that too, I only know the method via the brush editor so far.
But maybe one could find a way, because I use the tool “Krita Brush Info” by Kenneth Evans to read out preset information, and that uses “ExifTool” by Phil Harvey to read out the presets.
So I could imagine that, with help of these tools, one could find a way to locate the name string stored in the presets and then possibly change it, if one can already read out the presets settings with these tools. But this would require some research and testing to see if the integrity of the KPP’s would be preserved by such an intervention, or if you would have to completely regenerate the entire header, for example. Unfortunately, this is way beyond my script pushing abilities.
kpp files are png files, so any tool that can change the TEXT segment should work. The brush properties are XML, so parsing that is easy. I think you should be able to use the code from Brush Fixer for brushes created in Krita 5.1 beta 1 as a starting point – it loads the preset as a QImage, uses QImage::text to get the text segment, manipulates it, then sets the text back and saves the file.
Hi halla,
thanks for this suggestion! Actually, it seems to be the right path to follow.
In case I make it work, I’ll share a plugin for the people who may have my need.
I wanted to create a plugin that would partially solve this issue I just did not have time for it yet. Just to say it will come to be too I already have the name allocated on GitHub even. But I need to do my commissions first.
A while ago i did some scripts to do that. These are pure python scripts, not krita scripts or plugins. Has been a while since i last used them but you can try using it.
I preferred to follow the @halla suggestion because it’s a more Krita-friendly solution. It worked and I renamed all my brushes.
In my very personal opinion, it should be a built-in feature in Krita, but I understand that there are a lot of features and fixes with a higher priority.
EDIT:
I noticed that the renamed brushes work correctly, but in the Log Viewer this message appears (only the first time) when I select a brush:
My approach was made to be used without needing to open krita as at the time i also didn’t know how to script in krita. But i agree with you this should be in krita. I think someone made a feature request for it too