Post #2354: : post_02360
π·οΈ Tags
pie-menu state-highlighting intermediate
βοΈ Related PME Features
- Pie Menu Editor
- Custom tab scripting
- Python operator execution
π¬ Content
casterle:
how to apply state highlighting to my pie menu slots
Depends on the button/slot you want to highlight.
casterle:
For example, on the standard Z menu, the state is displayed by highlighting enabled items with a blue background.
Z menu βusesβ this code in the first slot of the pie (Custom tab):
L.prop(C.space_data.shading, "type", expand=True)
In Blender 2.80+ you can highlight tool buttons using depress=True argument (Custom tab):
L.operator("pme.exec", text="Hello World", depress=True).cmd = "print('Hello World')"