Post #717: ![](https://blenderartists.org/user_avatar/blenderartists.org/teacrab/48/451899_

📋 Metadata

🏷️ Tags

v1-13-6 popup-dialog context-polling intermediate solved

  • Pie Menu Editor
  • Popup Dialog Editor
  • Custom Tab
  • Poll Method
  • Python Scripting

💬 Content

TeaCrab:

I was expecting the Poll Method to be able to resolve this by not displaying anything at all if context is incorrect.

Should be fixed in PME 1.13.6

TeaCrab:

Or better yet, it would be great to have a Panel Switcher, which given different conditions of the context, assigns different panels to be displayed.

You can display Popup Dialog by its name in Custom tab:

draw_menu("Camera Popup Dialog") if C.active_object and C.active_object.type == 'CAMERA' else draw_menu("Mesh Popup Dialog")

🔗 View on Blender Artists