Post #430: Mighty Pea:

πŸ“‹ Metadata

🏷️ Tags

pie-menu popup-dialog scripting intermediate solved

  • Pie Menu Editor
  • Popup Dialog Editor
  • Python Scripting
  • Custom code execution

πŸ’¬ Content

Mighty Pea:

Using the code β€˜name = C.active_object.type.title(); open_menu(name) or open_menu(β€œObject”)’, is it possible to expand the resulting menu as a regular pie mode popup would be?

I have a pie menu with said code in the bottom position, and I would like to have the relevant popup menu there, rather than (as is the case now) a button I need to press to get to the right popup.

Use draw_menu instead in Custom tab:

name = C.active_object.type.title(); draw_menu(name) or draw_menu("Object")

The popup will be drawn without frame. If you need the frame you have to add some extra code:

lh.save(); lh.box(); name = C.active_object.type.title(); draw_menu(name) or draw_menu("Object"); lh.restore()

πŸ”— View on Blender Artists