Request: Extend Python API for the tag switching functionality.

The functionality to switch between tags is already present via the quick palette. Is it possible to extend the python api with this functionality in someway such that Nick (creator of pie menu) can find a way to add tag toggling to his pie menu?

I would like to be able to open the pie menu with one click and hover over the button to toggle the brush tag. you could specify which brush tags in the pie menu GUI.

1 Like

Hi!

Why don’t you ask @nickgeneratorfailed yourself and directly to add this function to his plugin? For that you would have to either ask him in his topic you linked, or send him a message, whether here in the forum or via GitHub, that would be up to you.

Why does it have to be this plugin to do this? A function that, as you have formulated it here, doesn’t make much sense in my eyes. I don’t see any meaningful use in being able to switch between two “Brush Tags” via plugin and suspect you mean something else, since “Brush Tags” are used to assign brushes to freely selectable criteria. It is a form of tagging that is often used to group/sort different brush presets, assign them to groups or categories such as airbrush, ink, chalk, oil, or even “My Favorites”. You do NOT switch between different brushes (Brush Presets) by changing a Tag!

I’m guessing: you’re probably looking for something else, probably a way to switch between different brushes, and probably in “canvas only mode”? If so, why don’t you use the right-click menu of your mouse or stylus? And there are other ways to switch “Brush Presets” in “Canvas Only Mode”.

And if I guessed wrong, could you please explain your request in detail. Why do you want the plugin “Pie Menu” (of which there is even already a version 0.5, as you could read in the course of the topic you linked (you just have to read almost the whole topic :wink: for it)) to be able to switch between “Brush Tags”?

Michelist

PS: And if you have problems with the English language, you could correct and improve your postings, as I sometimes do with long texts or when I am lazy, with the help of DeepL.com, or even have them translated completely. If DeepL doesn’t support your language you could also use Bing Translate or Google Translate (all three services are free). However, the best translations are usually provided by DeepL (during business hours in Europe, the quality of DeepL varies due to their server load, unless you use their paid service, which is always top), but I check every text to be sure.

I already messaged Nick. He suggested I make a request since he does not think it is possible (having looked at the documentation).
I mean it does not have to be via plugin, assigning a key to toggle tags could work too.

The workflow I would like to try would consist of assigning say 5 hotkeys to the first 5 brush slots of any active tag. Toggling what tag is shown would also toggle the 5 key bindings.

I think I understand now. This is an “ambitious” feature request, and, quite honestly, I don’t think this is easy to implement in the form of a Python plugin, to say the least. I’m not saying it’s impossible (almost nothing is impossible), but I think it’s very, very, extremely elaborate! (The effort seems very high to me, okay, I am not a programmer, I can “nudge” scripts back and forth, a few Python plugins and Windows programs I have also customized a bit for myself, but never programmed one complete Software myself, at least not since the mid-90s.)

What does it take?
Have you ever thought about it, made a flowchart, or a functional plan? A lot of things have to happen - have to be defined - to make such a function possible at all. Things like determining the desired tag groups in form of a user input (simple), then these desired tag groups have to be found by the plugin (probably in the SQL resource database), if there are more than 5 presets the plugin has to know which 5 you consider as the first ones (so create only tag groups with 5 presets if possible!), put the found tag groups on the two plugin buttons of Pie Menu, assign keyboard shortcuts and so on. This is a complex story in which one problem follows the next.
Should it be a standalone plugin or an extension of the Pie Menu plugin? I would plead for standalone, then it could possibly be mapped to other plugins. et cetera…

Michelist

By the way, to select two times five brush presets, the “Ten Brushes” plugin would be enough :wink:

Michelist

Yeah, it’s ok the OP asked me if I could extend th plugin with this functionality and I told him that I checked the krita python docs and I don’t think it’s currently possible or at least I don’t know how or where to look.

That’s why I told him that this might be better as a proposal to extend the python api (unless it’s already hidden somewhere in there) :slight_smile:
That’s why the feature request is a thing here luckily ;).

@Michelist well the ability to switch the tags is already in krita, particular case for canvas section is the quick palette which has a button to switch tags, so I assume more or less the function wise it’s already in (you can of course switch them through the brush menu as well of course).
The question is how far is this for python api, is it even worth for anyone to pick the subject up? I don’t know.

@tachiko as above mentioned feature requests also have a rules for this seciton I believe. Anyway, this should be a feature request about extending the python api with this functionality rather than a particular plugin, so please edit your original post to make it clear, this way it will be easier to understand for anyone stopping by (don’t forget to change the title too if you can).
Then try to figure out how it could work, in this case you could highlight that function wise Krita already has this (as I mentioned in this post) and that you would like to kindly propose if it would be possible to extend the python api with it in some way (I’m not sure what classes and such woudl this be best suited for so I’ll leave it open), oki?

Have a nice day.

2 Likes