📋 Metadata
- Author: roaoao
- Date: 2019-02-03 10:25:44
- Type:
answer - Reply to: post_01914
💬 Content
Colacuve:
Is it possible to toggle the icon of a pie menu item depending on the mode?
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.