Pie Menu Editor 1.18.3

Thanks, that worked! I just wonder why Right Clicking and adding the widget straight to Pie Menu Editor did not give the display part. It only gives C.scene.light_direction

Because blender internally seems to hide that part for some reason, the panel inside space_view3d.py had the correct path but no idea why is not shown directly


Can’t remember if I ever asked this question but anyway here it is :wink:

Is it possible to display a created panel group if and only if a certain addon is installed and activated ?

Thanks for all your good work, without PME I could simply not use Blender

I’m answering myself

In the panel group condition, type :
import addon_utils; return addon_utils.check("Addon")[0]
where you should replace Addon (but keep the “”) by your addon’s name (without .py) if this is a simple addon or the folder name if the addon is contained in a folder

Hope it could help


Also, some curious buggy behavior I found was that when I hold down the shortcut for the Pie Menu with that contains my light direction widget, then rotate the widget and while rotating, let go of the Pie Menu shortcut, the shadows just break. The widget stops working and there is no light in the scene, in Solid Mode. Then I will need to reset it through python by specifying a Vector value for light_direction, or I can set another Pie Menu command for a specific light direction which also fixes this weird issue. However, I can avoid the problem by not holding down the Pie Menu hotkey, but rather tapping it and letting go before I use the widget in the Pie Menu.

1 Like

I tried to replicate this and it only happens when the popup dialog is in Pie Mode, for some reason it sets the C.scene.display.light_direction to (0,0,0) and that breaks it.

I tried to make something to set a direction if it breaks

Custom tab:

d = C.scene.display.light_direction; C.scene.display.light_direction = (1,1,1) if (d[0],d[1],d[2]) == (0,0,0) else C.scene.display.light_direction; L.prop(C.scene.display, 'light_direction', text='')

It should run every time you call the menu and if the vector is 0,0,0 its going set it to 1,1,1

1 Like

I’m trying to set up contextual pie menus, so i have one hotkey to rule them all.
All is working perfectly, Lights, Meshes, Empties.

I’d love to have a context menu if i have nothing selected tho. Previously i’ve been using:

return not C.selected_objects
but it still opens up the objects pie menu which is:
return C.active_object and C.active_object.type == 'MESH'

I’m guessing its because its using the active object?, which AFAIK you can’t deselect. anyone have some alternatives i can try?

I tried the same thing with bevel and knife tool. Works ok for knife but for bevel I los the ability to change the amount of division either by the UI or the mouse scroll wheel. Any idea?

In that case you could add more context to the mesh poll so it doesn’t conflict with the non selection menu.

return C.active_object and C.active_object.type == 'MESH' and C.active_object in C.selected_objects

Now the problem with this option is that you have to add and C.active_object in C.selected_objects to every single other type

1 Like

I think pme is executing both things too fast, so adding a ‘bumper’ translate operator seems to work for me at least. It’s hacky but it does the job…

bpy.ops.object.mode_set(mode='EDIT'); bpy.ops.transform.translate('EXEC_DEFAULT', True); bpy.ops.mesh.bevel('INVOKE_DEFAULT', True)

Oh man! You made my day! No need to switch modes before!

1 Like

How can you make a button to active a tab in n panel with pie menu? I cant find the way to add them to pie menu addon?


1 Like

That is an interesting approach. Gonna try that once i get some time.

@FidoDidoVN ; I ended up with using the “Hidden Panel Group” for now and just add the panels of the add-ons I don’t use from the N panel to that groupe, then added a button in my custom pie menu to toggle that entire groupe on and of. If you read the responses I got from kkostovas I am sure you can make it work if you want to do it the same way. Just try to add the panels in the order they apear in the N panel so when you toggle them back on they stay in the “original” order. Hope that helps.

1 Like

Yeah comes in handy, that and the debug mode.

I’ve been trying to add Tab Catagory to PME, but for some reason I can’t get it to work, I follow the LoopTools (Edit Mode) or BoolTool and others code, but PME’s code doesn’t like a certain code section that I copied from the other addon, and my current Python skills cant understand (only dove into it last week, did manage to add to others though), I manage to get this far for PME,


but it doesn’t work, have to get into the preferences.py itself and change it manually,

Basically it lets you rename a addon N-Panel’s name, so one can organize themselves, which I think should be a requirement for Blender addons to get around the too many N-Panel tabs issues to a extent or just let us simply organize things.


rant over :smiley:

HELP - How to create a modal for Solidify in Mesh Edit Mode ?

Hi, not sure what is your goal exactely ? but if it is for better access with addons, this is how I deal with addons and pme. It can not suit to everyone but that’s a trick:

1 Like

It’s just a simple N-Panel addon setting to let users change a addons Tab name…

I’m still a bit confused. What’s the purpose of “Custom”? Is it any different from “Command”?

And how can I make a button that executes Python code that isn’t one-liner? Do I have to use an external script? It’s just like 4 lines so I’d rather to put it in PME’s UI if possible.