Post #2360: ![](https://blenderartists.org/user_avatar/blenderartists.org/roaoao/48/37600_2.

📋 Metadata

🏷️ Tags

pie-menu custom-scripting intermediate unsolved

  • Pie Menu Editor
  • Custom Python Scripting
  • Operator Execution

💬 Content

roaoao:

Z menu “uses” this code in the first slot of the pie ( Custom tab):

L.prop(C.space_data.shading, "type", expand=True)

I can’t get this working. When I put

L.prop(C.space_data.shading, "WIREFRAME", expand=True)

in the Custom tab:

imageimage827×682 70 KB

the item does not appear in the pie menu:

If I try your 2nd example:

L.operator("pme.exec", text="Hello World", depress=True).cmd = "print('Hello World')"

the item displays a highlighted “Hello World” tab as (apparently) expected. But this example doesn’t show me how to have the tab highlighted if and only if the view is in wireframe mode.

Can you please give me an example that makes my menu item work exactly like the Wireframe slot on the standard Z menu?

Finally , is there a way I can view how a standard pie menu item is configured so I can look at examples rather than having to bother you here? :smiley:


🔗 View on Blender Artists