I just completed a small new feature: tool presets. I’m not sure anymore who actually asked for those, but not only do the tools now remember their settings between sessions, you can also save combinations of settings as presets and switch between them with a single click
I have 20 buttons + 2 wheels on my pen display, 10 used mostly for one hand, now I will get to change 2 shortcuts there, yay!
Cool to see this.
this might help @SPAC5R with default transform option I think
Thank you very much @raghukamath and @halla, that’s awesomeland very helpful! Great to see that a simple question asked turns into a new feature so quickly. One more reason to love Krita and open-source in general!
Nice boud! Had no idea you were working on this, I’ve been interested in something like tool presets for a while to more reliably experiment with and share smoothing / stabilizer settings, and to make it possible to have dedicated inking specific tools and settings that persist between sessions.
- What tools is this implemented for right now?
- Will tool presets also save and load the selected brush preset and related things like color and size?
- How hard would this be to expose on the Python API?
I’m interested in a python API primarily because I’d like to see tool preset shortcuts, so I can easily switch between an inking tool preset with smoothing, and an erase tool preset without smoothing.
That’s like an awesome idea actually.
It works for all tools; basically, it just introspects the the tool option widget and saves the settings in the child widgets. As an extra, because someone on twitter asked for that, it also saves/restores the brush size
But, it doesn’t save any other preset information. Color, opacity, flow and active preset seemed counter-productive to me. I’ve thought about adding erase mode as a tool setting, but that’s not in.
Hardish… The information is saved using kconfig, not QSettings, so there’s no Python class to parse and write the preset files. Opening them with QSettings and saving them with QSettings will cause corruption. If you’d want to add extra information, it’s probably easier to just do that in the actual C++ plugin. We’d need a checkbox or something to enable storing extra info, because I’m quite that not everybody is going to want that.
Finally… I’ve thought about ways to allow shortcuts. My initial idea was to have a shortcut that set focus to the docker, and then numbered shortcuts to activate items in the list, but I’m not sure about that. And anyway… Speaking for myself, I use a cintiq + expresskeys, and the expresskeys are full anyway, so I’d be clicking the items.
ETA: I’ve also thought about whether all presets for all tools should be visible at all times, but I thought that that would get crowded, and it would have complicated the code.
As for implementing the whole plugin in Python: it reacts to the KoToolManager global instance switching tools and uses the KisCanvasResourceProvider classes, and those aren’t in Python yet.
I was so fed up after finishing the tagging rewrite part of the resource rewrite that I wanted to just do a nice little feature that i could see the use of immediately… It took me all of Thursday, part of Friday and Saturday morning. Now the follow-up feature requests will probably take longer!
Thank you very much for doing all the work!! Is there anything I can do to support Krita?
Could tool presets essentially replace saved assistants for the assistant tool?
So I could have a preset for “xx° Isometric” as a tool preset and it would load preset assistants.
Similar functionality would also be very useful for the reference image tool.
For the transform tool: does presets automatically perform (but not apply) the specified transformations? That could be very handy if you create icons that need to be scaled down to specific dimensions.
Probably not, enhancements for the assistant tool wouldn’t hurt (I have dormant patches for it and lots of notes for other potential improvements) but this isn’t it. Tool Presets just saves/loads the state of the Tool Options widget
No, assistants are created by a tool, not a tool themselves, so they cannot be saved like this.
Same for reference images: we can save the 80% desaturation of the reference image tool, but not automatically apply them to existing reference images
For transform tool, again, no: the settings are loaded in the option widget, the tool isn’t applied.
Is it a separated docker or it is to appear as an area extended from the tool option? (The former sounds a bit tricky to use.)
It’s a separate docker.
Would it be possible to just attach it to the tool option? Since it’s only for the tool option settings, there seems no need for the separation. (I generally locate the tool option in tookbar so it wouldn’t take up the space)
Thanks for the work though. I needed this feature so bad.
3 posts were split to a new topic: How can I support Krita?
Can this be tested in 5.1 nightly build on Krita website? Thanks for the awesome work, halla.
No this is not in the 5.1 since it is not yet ready.
Ok. Do you know what version it is now aimed at? 5.2?