Pie Menu Editor 1.18.7

Here is what I have when I press the shortcut:

Here is what I’d like (the UV editor automatically fit my second screen) :

I know a way but is kinda convoluted, put this in the command tab:

bpy.ops.pme.popup_area('INVOKE_DEFAULT', area='UV', auto_close=False); import ctypes; u = ctypes.windll.user32; handle = u.GetActiveWindow(); u.MoveWindow(handle, 2000, 100 ,1800, 1400, True); u.ShowWindow(handle, 3)

What it does is:

  • Creates a window with pme:
    bpy.ops.pme.popup_area('INVOKE_DEFAULT', area='UV', auto_close=False)

  • Then moves that window:
    u.MoveWindow(handle, 2000, 100 ,1800, 1400, True)
    MoveWindow(handle, x, y, height, width, repaint(bool))

This is important, x and y are the position the window is going to be moved to, in this case I changed x to 2000 pixels so it moves to the right to my second monitor (could also use -2000 and move it to the left), you would have to adjust this to your setup

  • Then maximizes that window:
    u.ShowWindow(handle, 3)
4 Likes

I was just about to say that it can be done with ctypes lol

2 Likes

@Motiomancer thanks !
It works perfectly. This thread is really great.

1 Like

Sure The grayed out ones are set to pop-up a regular menu on mouse over: Screen Shot 2021-05-20 at 3.59.53 PM

I’ve been through all of the ui styles and I can’t find it, and now it is bugging me lol

Is there a command or operator that we can use in the macro to reset to previous setting or turn off what was activated by the macro?

I made a simple macro for local transform to save me some extra clicks.

bpy.context.scene.transform_orientation_slots[0].type = ‘LOCAL’
bpy.context.scene.tool_settings.transform_pivot_point = ‘ACTIVE_ELEMENT’
bpy.ops.wm.tool_set_by_id(name=‘builtin.move’)

So after using this macro for local transform, I want it to turn off and revert to previous
Global and Bounding box center or whatever was my settings before activating the macro.
Is it possible?

Look into ‘Property’, it’s a type of menu in PME, that I believe can store stuff like that. The manual’s pretty vague on them as I recall, and I can’t really help you beyond just mentioning they exist, sorry!

There is a way but it’s not straight forward, roaoao made something specific to store information temporally its called U.(random text)

This one saves orientation, pivot and tool:

U.orient = C.scene.transform_orientation_slots[0].type; U.pivot = C.scene.tool_settings.transform_pivot_point; U.tool = C.workspace.tools.from_space_view3d_mode(bpy.context.mode).idname

This one restores them:

C.scene.transform_orientation_slots[0].type = U.orient; C.scene.tool_settings.transform_pivot_point = U.pivot; bpy.ops.wm.tool_set_by_id(name=U.tool)

You should add the first line to the beginning of your macro to store the info and with the second line you can put it in a stack key with the macro or make another hotkey

Just wanna say huge thank you for addon!

Thanks! Will try it out. This restore state function has a lot of application for macros for me. :smile:

Edge_Collapse.json (433 Bytes)
Face_Collapse.json (433 Bytes)
Vertex_Collapse.json (430 Bytes)
I have three functions all on the same key combo, with polling to decided which to run, based on component selection type. The problem is: Edge Collapse only works when I disable the others, with all of them enabled it won’t run!
Can anyone figure out what’s going wrong?

I think its a problem with another shift+x shortcut because they work for me.
Since you are using the collapse operation for edge and face you could try putting everything together in one command:

bpy.ops.mesh.merge(type='LAST') if C.scene.tool_settings.mesh_select_mode[0] else bpy.ops.mesh.merge(type='COLLAPSE')
1 Like

Interesting, I’ll have to see if something else is muddying the waters then. I’ll try your suggestion too, I don’t mind at all to combine them all into one!

Couldn’t find anything, but the good news is: your suggestion works perfectly, so I switched to that!

1 Like

I’ve created a popup dialog using this as a command:
bpy.ops.pme.popup_area(area='OUTLINER'
but how do I apply these to make a custom outliner

  • bpy.context.space_data.show_restrict_column_enable = False
  • bpy.context.space_data.show_restrict_column_viewport = True
  • bpy.context.space_data.show_restrict_column_select = True

Do anyone have a good idea?

Where it says ‘Exec on Open’ you can add commands that are going to be applied to the new popup

bpy.ops.pme.popup_area(area='OUTLINER', cmd='bpy.context.space_data.show_restrict_column_select = True; bpy.context.space_data.show_restrict_column_viewport = True; bpy.context.space_data.show_restrict_column_select = True')
1 Like

:+1:

That solved my issue. Thank you for helping out.

Will 3.0 be supported any soon?

Oh wait it seems it works…

Let me just say, in all my 21 years of doing cg, not as a Hollywood or AAA game artist :joy:, but just a typical generalist cg bee, PME is the GREATEST plugin, addon, feature ever created for any 3d software out there for me. Best $ I’ve ever spent on any app.
The ability to have a flexible ui and transform blender to something enjoyable to use.
Stack keys, macros, etc all in one is just beautiful. Thank you for making this!

6 Likes