Pie Menu Editor 1.16.4

Will add some easy way for this in the next version (a couple of days).

2 Likes

@roaoao

I’m trying to set up my Tab pie, and having some issues with this code that’s meant to allow me to jump straight into vertex/edge/face selection from either Object or Edit mode.
It worked in 2.79, but has issues in 2.8 (and 2.81):

bpy.ops.object.mode_set(mode='EDIT'); bpy.ops.wm.context_set_value(data_path="tool_settings.mesh_select_mode", value= "(True, False, False)")

The issue being that visually nothing happens until I move the viewport or click somewhere.

I’m also using the same code in my GP Tab pie, and there it functions perfectly.
Any idea as to what’s happening, and possible solutions?

@roaoao

Hi and thank you for great addon! I have a question:

I’d like to share the same pie menu that calls for external .py scripts between two my machines, but paths to scripts are different due to Dropbox setup. Is it possible to use OS environmental variables in execute_script("")? So instead of execute_script("D:/Dropbox/script.py") I’d use something like execute_script("$BLENDER_SCRIPTS/script.py")

Try to add redraw_screen() function:

bpy.ops.object.mode_set(mode='EDIT'); bpy.ops.wm.context_set_value(data_path="tool_settings.mesh_select_mode", value= "(True, False, False)"); redraw_screen()
2 Likes

Hi @Sergey_Kritskiy,
Yes, try something like this:

import os; execute_script(os.path.join(os.environ["BLENDER_SCRIPTS"], "script.py"))
2 Likes

That works, thanks!
On another note, could you add more entries in the ‘return active object type’ dropdown? Some of the names changed from 2.7x to 2.8x. Someone told me how to find out the object-type of Grease Pencil, so I figured it out, but it’d be nice if that listed every current type.

Is it possible to change the width of addons’ drop down menus added to header?
blender_2019-10-12_13-32-41
blender_2019-10-12_13-32-48

Yes, you can do this in Custom tab (UILayout docs):

row = L.row(align=True); row.scale_x = 1.5; row.prop(C.scene, "pdt_operate")
1 Like

Added in PME 1.16.4

2 Likes

Pie Menu Editor 1.16.4


What’s New:

  • Blender 2.81 Support
  • Bug fixes

How to Update:

  • Backup your pie menus using Export button (optional).
  • Open User Preferences (ctrl+alt+U).
  • Go to the Add-Ons tab.
  • Click Install Add-on from File button, navigate to the file you downloaded and install it.
  • Restart Blender.
3 Likes

In PME 1.16.4 you can set ignore_area property depending on the current workspace.
Example for Outliner button (Command tab):

ignore_areas = {"3D / Shading": "ShaderNodeTree"}; ignore_area = ignore_areas.get(C.workspace.name, 'NONE'); bpy.ops.pme.sidearea_toggle(side='LEFT', action='TOGGLE', area='OUTLINER', width=350, ignore_area=ignore_area)
3 Likes

Thanks. Is it possible to get rid of the text in front?
blender_2019-10-13_13-22-09

Thank You! Where i find all names like “ShaderNodeTree” for other views?

Add text="":

row = L.row(align=True); row.scale_x = 1.5; row.prop(C.scene, "pdt_operate", text="")
2 Likes

Good question. Looks like there is no online info about this.
Here is the names:

  • CLIP_EDITOR - Movie Clip Editor
  • CONSOLE - Python Console
  • CompositorNodeTree - Compositing
  • DOPESHEET - Dope Sheet
  • FCURVES - Graph Editor
  • FILE_BROWSER - File Browser
  • INFO - Info
  • NLA_EDITOR - NLA Editor
  • OUTLINER - Outliner
  • PREFERENCES - User Preferences
  • PROPERTIES - Properties
  • SEQUENCE_EDITOR - Video Sequence Editor
  • ShaderNodeTree - Shader Editor
  • TEXT_EDITOR - Text Editor
  • TIMELINE - Timeline
  • TextureNodeTree - Texture Node Editor
  • UV - UV Editor
  • VIEW - Image Editor
  • VIEW_3D - 3D View
4 Likes

Ok. I have tab like this: outliner-shader editor-3d view-properties
In Pie menu when i try to toggle outliner i have:

ignore_areas = {"3D / Shading": "ShaderNodeTree"}; ignore_area = ignore_areas.get(C.workspace.name, 'NONE'); bpy.ops.pme.sidearea_toggle(side='LEFT', action='TOGGLE', area='OUTLINER', width=350, ignore_area=ignore_area)

With this command outliner toggles only in 3d view. I want to toggle only on left side in shader editor.
What command i must use to toggle outliner/properties i this layout? So the shader editor and 3d view stays all the time but only outliner/properties ar show/hide?

You can use ShaderNodeTree area as a main_area in 3D / Shading workspace like this:

main_areas = {"3D / Shading": "ShaderNodeTree"}; main_area = main_areas.get(C.workspace.name, 'VIEW_3D'); bpy.ops.pme.sidearea_toggle(side='LEFT', action='TOGGLE', area='OUTLINER', width=350, main_area=main_area)
3 Likes

Hello!
Thank you very much for your addon.
I was tormented by the problem for a long time, it turned out that your addon causes it:
https://developer.blender.org/T70914