Pie Menus (official) Customization

Now that we have the Pie Menus in, anyone know how to customize them?
An example on how to make something like LiquidApe’s view3d.brush_control menu would be much appreciated.
Specifically how to get toggle buttons and sliders in.

http://edge-loop.com/images/blender/LiquidApe's%20view3d.brush_control%20menu.jpg

Thanks.

1 Like

First bits of info

where is this pie menu in first post ?
any link for it ?

would like to see how to stack 2 levels of pie menu too

happy bl

hope we can see more options added soon

he had something very interesting with many options

happy bl

Yes that LiquidApe pie was absolutely something new and interesting. The addon one just moves a menu from the header to under the mouse, most of the menus can be invoked anyway from the mouse location, just not in pie form… Hopefully it will become something more like the “original”.

You gotta be able to drop in custom sliders and toggle buttons. Basically be able to replicate LiquidApe’s addon to the letter.

If you follow the link in my 2nd post, sebastian_k gives some examples how to create custom menus. The info unfortunately is not detailed enough for me to actually be able to make it. I don’t know where is the file he is refering to.

I saw that example but still wondering how to add a second pie menu level
may be like in the add mesh menu!

happy bl

My first pie menu modification. It was made to the default template example.


# Template file added to by JTa, based on Templates>Python>UI Pie Menu
#   the additions show how to keybind the new menu from an addon/script
#   added code to keybind shift-q to bring up select mode

import bpy
from bpy.types import Menu

# spawn an edit mode selection pie (run while object is in edit mode to get a valid output)

class VIEW3D_PIE_select_mode(Menu):
    # label is displayed at the center of the pie menu.
    bl_label = "Select Mode"

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

        pie = layout.menu_pie()
        # operator_enum will just spread all available options
        # for the type enum of the operator on the pie
        pie.operator_enum("mesh.select_mode", "type")

addon_keymaps = []


def register():
    bpy.utils.register_class(VIEW3D_PIE_select_mode)

    # area below was based on code from the scripts\addons\ui_pie_menus_official.py file
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='Object Non-modal')
    
    kmi = km.keymap_items.new('wm.call_menu_pie', 'Q', 'PRESS', shift=True)
    kmi.properties.name = 'VIEW3D_PIE_select_mode'        

    addon_keymaps.append(km)
    

def unregister():
    bpy.utils.unregister_class(VIEW3D_PIE_select_mode)

    wm = bpy.context.window_manager
    for km in addon_keymaps:
        for kmi in km.keymap_items:
            km.keymap_items.remove(kmi)

        wm.keyconfigs.addon.keymaps.remove(km)

    # clear the list
    del addon_keymaps[:]
    

if __name__ == "__main__":
    register()


NOTE: this is for the included pie menu functionality added by Psy-fi, not for Liquidape’s addon.

Can’t be done yet - but I won’t rest until it can be!

If you need a bit of help to bake your own pies:

1 Like

@JAt
do you have a version working in latest build !
looks pretty interesting

@ Sebastian
is there like a limit on the number for menu items around ?
I see 8 but guess it is programmable what is min and max ?

would like to see a 2 level pie menu
will do some testing today on this and see what I can come up !

can pie menu be started with swap from right/ side of 3D viewport may be
without using Q key ?
or not possible yet in blender

happy bl

I was looking at the official py files
and I cannot find where the button for material texture ect are defined as pie operators
got 2 files now
ui_pie_menus_official2.py
ui_pie_menu2.py

there must be another py file somewhere for these
any idea what the file name is ?

thanks

Here is my custom brush palette menu I’m working on.

That looks really nice, guitargeek. I like that you can pick which brushes are in it. It solves the problem of custom brushes not having hotkey access.

What I would like from Pie menus is

  1. forget about keybindings
  2. have all available options for a given situation just under the mouse cursor

so, if for instance you are in edit mode with a selection, doing RMB click over selection you get, in a step or two, all the option that are currently in the W menu and those in the Ctrl+(V / E / F) menus.
Clicking in empty space you can get options for change view, or change mode, or type of editing mode.

Would it be possible?

paolo

anyone knows where I can find list of name for keys for keymap

ex:

kmi = km.keymap_items.new(‘wm.call_menu_pie’, ‘PERIOD’, ‘PRESS’)

here dot = ‘PERIOD’ and ‘PRESS’

and which command should be use to set the origin to geometry and origin to 3D cursor

thanks

I’m having issues to open a pie menu with a key when you hold it and close it when you release the key. Is it even possible?

Thanks

Edit: I removed part of my question as I found this wasn’t a real issue.

First of all, a BIG thanks to everyone who is or were working on Pie Menus!

I wish I knew Python to make and share my own PMs but I know NOTHING about programming and coding, NOTHING, I´m Architect, well some kind of, Arquitecto Técnico in Spain so I do my best in 3d modelling and even in that point I´m not good… XDDD.

But just with the purpose of helping I want to share a proposal of PMs about what I think it could be useful.

PD: I know right now just 8 positions are avaliable in the oficial PM but maybe soon we can get more options like, for example, LiquidApe´s Proportional Edition PM.


I like these!
Also, i think it’s a great way to contribute to pie menus, even without actual code.
Good suggestions!
:slight_smile:

Just for fun, I implemented a two of them. It’s really just copy/paste!