📋 Metadata

💬 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')"

🔗 View on Blender Artists