add popup menu to allow python scripts to show popups without having to define a...
[blender.git] / doc / python_api / examples / bpy.types.WindowManager.popup_menu.py
1 """
2 Popup Menus
3 +++++++++++
4 Popup menus can be useful for creating menus without having to register menu classes.
5
6 Note that they will not block the scripts execution, so the caller can't wait for user input.
7 """
8
9 import bpy
10
11 def draw(self, context):
12     self.layout.label("Hello World")
13
14 bpy.context.window_manager.popup_menu(draw, title="Greeting", icon='INFO')