[plugin] Pie Menu v0.4

I don’t recommend using this plugin, instead use Shortcut Composer v1.4.2 - Plugin for Pie menus, Multiple key assignment, Mouse trackers and more! my life ran into issues and I haven’t had any opportunity to keep the development of this plugin up, I recommend checking out the Shortcut Composer, it’s looks cool!

Description

Pie Menu plugin allows you to set up your own custom menu for a quick access of various tools and actions in Krita to streamline the whole painting process.

Instructional Video:
This video is pretty long if you want to save some time you can go ahead and check the plugin link below with a written guide to installation, set up and how to use instead.

(download, installation, activation, shortcut set up, set up your own pie menu, add new actions, make adjustments to it too!)

Systems:
Win 10, Linux, MacOS
(User have reported fine functionality on both Linux and MacOS as well)

Link to the plugin:

LATEST UPDATES:

Version 0.4 - Update Notes

  • Fixing several major bugs
    (error: NoneType list, NoneType eventController, menu getting stucked, …)
  • Reworked gizmo
    Now part of PieMenu paint method, access to gizmo through custom actions as a mandatory argument
  • Added QTimer.singleShot(…) for all events and menu init to queue the menu at the end of the event queue
  • Added QTimer.singleShot(10, …) for ColorSelector else it breaks down with shortcuts
  • Reworked how initialization of the pieMenu works with the shortcut
  • Quitting menu now possible (2 ways):
    a/ Before pressing down mouse left button/pen → press the shortcut again
    b/ If mouse left button/pen pressed while shortcut held down → release the shortcut
  • Added init method call to custom actions
    There are now three methods for every custom action instead of having 1 general purpose init method:
    1st method called once (at the beginning): init method
    2nd method repeated calls: callback
    3rd method called once (at the end): resetCallback
  • QTimer.singleShot(…) for any action invocation (init, callback, resetCallback, krita’s default actions)
  • Simplified the EventController, it’s also more sturdy (needs a code clean up though ;))
  • Added new action category: ANIMATION
  • Added 13 new actions to Animation category
  • Added 3 new custom actions:
    Confirm Transform, Reset Transform, Reset Transform (deselect)
    (ctrl + T / Transform has been in the action list since the beginning)
    Reset transform (deselect) - resets transform (esc key) and deselects at the end
  • Added cursor to pieMenu (cursorOverride)

Version 0.3 - Update Notes

  • Added offset to where submenus appear in the cursor movement direction to make triggering the inital tool (which invoked the submenu) more reliable (especially with short quick hand movement)
  • I’ve updated the video to reflect new categories for actions and simpler installation process.
  • Top post now contains info about written instructions on the plugins website which are noted before the video itself, there’s also a note about the length of the video to make sure people know there’s a faster method to get started if needed.

Version 0.2 - Update Notes

  • MacOS confirmed working
  • Update to installation instruction and change to the directory structure of the plugin for simpler installation
  • actionsList now has categories for actions (customizable)
  • Categories are listed in the actions list for better visual clarity
  • New sections in README.md with update notes
  • Fixed isolate_active_layer action
  • Moved Select Opaque to a different category Misc - > Layer
31 Likes

You should be able to clean it up in Audacity using the noise canceling function, it’s a bit weird since you need to call it two times: first on just noise selection, and the second one on the whole track selected to clean the noise out.

Also the plugin sounds lovely!

1 Like

Thanks, I’ll check the audacity out.
Well, it’s lovely in windows not sure about other systems, hehe.

PS: While I’m on the topic, perhaps wouldn’t you know a way in python to confirm transform (basically enter key when you want to be finished with the transform tool)? :wink:

Well installation method A failed on my end.
error_install

And now I am noticing that installation method B is very VERY confusing as much as the files inside the zip.

I think I will use your video as reference to where things should go.
I took some screen shots of the video and with it I managed to know where all files were meant to be.

1 Like

Which version of Krita are you using? There has been some changes in Python Plugin Installer recently, so beta might have regressions (although hopefully it doesn’t have). If not, then it might be still useful to see why the Installer cannot install it.

@tiar I am on krita 4.4.1 with windows 10 at the moment.

But I think the reason for it to not work was just the folder paths inside the zip I downloaded being shifted.
I sent a IM to @nickgeneratorfailed talking about it but if it is my version of the Python Plugin Installer never mind me then…

@EyeOdin @tiar

I’ll see to it. I wanted to make the installation a bit simpler, I had just troubles with import python plugin script which wasn’t loading things properly so I eventually copied someone elses plugin’s structure and hacked it together to at least make it work.

I’ll simplify the structure now when the plugin itself is finall at a (at least for windows ;)) stable state.

Usually the structure is like this:

plugin.desktop
plugin/

file.py
file2.py
README.md

(all other files)

But since you have an action file, too, I wonder where it should go - I have at least two suggestion, one is to copy the structure from Three Slots plugin: GitHub - DarkDefender/threeslots: A script for Krita that lets you quickly switch between three brush slots (fairly easy, you have two folders, pykrita and actions, then inside pykrita there is a .desktop file and a folder and all other files inside the folder), or just put the action file like in the structure above, next to the .desktop file. It might need testing which structure is better. (Note that to test it, one should use 4.4.2-beta version).

2 Likes

@tiar @EyeOdin

Yeah, that was what I was doing just now. I think I just lacked sleep that it didn’t occur to me straight away.

For now I’ve changed the structure a bit, now there are directories actions and pykrita for manual install and the install guide got shorter too (you just need to copy the directories to the resource folder, that’s all). Hopefully this will make it less stressful for anyone ;0

I’ll adjust the zip file for the import, I copied a structure of a different plugin (for 4.4.1) because the actions file and desktop file where wierd (actually I don’t think actions file ever got copied anywhere no matter where I placed it so I eventually left it inside the plugin’s folder since krita loads it there too - and with higher priority than action files in actions directory ;-)).

I’ll check the new release too, but I’ll do the final update either in a separate fork or after the 4.4.2 gets released as stable. Right now I kind of don’t want to work with it, simply because things change and I don’t want to put in the work in vain ;0.

@tiar btw you wouldn’t perhaps know if python can confirm transformations (ctrl+t - transform, enter - confirm) in krita? I know I keep asking so sorry, I’d just really like to add that kind of action.

EDIT:
Interesting, I just managed to delete everything in pykrita directory and actions directory itself thorugh “python import plugin” script… hmm heh, well manual install is ok but the scripter can do some really dangerous things…

As expected, your plugin works on macOS as well. Generally Python should be platform agnostic,
Krita 4.1.1, macOS 10.14.6

There’s another package inside your package. Is it a different and improved version of your plugin or the same code, but put there but mistake?
(I installed manually)

1 Like

action files go into krita/actions .

1 Like

Python is agnostic but pyqt not xD That’s why I wasn’t sure what it’s going to do.

Thank you so very much for letting me know! If I could I’d hug you but here’s a :heart_eyes: at least.

The file inside is there just for import plugin script, the code is the same, I’m currently readjusting the structure to make it less confusing hopefully.

1 Like

I have to say, no matter where I put the actions file it always gets imported into my plugins directory inside pykrita instead of actions directory in krita/actions.

Maybe the structe has to be different for the zip file please?

I don’t know python but moving files should belong the most essential commands of any code language

I suggest to install as usual and move the action file immediately afterwards to conclude the installation.

Thanks a lot for your plugin :blush:

1 Like

Actually I’m using the krita’s plugin importer so I can’t change the code there ;0

I probably just don’t know what’s the exact structure but I’ll make a small changes to the whole structure to make it cleaner and make a new video to replace the old one - where I’m going to mention you and the mac os ;0

This thread has gone to far without saying how cool this addon really is. Because it is! :partying_face:

Regarding python plug-in manager I also had some issues when i added an extension to the last version of pigmento. I did what 3 brushes did as @tiar suggested and have a actions and a pykrita folder because I was not really sure what to do considering it. But since it was loading the docker correctly I was not too worried but I thought that I was more of a corner case since I wanted actions on a docker more than a parallel extension that sadly was left out the load. That was the reasoning for me to write a mini guide to install it too.

I think having the zip file with actions and pykrita inside to be good even in the perspective of manual instala as any user can then see where things should go from a top down view and go from there.

However I just feel that a plug-in should have all it’s files inside a single folder within pykrita, like the action file and the desktop file should all be inside the same folder alongside the main .py file. That or have its own internal mini structure inside. It would make python plug-in importer work better as it would not have to guess and it would help handling files while creating the plugins and connecting them to a github repository and for end users to make manual instals when needed, that would only need to copy paste a folder into pykrita.

1 Like

You can, there is a code for this plugin in Krita’s code on plugins/python/plugin_importer · master · Graphics / Krita · GitLab, you can just copy it, fix and either make a MR or ask someone to make one for you if you don’t want to clone the git repository and whatnot. If the action files are in fact imported in a wrong place, that’s something that needs to be fixed…

The plugin importer looks as if it was expecting more than one plugin to be there and that’s why it’s just sooo annoyingly assumptions-happy. When the practice says that there is always just one plugin in the zip file, but with 100 different configuration of files inside it possible :stuck_out_tongue:

2 Likes

Update to version 0.2 - Notes

  • MacOS confirmed working
  • Update to installation instruction and change to the directory structure of the plugin for simpler installation
  • actionsList now has categories for actions (customizable)
  • Categories are listed in the actions list for better visual clarity
  • New sections in README.md with update notes

Instructions to new categories:

In the ActionsList.py the property actionsList (in the video that’s where you can add new actions), all actions have a new property called category (in the video I show you how to set up name propert and actionID property so now you need to set one more)

An example of a line from actionsList to show how the category looks like now:

{"name": "Isolate Layer", "actionID": "isolate_active_layer", "category": "Layer", "callback": None, "resetCallback": None},

The categories are not hard-coded so you can type in anything you want (as long as it’s in-between double-quotes), these categories are later loaded when you open the settings menu and the actions are then sorted into its categories, sorted alphabetically (the categories are also sorted alphabetically) and displayed in a list divided by category
(Image below shows this a lot better than my convoluted description above ;-))

Next plans:

  • More actions
  • Creating a decent default menu (any suggestions) instead of the current one
  • Perhaps, just maybe adjusting installation again to make it even more straightforward
  • Creating a new instructional video
  • Creating a short showcase video (just seconds/a minute to show the features without talking)

@EyeOdin
Thanks a lot ;-).
I’ve updated the structure to reflect the actions/pykrita folder and updated the install guide. I’ll make a new video but probably not today.

@tiar
Hm, I’ll check the script, maybe I’m doing it wrong. I was kinda hoping to have a free rest of the day blaming the problem on someone else. Hehe, well thanks a lot now I have to check… xDD
EDIT:
Thanks for the info, I’m updating the plugin right now, the import now works fine.
(I thought it loads the action files and just pushes them to the actions directory but I had to make changes to desktop file, action name and the action file for the importer to locate it properly).

A few hours until a video is up there again, so if someone gets here, pls use the written instructions for now until the video is finished in a few hours.

¡What a interesting plugin, congrats!!!

1 Like