Pie Menu Editor 1.15.20

commercial
add-ons
(roaoao) #1905

No, afaik we don’t have access to that data from add-ons.

0 Likes

(Jakro) #1906

That custom tab works perfectly if i tweak it. I’m using it to make a quick material set up menu that handles shader creation, flipping green channel options ect :slight_smile:

I used this code.

L.template_ID(bpy.context.object.active_material.node_tree.nodes['Image Texture'], "image", new="image.new", open="image.open")
0 Likes

(Nomo) #1907

@roaoao Is it possible for stack key to recognize an item’s status like a toggle? I made a stack key to emulate Maya’s smooth preview toggle that examines the object’s subdivision modifier and applies it if there is none, and vice versa. Currently, it does not communicate with the status of the object, so while usable, there is some redundancy.

0 Likes

(roaoao) #1908

Yes, I think it’s possible. But to make sure please export and pm me this stack key.

0 Likes

(Michael Weisheim Beresin) #1909

Here is a example of a move, scale, rotate behavior in Nvil. Basically, it detects the axis depending on the view angle. No need to press x,y,z:)
On the top left corner of the video, you can see the hotkeys i use to achieve different behavior.

2 Likes

(Michael Knubben) #1910

Here’s a video I made ages ago, I’m afraid the sound’s pretty awful:


Maybe @Woolfy13’s example is better

The difference with Blender’s system is that in Blender you hold mmb within a rotation/translation/scale tool, you get these three axis’ you can move your mouse over, and that selects an axis. But it’s much more prone to failure, and in my experience a lot less quick.
I also set up Q to toggle manipulators on and off, but holding Q puts me in a tool where I can move (and snap) the working manipulator (so, your 3d cursor in Blender)
Hitting and releasing W turns on my move manipulator, but holding W has other options. W+lmb is tweak (with a selection, clicking and dragging anywhere moves those selected components, without a selection you can move the highlight-selected components!), w+rmb is the aforementioned tool that moves on an axis, and w+mmb moves along a plane (so x+y etc.)
I also set w+mb4 and mb5 (the side buttons on a lot of mice) to move along normal and move along the mesh (so like G+G in Blender). It’s an incredibly useful way to work and I miss it so much :smiley:

1 Like

(Michael Weisheim Beresin) #1911

Yes this mmb behavior of blender is much less effective, especially with rotation. Blender should be able to first select/lock axis depend on the view before you move and not after. I mean it mostly covered by the [ADDON] Advanced Transform. But i would like to create my own tool using pie menu editor, for example to customize the rotation step angle(not sure if possible). And of course possibility to create other tools based on this feature inside pie menu editor( since it is much more then only pie creator :slight_smile: )

1 Like

(Michael Knubben) #1912

@roaoao Another example I found of my Extrude tool:


Again, the volume is very low, but I’m extruding based on the axis that my mouse movement (the first few pixels) most closedly aligns to.
In practice this is almost always correct, it’s most difficult for the axis that you’re looking along, but that’s equally true for Blender’s MMB selector)
2 Likes

(roaoao) #1913

@Michael_Knubben, @Woolfy13, thanks for the examples :+1:
It seems that these tools can be implemented by using existing Blender and PME features (plus some helper python functions).
Will try to do that and post some examples this week.

3 Likes

(Nomo) #1914

@roaoao Is it possible to toggle the icon of a pie menu item depending on the mode? Say a toggle between object and edit mode.

1 Like

(z01ks) #1915

I am trying to create a Macro that adds a Bevel Modifier with certain settings, and then adds a Weighted Normal Modifier. However, it seems as if adding multiple modifiers doesn’t work. The Macro will only add the last modifier in the list.

Edit: I guess the workaround is to use the Harden Normals on the Bevel Modifier instead of adding the Weighted Normals. I am encountering another issue though. Sometimes the buttons in my Pie Menus seem to be changing places or disappearing. Is it known why this could be happening?

0 Likes

(roaoao) #1917

Yes, you can use Custom tab for this:

L.operator("object.editmode_toggle", text="Object Mode" if C.mode == 'OBJECT' else "Edit Mode", icon='OBJECT_DATAMODE' if C.mode == 'OBJECT' else 'EDITMODE_HLT')

You can find and copy icon names in Icon Viewer add-on (Settings - Add-ons - Development category - Icon Viewer)
Here is a list of functions you can use in Custom tab.

0 Likes

(roaoao) #1918

Yep, macros don’t support multiple operators with the same ID (object.modifier_add in your case).
There is a workaround in PME. Just put the code in parentheses:

(bpy.ops.object.modifier_add(type='BEVEL'))

This can happen if a pie has errors in Custom tab. Can you export and pm me the pie?

1 Like

(Nomo) #1919

Hey @roaoao, I have to ask how to do this after trying for a whole day. I’m trying to create a toggle button for GroupPro’s Close and Edit function. Would you happen to know a thing about this?

0 Likes

(R_dva) #1920

Hi, @roaoao, recent files from custom table example don’t show in pie menu. How to fix that?

0 Likes

(Michael Knubben) #1921

Wonderful! Thanks so much.

0 Likes

(roaoao) #1922

Looks like recent files menu was renamed. Use this code instead (Custom tab):

L.menu('TOPBAR_MT_file_open_recent', text=text, icon=icon, icon_value=icon_value)
1 Like

(R_dva) #1923

Thank you!

0 Likes

(Michael Weisheim Beresin) #1924

Thanks from me too!

0 Likes

(Nomo) #1926

How do I create a pie menu item that toggles between these two tool settings? Currently, trying to discern when to use operator vs l.prop or what not is very difficult.

bpy.context.scene.tool_settings.transform_pivot_point = ‘CURSOR’
bpy.context.scene.tool_settings.transform_pivot_point = ‘BOUNDING_BOX_CENTER’

0 Likes