Post #3049: ![](https://blenderartists.org/user_avatar/blenderartists.org/colacuve/48/535989

📋 Metadata

  • Author: roaoao
  • Date: 2020-03-01 18:40:00
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_03048

🏷️ Tags

pie-menu custom-scripting intermediate solved

  • Pie Menu Editor
  • Custom Tab
  • Python Scripting

💬 Content

Colacuve:

I would like for the pie item to react to hide/show based on the condition…

Hi @Colacuve,
Try this code in Custom tab:

is_show = C.window_manager.measureit_run_opengl; text = "Hide" if is_show else "Show"; icon = 'PAUSE' if is_show else 'PLAY'; L.operator("measureit.runopengl", text=text, icon=icon)

❤️ 3 likes


🔗 View on Blender Artists