Post #3283: ![](https://blenderartists.org/user_avatar/blenderartists.org/tukor/48/601548_2.

📋 Metadata

🏷️ Tags

v1-20-x pie-menu configuration intermediate solved

  • Pie Menu Editor
  • Custom Icons
  • Python Scripting
  • Hotkey Configuration

💬 Content

tukor:

The perfect thing would be just a button, with the name of the plugin, and you just click it and it enables/disables the plugin, and also tint the button or something when its enabled:

Hi @tukor,
Use addon’s module name as a name for the button (eg mesh_f2) and use this code in Custom tab (Blender 2.80+):

addon = slot; import addon_utils as au; info = au.module_bl_info(au.addons_fake_modules.get(addon)); is_enabled = addon in {a.module for a in C.preferences.addons}; L.operator("preferences.addon_disable" if is_enabled else "preferences.addon_enable", text=info["name"], depress=is_enabled).module = addon

❤️ 4 likes


🔗 View on Blender Artists