Pie Menu Editor 1.18.7

Could you elaborate a bit? What’s macro operator? bpy.types.Macro? But I just want to put my 4 line Python code in PME…

Add new macro item then put your commands on the lines:

3 Likes

The custom tab is like using console inside blender, the command tab is a ‘wrapper’ so we are able to easily put operators inside buttons.

You would have to compress those 4 lines into one, or use the external script option:

image

2 Likes

Thanks for your reply. Unfortunately I need for loop and if statement… I think it’s possible by using some complicated list comprehension but it’s too hard to read. I guess external script is the way to go.

It would be great if PME supported multi-line code snippet so I don’t need to maintain them in separate files :sweat_smile:

1 Like

I can’t get the PME tools to show up in the RMB context menu, any idea if this is a bug or am I just doing something wrong?
I turned Interactive Panels on, and I do see the button in other menus and panels

How Can I set this Code as a Toggle Behaviour.

C.space_data.overlay.show_occlude_wire = True

I want to use Toggle (X-RAY + HiddenWire) in edit mode. HOW ?
I used Macro option but only Xray togle works and I tried C.space_data.overlay.toggle.occlude_wire() . It didnt worked !

Got It :

C.space_data.overlay.show_occlude_wire =  not C.space_data.overlay.show_occlude_wire

Just started playing with PME. Pretty dang amazing what can be done with it. Before I commit to it too deeply I am wondering if development will continue and does anyone knows if the BF has something that will ship soon with Blender offering the same capability. I wouldn’t start the project until the next release and I am happy to share all assets and pie if they can so they can be shipped with the addon.

When creating the side menu (Abobe inspired) I a simple Toggle didn’t work on some areas ie file browser. Because I am the kinda person who seems to be prone to bumping into things that don’t work there is no doubt in my mind I will end up writing a list of things that are not working.

Where is the best place to post a list like that? Also it’s not my attention to be overwhelming, it’s more to be selfish and work the way that I want to work that I think may be a better way of working with the tools that are available.

Context-Sensitive pies? https://www.youtube.com/watch?v=m8pCPZdK_qc&list=PLsowJ3v5QWhE9db_GcPnSrTXWJrA5poWg&index=14

Is there a way to stack different areas up? Almost like a nesting behavior.

5th draft of a basic layout of buttons to the right. Each button would have several different states so that areas can open in different ways.

Thanks again

1 Like

Guys is that possible to call specific pie menu only for animation curve editor window?

On advance settings

return C.area.type == 'GRAPH_EDITOR'

image

If you want to know the name of a specific area you can make a Sticky Key/Stack Key, with:

message_box(C.area.type , title='')

in the command tab to show the current active area

image

3 Likes

Hello everyone.
How do I make an asset browser work in an adjacent window?

I don’t know if that pme operator is working, you could try this alternative:

bpy.ops.screen.area_split('EXEC_DEFAULT', True, direction='VERTICAL', factor=0.7); C.screen.areas[-1].ui_type = 'ASSETS'

and then close the last area created (added in 3.0) with:

bpy.ops.screen.area_close({"area": bpy.context.screen.areas[-1]})
2 Likes

Thanks!!! It works!!! :star_struck:

1 Like

Try everything under the sun using modal to

  1. jump out of edit mode
  2. Select a new object (I am getting this part wrong.)
  3. jump back into edit mode

Kinda thinking I should be using a macro in Modal?
I did kinda have it working.

bpy.ops.object.select_in_collection() just using Modal

I have something like that, haven’t used it that much really so dont know how stable it is but it works by selecting what is over the mouse and changing to the same mode as long as the object is a mesh. You can use it in edit mode, vertex, sculpt, etc.

image

  1. Saving mode and obj selected
x = C.active_object.mode; ob = C.active_object
  1. Object mode
bpy.ops.object.mode_set(mode='OBJECT'); bpy.ops.transform.translate('EXEC_DEFAULT', True)
  1. Selection
bpy.ops.view3d.select('INVOKE_DEFAULT', True, deselect_all=True)
  1. Goes back to the last mesh and mode selected if its not a mesh (this is in case you missclick over a light, camera, etc)
ob = C.active_object if  C.active_object.type == 'MESH' else ob; C.active_object.select_set(False); ob.select_set(state=True); C.view_layer.objects.active = ob; bpy.ops.object.mode_set(mode=x)
2 Likes

Did i understand it correctly what panels can be only created for N-Panel, but not for “Tools (Side panel)” area? And other types are only for 2.7 and under?

Any type except “UI (Side panel)” doesnt work for me at all.
In case of “Header”, those panel which i marked will move slightly to the left for some reason.

What does this mean? or where can i read up about it.

Probably need to read the Blender API Docs?

1 Like

Hi Guys

Need help with it: Slide tool - want to slide an edge to its neighbor with Auto Merge Vertices ON. Blender merges two edges into one but leaves me with selection. Want to deselect it automatically but without any success. Trying Macro operator but PME executes all at once not waiting for release of the mouse button on first action. Any ideas? ( i have used it with knife tool and generally it works )

In a macro the interactive operators have to be on their own item so they can be trigger in succession.

C.scene.tool_settings.use_mesh_automerge = True
bpy.ops.transform.edge_slide()
bpy.ops.mesh.select_all(action='DESELECT')

image

1 Like