mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
add popup menu to allow python scripts to show popups without having to define a menu class first.
This commit is contained in:
parent
0ad88d1001
commit
2d4a682a8e
7 changed files with 101 additions and 2 deletions
|
|
@ -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')
|
||||
Loading…
Add table
Add a link
Reference in a new issue