I am very bad at programming and I always try to avoid this topic. Fortunately, everything I need is already in the program itself or a plugin has already been written for it. But there is one question that has been bothering me for a long time. Is it possible to write a script to switch between tags using a shortcut?
10 brushes are not enough for me and it is a uncomfortable to switch brush tags from the drop down menu. Maybe there is a way to do something like “ten tags”?
If it’s theoretically possible, I would try to do something like that.
How it should work in my mind:
Let’s say you have the brush presets panel open with the tag “basic brushes”
You need tools from the “effects and texturing” tag
Instead of doing 4 actions, you just press the shortcut and switch to this tag. (It would also be useful if, the last used brush from this tag was automatically selected.
I know there is a plugin that brings up a circular menu with a choice of brushes for a specific tag, but that’s not quite what I need.
I would prefer the standard pop-up menu in Krita with the ability to choose a color and basic brush settings
I floated pretty much the same idea in the dedicated eraser tool feature suggestion thread a few years back (because this solution could give a dedicated eraser hotkey for anything tagged as such, while also benefiting all users), but I think it went largely unnoticed.
I’m also swapping my tenbrushes in and out frequently and definitely think this would be useful!
However, since tenbrushes itself is only a script, idk what can be done and I’m unable to code anything myself
unrelated to tags but i see you mentioned switching tenbrushes in and out frequently. maybe my ten brush slots plugin can help you with swapping different brush kits.
This is really similar to what I would like, but not quite. I am interested in quickly switching the brush palette by tags.
But thanks for the plugin anyway!
from krita import *
qdock = next((w for w in Krita.instance().dockers() if w.objectName() == 'PresetDocker'), None)
pobj = qdock.findChild(QWidget,'wdgPresetChooser')
wobj = pobj.findChild(QComboBox)
index = 3
wobj.setCurrentIndex(index)
name = wobj.currentText()
print(f'changed to {name} which is index {3}')
You might get an output like this.
>>> changed to Digital which is index 3
Most of this code is generated by the developer tools plugin. I looked up the QComboBox in the docs (might be confusing/difficult to read sorry) and looked for the relevant functions that “set” things on the widget. Fortunately there was one, and when you set the index it updates automatically
That might be the easy part, where/what do you imagine your controls would look like? 3 big buttons with icons indicating the tag, or just 3 buttons with text inside it? You also have the choice to make this into 3 actions which can be triggered using key shortcuts. Could also have a single action that cycles through some preset values.