Pie Menu Editor 1.18.7

No new row size in this update. Sorry.
Blender has some issues in displaying pie menus with big buttons.

Thanks for the update and the code!

I just bought it and this addon is really amazing, great work !
There is something that always have bothers me about pie menus, the fact that the mouse don’t rest the position after doing something in the pie menu… for example if I call one pie menu and I press a button “A” in the left my mouse stay there and if i repeat the action i move more and more to the left… There is a way to reset the position of the mouse after using some actions in the pie menu?

Interesting idea. And looks like it’s possible in Blender.
I’ll try to implement that in the next version.

Thanks roaoao, don´t worry about the size, they are ok, It was just a little whim.

I am trying to use just certain parts of Wazou´s PMs via scripts but I don´t get it… I use, this one for example for putting the center of an object in a selected part of one mesh, anyone can help me??:

import bpy, os
from bpy.types import Menu, Header
from bpy.props import IntProperty, FloatProperty, BoolProperty
import bmesh
from mathutils import *
import math
import rna_keymap_ui

######################

Cursor/Origin

######################

#Pivot to selection
class PivotToSelection(bpy.types.Operator):
bl_idname = “object.pivot2selection”
bl_label = “Pivot To Selection”
bl_options = {‘REGISTER’, ‘UNDO’}

def execute(self, context):  
    saved_location = bpy.context.scene.cursor_location.copy()
    bpy.ops.view3d.snap_cursor_to_selected()
    bpy.ops.object.mode_set(mode = 'OBJECT')
    bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
    bpy.context.scene.cursor_location = saved_location 
    return {'FINISHED'}

In this case you just need to copy the code from execute function (without return line).


saved_location = bpy.context.scene.cursor_location.copy()
bpy.ops.view3d.snap_cursor_to_selected()
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
bpy.context.scene.cursor_location = saved_location

Save this script as *.py file and you will be able to use it as an external script in Command tab.

Thanks again roaoao!! Works nice!! I will try to implement the few options Wazou´s had and I am interested in!! Thanks!!!

Sorry for bothering you but how I know nothing about coding… XDDD, now I am trying the split area option, this one, but I get nothing…:

Split area horizontal

class SplitHorizontal(bpy.types.Operator):
bl_idname = “split.horizontal”
bl_label = “split horizontal”
bl_options = {‘REGISTER’, ‘UNDO’}

def execute(self, context):
    layout = self.layout

    bpy.ops.screen.area_split(direction='HORIZONTAL')
    return {'FINISHED'}

in this case you don’t need external script. Just use this code in Commmand tab:

bpy.ops.screen.area_split('EXEC_DEFAULT', direction='HORIZONTAL')

Yes it can be hard to extract the code if you don’t know python.
I can help you with that for a couple of bucks. PM me what commands you want to extract.

Thanks, sure I will share with you a list of what I want, easy, they are just 5 or 6 options I think…

How could I add a context sensitive when nothing is selected? Currently when I have nothing selected the menu of the last active object appears. I need a menu to appear when nothing is selected. I am trying to make this change but I am noob whith python.

Import examples_context_sensitive.json file, select “Object Context Sensitive Menu” and replace it’s command with this (Command tab):


name = C.selected_objects and C.active_object and C.active_object.type.title() or "Object (None)"; open_menu(name) or open_menu("Object")

Now “Object Context Sensitive Menu” will open “Object (None)” menu if there is no selected object in your scene.

hey man . i have tried it ,

displaying last stack key command not working for me , do i have to turn on anything ?

I turn on dispay stack key command button from setting , anything else?

It should work only for Stack Keys with 2+ commands.
Don’t forget to restart Blender after update.

ok got it . but it should have to work with one command also … what say ? … and is it possible to give option besides every menu( pie and stack and regular) command line , when pressed , user can write what text to display on screen

I think it will distract users.
You know what action will be next. Because there is only one action.

Yes, it’s possible. You can use this code in Command tab:


O.pme.overlay(text="Hello World")

But if you want to use it with some other action, for example scale object:


bpy.ops.transform.resize()

you have to modify it’s code (add ‘INVOKE_DEFAULT’, True):


O.pme.overlay(text="Hello World"); bpy.ops.transform.resize('INVOKE_DEFAULT', True)

Hi roaoao, I’m not sure if there’s you’ve already answered this question here before, but how do I execute multiple lines of code, like a macro, with a pie menu item?

Hi roaoao,
I bought your great script, and have a couple of questions but I’ll will start with…

-Is it posssible to have a persistant “always on” menu panel either as a floating panel or fixed? I’m trying to make a set of menu pies that are for sculpting on my keyboardless Surface pro tablet, so I can have common functions and brushes always on display.

-Is there a way to have a pie be called from 2 keys- ie either “right click” or “Q” ? Right now I duplicate the pies with different keys ascociated.

-Is there a way to have toggle buttons in the regular menu?

You can save the code as *.py file (e.g. in pie_menu_editor/scripts folder). And use it as an

in Command or Custom tab.
The code in Command tab will be executed when the user presses the button.
The code in Custom tab is used to draw custom layouts/buttons.

I don’t understand this. Please post some screenshots.

Yes, you can add a Stack Key with a single command, assign a hotkey to it and use this code in Command tab:


open_menu("The Name of your Pie Menu")

Do you mean checkboxes? In

video the menu has “Manipulator” checkbox.

Hi roaoao,
A screenshot wont explain as its in the action. I simply mean that when I trigger a menu with assigned key menu stays on screen even after pressing desired function. Eg. I trigger the menu, select clay brush, but menu is still there, after using the clay brush I can click on the smooth brush. Basically like a floating toolbar. Panel could be triggered on/off with assigned key (even better would be to have a Close button - like in attached mockup). Maybe its pushing the scope of the pie menu system?..

Another question, is it possible to make the backing panel transparent so or even color tint the buttons like in mockup?

I’ll look into the stack key and yes the checkbox toggle will be great, thanks for those pointers.