Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/examples/bpy.types.WindowManager.popup_menu.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py b/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py
new file mode 100644
index 00000000000..c1887d8b41d
--- /dev/null
+++ b/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py
@@ -0,0 +1,14 @@
+"""
+Popup Menus
++++++++++++
+Popup menus can be useful for creating menus without having to register menu classes.
+
+Note that they will not block the scripts execution, so the caller can't wait for user input.
+"""
+
+import bpy
+
+def draw(self, context):
+ self.layout.label("Hello World")
+
+bpy.context.window_manager.popup_menu(draw, title="Greeting", icon='INFO')