Post #430: Mighty Pea:
π Metadata
- Author: roaoao
- Date: 2016-11-10 10:06:40
- Type:
answer - Quality Score: 8/10
- Reply to: post_00429
- Replies (1): post_00431
π·οΈ Tags
pie-menu popup-dialog scripting intermediate solved
βοΈ Related PME Features
- 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()