Pie Menu Editor 1.18.7

Hi!

I used this addon to make a right click context menu similar to that of Maya. The only problem I have is with choosing whether to select vertex, edges or faces when going into edit mode and was wandering if you could help me out with this.

So to clarify I would like the edit mode button to expand and give me the option to choose what selection mode I want.

/Nathaniel Scheurer!
PME_Question (1)|690x373

That’s weird, are you using it in the custom tab part?

It should look like this, if that’s not it then I have no idea sry.

image

Ok I was wrong, I’ve used the code in the Command tab. Now it works as intended, thank you !

Just by curiosity, how did you proceed to find the right command / ID ?

glad it works!

The first part was added with the interactive panel menu

panel('OBJECT_PT_transform', frame=False, header=False, expand=None, area='PROPERTIES')

image

image

And for the second part that is “Dimensions” you need to know some python, It comes from a formatted C.object.dimensions property

For example an alternative option was making a popup dialog with 2 buttons, the first with the transform panel and the second with C.object.dimensions in the property tab. It would be the same but less tidy

Hi @Nathaniel_Scheurer,
Add a new Regular Menu with 3 slots:
Vertex:

bpy.ops.object.mode_set(mode='EDIT', toggle=False); C.tool_settings.mesh_select_mode = (True, False, False)

Edge:

bpy.ops.object.mode_set(mode='EDIT', toggle=False); C.tool_settings.mesh_select_mode = (False, True, False)

Face:

bpy.ops.object.mode_set(mode='EDIT', toggle=False); C.tool_settings.mesh_select_mode = (False, False, True)

And use it in the pie menu (Menu tab with Open on Mouse Over checked)

3 Likes

@roaoao
I have an issue with the unicode text .

here is my code :

py.context.preferences.addons[‘pie_menu_editor’].preferences.overlay.size = 15

bpy.ops.pme.overlay(text='Version module FR : à é è \u00e0 \u00e9 \u00e8 ', alignment=‘BOTTOM_LEFT’, offset_y=70, offset_x=100, duration=8),

prefs().overlay.color = (1, 0.4, 0.06, 1)

when i write a text which is a help (for example a description of the function) for the users, it is displayed in the view port, every thing work as excepted only characters with accent are substitute with their unicode. Accented characters works in the pie menu but how can i achieve the same result for the displayed text ? One solution is to write directly with the unicode but i have a lot of subsitute to make.
I hope you could understand what i mean.
Baptiste

Thanks a lot for the quick reply! Worked like a charm.

Hello all -
What is the context name to use (instead of the generic “Window” shown in the screenshot below) for a PME popup menu to show up specifically in Sculpt mode ?

2020-08-27 17_00_12-Blender Preferences

Thank you for your help.

1 Like

Hi, if you write sculpt and scroll all the way down, it should be there.

image

bpy.ops.pme.overlay(text='Version module FR : à é è \u00e0 \u00e9 \u00e8 ', alignment='BOTTOM_LEFT', offset_y=70, offset_x=100, duration=8)

Your code works for me. All characters are displayed as expected.

Try to use json module:

from json import dumps; bpy.ops.pme.overlay(text=eval(dumps('Version module FR : à é è \u00e0 \u00e9 \u00e8 ')))
2 Likes

@noKeyframes - Ha, thanks ! That seems to be it. I thought I tried to filter for it but I guess I didn’t :slight_smile:

1 Like

It seems not working with blender 2.9. right?

1 Like

can we go into the init.py and change the version #No. ?

Works for me. What message you get?

1 Like

There’s no error message. However, menu in preference does not show anything I’ve worked on. I will try remove and reinstall it.

Hi folks

Your addon is a must have, save me so muuuuuuuuuuuuuch time in my workflow.
I have a question. Is it possible to affect a pie (for example) to multiple types of objects. For example enabling the pie if object is MESH or CURVE ?
I tried
return C.active_object.type == 'MESH' or C.active_object.type == 'CURVE'
And also
return C.active_object.type in ['MESH','CURVE']

As you think i am a perfect noob in Python, so there are the results of my research on th net

Also is it possible to display a single text. For example make a popup like this :

"Origin To : " [Grid] [World Origin] [Selected] [Active]

1 Title text (not clickable) and 4 buttons ?

?

Thanks for any help
Cheers

Both scripts are ok. Use them with Object Mode keymap for example.

Yes, here is the code for Custom tab:

L.label(text=slot, icon=icon, icon_value=icon_value)
2 Likes

Great !!! Everything works just fine.
Yesterday it didn’t work, maybe restarting blender would have been a good thing … :slight_smile:

Thank you roaoao

is it possible to pop up the Vertex Weights sub-panel at mouse cursor location with user defined hotkey??

thanks.

Hi, I would like to create an button for my pie menu to increase subdivision of my grid. The command for grid to be set at 1 meter is
C.space_data.overlay.grid_scale = 1

Is there a way to make it to increase each time I press like 0.25 -> 0.5 -> 1 -> 2

Basically current value multiplied by 2 and then similar but to decrease which would be current / 2

C.space_data.overlay.grid_scale = current value * 2
C.space_data.overlay.grid_scale = current value / 2

basically but those command do not obviously work