# \[plugin\] Pie Menu v0.4

**URL:** <https://krita-artists.org/t/plugin-pie-menu-v0-4/15888>\
**Category:** Plugins and Scripts\
**Created:** [December 21, 2020, 7:02pm UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888 "2020-12-21T19:02:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickgeneratorfailed](https://krita-artists.org/user_avatar/krita-artists.org/nickgeneratorfailed/32/66225_2.png) [@nickgeneratorfailed](https://krita-artists.org/u/nickgeneratorfailed)\
**Post date:** [December 21, 2020, 7:02pm UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/1 "2020-12-21T19:02:25Z")

</div>

**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!](https://krita-artists.org/t/shortcut-composer-v1-4-2-plugin-for-pie-menus-multiple-key-assignment-mouse-trackers-and-more/55314) 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.

 ![piemenu2](https://krita-artists.org/uploads/default/original/3X/4/4/4496816163b44800f0ca9259acad65ff713aa95e.jpeg) ![piemenusettings](https://krita-artists.org/uploads/default/original/3X/2/8/2887f8ab7a25e025217c318f2fbd2d7cb02e699f.jpeg)

**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.

[![](https://krita-artists.org/uploads/default/original/3X/a/0/a0e1a8cf1987e6d9e72092ca976bb25abb84ec57.jpeg "[Krita] Pie Menu Plugin") ](https://www.youtube.com/watch?v=H167Gp_y-QQ)

_(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:**

> **[GitHub - viksl/kritapluginpiemenu: Pie Menu Plugin For Krita (free)](https://github.com/viksl/kritapluginpiemenu)**
>
> Pie Menu Plugin For Krita (free). Contribute to viksl/kritapluginpiemenu development by creating an account on GitHub.

_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

---

<div class="post-metadata">

**Author:** ![tiar](https://krita-artists.org/user_avatar/krita-artists.org/tiar/32/22_2.png) [@tiar](https://krita-artists.org/u/tiar)\
**Post date:** [December 21, 2020, 9:34pm UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/2 "2020-12-21T21:34:16Z")

</div>

> [@nickgeneratorfailed](#):
>
> Sorry for the constant strange sound throughout the hwole video I didn’t realize the mic could catch it

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!

---

<div class="post-metadata">

**Author:** ![nickgeneratorfailed](https://krita-artists.org/user_avatar/krita-artists.org/nickgeneratorfailed/32/66225_2.png) [@nickgeneratorfailed](https://krita-artists.org/u/nickgeneratorfailed)\
**Post date:** [December 21, 2020, 10:26pm UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/3 "2020-12-21T22:26:35Z")

</div>

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)? 😉

---

<div class="post-metadata">

**Author:** ![EyeOdin](https://krita-artists.org/user_avatar/krita-artists.org/eyeodin/32/2662_2.png) [@EyeOdin](https://krita-artists.org/u/EyeOdin)\
**Post date:** [December 22, 2020, 1:43am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/4 "2020-12-22T01:43:56Z")

</div>

Well installation method A failed on my end.  
 ![error_install](https://krita-artists.org/uploads/default/original/3X/8/a/8a4cf14834d80bab98d881a67cb5a6068cfa2c04.png)

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.

---

<div class="post-metadata">

**Author:** ![tiar](https://krita-artists.org/user_avatar/krita-artists.org/tiar/32/22_2.png) [@tiar](https://krita-artists.org/u/tiar)\
**Post date:** [December 22, 2020, 3:28am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/5 "2020-12-22T03:28:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![EyeOdin](https://krita-artists.org/user_avatar/krita-artists.org/eyeodin/32/2662_2.png) [@EyeOdin](https://krita-artists.org/u/EyeOdin)\
**Post date:** [December 22, 2020, 3:37am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/6 "2020-12-22T03:37:26Z")

</div>

@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…

---

<div class="post-metadata">

**Author:** ![nickgeneratorfailed](https://krita-artists.org/user_avatar/krita-artists.org/nickgeneratorfailed/32/66225_2.png) [@nickgeneratorfailed](https://krita-artists.org/u/nickgeneratorfailed)\
**Post date:** [December 22, 2020, 9:33am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/7 "2020-12-22T09:33:29Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![tiar](https://krita-artists.org/user_avatar/krita-artists.org/tiar/32/22_2.png) [@tiar](https://krita-artists.org/u/tiar)\
**Post date:** [December 22, 2020, 9:55am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/8 "2020-12-22T09:55:22Z")

</div>

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](https://github.com/DarkDefender/threeslots) (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).

---

<div class="post-metadata">

**Author:** ![nickgeneratorfailed](https://krita-artists.org/user_avatar/krita-artists.org/nickgeneratorfailed/32/66225_2.png) [@nickgeneratorfailed](https://krita-artists.org/u/nickgeneratorfailed)\
**Post date:** [December 22, 2020, 10:03am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/9 "2020-12-22T10:03:56Z")

</div>

@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…

---

<div class="post-metadata">

**Author:** ![Venn](https://krita-artists.org/user_avatar/krita-artists.org/venn/32/13468_2.png) [@Venn](https://krita-artists.org/u/Venn)\
**Post date:** [December 22, 2020, 10:26am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/10 "2020-12-22T10:26:01Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![halla](https://krita-artists.org/user_avatar/krita-artists.org/halla/32/18581_2.png) [@halla](https://krita-artists.org/u/halla)\
**Post date:** [December 22, 2020, 10:29am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/11 "2020-12-22T10:29:23Z")

</div>

> [@tiar](#):
>
> But since you have an action file, too, I wonder where it should go

action files go into krita/actions .

---

<div class="post-metadata">

**Author:** ![nickgeneratorfailed](https://krita-artists.org/user_avatar/krita-artists.org/nickgeneratorfailed/32/66225_2.png) [@nickgeneratorfailed](https://krita-artists.org/u/nickgeneratorfailed)\
**Post date:** [December 22, 2020, 10:31am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/12 "2020-12-22T10:31:39Z")

</div>

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 😍 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.

---

<div class="post-metadata">

**Author:** ![nickgeneratorfailed](https://krita-artists.org/user_avatar/krita-artists.org/nickgeneratorfailed/32/66225_2.png) [@nickgeneratorfailed](https://krita-artists.org/u/nickgeneratorfailed)\
**Post date:** [December 22, 2020, 10:37am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/13 "2020-12-22T10:37:08Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Venn](https://krita-artists.org/user_avatar/krita-artists.org/venn/32/13468_2.png) [@Venn](https://krita-artists.org/u/Venn)\
**Post date:** [December 22, 2020, 10:52am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/14 "2020-12-22T10:52:26Z")

</div>

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 😊

---

<div class="post-metadata">

**Author:** ![nickgeneratorfailed](https://krita-artists.org/user_avatar/krita-artists.org/nickgeneratorfailed/32/66225_2.png) [@nickgeneratorfailed](https://krita-artists.org/u/nickgeneratorfailed)\
**Post date:** [December 22, 2020, 10:58am UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/15 "2020-12-22T10:58:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![EyeOdin](https://krita-artists.org/user_avatar/krita-artists.org/eyeodin/32/2662_2.png) [@EyeOdin](https://krita-artists.org/u/EyeOdin)\
**Post date:** [December 22, 2020, 12:46pm UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/16 "2020-12-22T12:46:14Z")

</div>

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

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.

---

<div class="post-metadata">

**Author:** ![tiar](https://krita-artists.org/user_avatar/krita-artists.org/tiar/32/22_2.png) [@tiar](https://krita-artists.org/u/tiar)\
**Post date:** [December 22, 2020, 1:25pm UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/17 "2020-12-22T13:25:49Z")

</div>

> [@nickgeneratorfailed](#):
>
> Actually I’m using the krita’s plugin importer so I can’t change the code there ;0

You can, there is a code for this plugin in Krita’s code on [plugins/python/plugin\_importer · master · Graphics / Krita · GitLab](https://invent.kde.org/graphics/krita/-/tree/master/plugins/python/plugin_importer), 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 😛

---

<div class="post-metadata">

**Author:** ![nickgeneratorfailed](https://krita-artists.org/user_avatar/krita-artists.org/nickgeneratorfailed/32/66225_2.png) [@nickgeneratorfailed](https://krita-artists.org/u/nickgeneratorfailed)\
**Post date:** [December 22, 2020, 2:24pm UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/18 "2020-12-22T14:24:52Z")

</div>

**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:

```auto
{"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 ;-))

 ![pie-menu-categories](https://krita-artists.org/uploads/default/original/3X/3/c/3c279b0b8909930b4c96c292ef9607f87e7247fb.jpeg)

**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)

---

<div class="post-metadata">

**Author:** ![nickgeneratorfailed](https://krita-artists.org/user_avatar/krita-artists.org/nickgeneratorfailed/32/66225_2.png) [@nickgeneratorfailed](https://krita-artists.org/u/nickgeneratorfailed)\
**Post date:** [December 22, 2020, 2:30pm UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/19 "2020-12-22T14:30:49Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Labi](https://krita-artists.org/user_avatar/krita-artists.org/labi/32/432_2.png) [@Labi](https://krita-artists.org/u/Labi)\
**Post date:** [December 22, 2020, 3:19pm UTC](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888/20 "2020-12-22T15:19:26Z")

</div>

¡What a interesting plugin, congrats!!!

[Next page](https://krita-artists.org/t/plugin-pie-menu-v0-4/15888.md?page=2)
