Today, I pushed a first approach to bundling reusable scripts. (https://invent.kde.org/graphics/krita/-/commit/2d564eec6b0a3503d7671c69c10d18f8901934b9?merge_request_iid=380)
The current implementation is based on Anna Medonosová's work on gamut masks. It uses a Zip container with extension .kse and MIME type application/x-krita-seexpr-script.
There are two files inside: preview.png (that is used as the KoResource image) and script.se (a plaintext file whose contents are used as the expression to render).
UX-wise, it looks like this:
Since there's no way yet to create these bundles inside Krita, I'm opening this task to gather feedback on how this would work.
To kickstart the review, I present you this mock workflow, with some bits of the brush preset dialogs.
I'd add a name field, and detection for dirty presets. Two small buttons for saving the new preset and overwriting the original.
This one is very similar to the brush's; the thumbnail is a QImage (not a paintable area).
I'd want to add a "Render script to thumbnail" button that would render the script to a 512x512 texture, but I don't know yet how to manufacture a pseudo-paint device from said widget.
Feel free to comment!