Pie Menu Editor 1.18.7

Thank you, its working now!

1 Like

Ah, shame I have to add a keymap (makes it harder to share my menus!), but thanks for the suggestion, Iā€™ll try this out right away!

Think I found a workaround.

I was trying to get different types of mask with the same keymap using shift,alt,ctrl (add/substract/smooth) and it seems adding the draw operator at the end does the trick

so:

Create Sticky Key

On press, add the mask brush from the menu

Save and Restore Previous Value

You should get this

image

After adding the draw operator:

value = paint_settings(C).brush; paint_settings(C).brush = D.brushes["Mask"]; bpy.ops.sculpt.brush_stroke('INVOKE_DEFAULT')

Now you can call the mask brush with alt and left mouse

image


Extra Options

If you want to customize different brush settings you can add them before the operator by taking them from the info panel in scripting

image

For example I want to smooth the mask at .5 strength

I will have to add
bpy.data.brushes[ā€œMaskā€].mask_tool = ā€˜SMOOTHā€™
bpy.data.brushes[ā€œMaskā€].strength = 0.5

and would look like this

value = paint_settings(C).brush; paint_settings(C).brush = D.brushes["Mask"]; bpy.data.brushes["Mask"].mask_tool = 'SMOOTH'; bpy.data.brushes["Mask"].strength = 0.5; bpy.ops.sculpt.brush_stroke('INVOKE_DEFAULT')

The only ā€œbutā€ from adding those it that it leaves the brush with those settings so every time I use the shortcut its going to change the brush to smooth and 0.5 strength

1 Like

Iā€™ll try this out and get back to you, but it sounds perfect. Thanks so much!

Edit: works like a charm!
Now to figure out if itā€™s possible to tell if the cursorā€™s over a mesh or over empty viewportā€¦ Do you know of any way?

Iā€™m guessing you would need a scrip that feeds information from the raycast but thatā€™s out of my league, I just know the very basics.

In my case I just replaced the selection shortcuts with masking shortcuts in sculpt mode (lasso and box)

1 Like

Iā€™m having issues with GP contexts overriding eachother. @Motiomancer: pinging you, because you seem like you understand PME to a much higher degree than I do!

So, whatā€™s the issue Iā€™m trying to solve:
Iā€™m creating my own Tab menus to switch modes. Iā€™ve succesfully set this up for other modes, but with Grease Pencil Iā€™m having a lot of trouble.

First off: adding my menu on ā€˜Clickdragā€™ overrides the default Tab behaviour
afbeelding

so: I added a Stack Key to toggle to Draw from Object mode,
afbeelding

and to Object Mode from all others.
afbeelding

Problem being, this works for everything except Draw Mode
Iā€™ve tried a whole bunch of different configurations, and just canā€™t arrive t a working solution that doesnā€™t somehow ruin something else (like overwriting the menus I have for meshesā€¦)

Edit: another example of what Iā€™ve tried:

So, this works to go from all Edit Modes to Object with a press of TAB:
afbeelding

Except, when I now enable this to get TAB to go to Draw from Object Modeā€¦
afbeelding
It doesnā€™t work!
Theyā€™re getting in eachothers ways I guess, but I donā€™t know what to do.

1 Like

Hi there, does interactive panel work for anybody with blender 2.93? When i click ā€œinteractive panelā€ in addon settings nothing happens. I also donā€™t find this in command with ā€œmenu serachā€

1 Like

This is probably because of the Python changes in 2.93. Havenā€™t yet tried running PME in it myself, but lots of addons are affected!

Yeah, for once IĀ“m not jumping on the nightlies, sticking on stable release. ItĀ“ll be at least a month before we see large addon support for 2.93.

1 Like

You could try giving a more specific context to the menus

instead of asking for a gpencil object

return C.active_object and C.active_object.type == 'GPENCIL'

gpencil object and in object mode

return C.active_object and C.active_object.type == 'GPENCIL' and C.active_object.mode == 'OBJECT'

gpencil object and not in object mode

return C.active_object and C.active_object.type == 'GPENCIL' and C.active_object.mode != 'OBJECT'

Other than that its about troubleshooting the menus, maybe disable all of them and start re enabling the tab ones to see which ones are in conflict

2 Likes

Hi. Trying to create shortcuts to new windows like shader editor:

bpy.ops.pme.popup_area(area=ā€˜ShaderNodeTreeā€™, auto_close=False)

It works but try to save your scene with that window opened ( in my case on second display ). Youā€™ll never see it again. Itā€™ll crash Blender immediately after opening.

Hi,
Wondering if someone can help please.
I have added a list of my favorite modifiers to a pie menu (works great) however Iā€™d like for the modifiers menu to open (or the ui to switch to the modifiers tab) when adding the modifier.
I know nothing about coding :frowning: a simple explanation would be great.

I tried this: bpy.ops.object.modifier_add(type=ā€˜SUBSURFā€™),bpy.context.space_data.context = ā€˜MODIFIERā€™
I just added the second part after the bracket (got it from ā€œinfoā€ tab) hoping it would workā€¦It didnā€™t
Thanks
Ivan.

1 Like

For powerful modifier management you can also check out Modifier List. I particularly love the on-screen pop-up menu with a complete modifier UI.

1 Like

Again, exactly what I needed. I didnā€™t even know it was possible to use multiple statements here, or how to combine them. Thanks a lot!

1 Like

Try using the default header

bpy.ops.pme.popup_area(area='ShaderNodeTree', header='DEFAULT')

ā€¦

For me it didnā€™t work ā€¦
but I have to say that I made a complex combination.

For each type of object has the same shortcut (Ctrl + D)
Object Mode and Edit Mode

On top of that there is the combination of (Stack Key + Pie Menu)

If I {press} (Ctrl + D) make the Subdivide command
If I {hold} (Ctrl + D) make the Subdivide command


Subdivide - Object Mode = Curve

.


Subdivide Pie Menu - Object Mode = Curve

.

Thanks Metin.

1 Like

Is it possible to populate the ui side panel group with common commands? I canā€™t seem to add the vertex, edge, face commands from theemu to the ui side panel.

Also this panel canā€™t be added in anyway to a regular menu or side panel group?

Unfortunately no this panel is hard coded and we canā€™t have any access to it

1 Like

Hello guys.Do you have any idea how to use the central point of the pie menu as an additional sot?
Take the standard ā€œShadingā€ menu below for example.
If we could use its middle part as another slot, it could be a great place for the operator ā€œview3d.toggle_shadingā€ (in this case), so we would have both: the entire pie menu and a quick switch between last two shading modes used, assigned to the same hotkey.
What do you think about it?
THx

pie menu