Post #2360: : post_02362
🏷️ Tags
pie-menu custom-scripting intermediate unsolved
⚙️ Related PME Features
- Pie Menu Editor
- Custom Python Scripting
- Operator Execution
💬 Content
roaoao:
Z menu “uses” this code in the first slot of the pie (
Customtab):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:
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? 
image827×682 70 KB