From e6d1fb87c6b0184416ce202ccba6a96a3ee04552 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 22 Apr 2018 17:16:39 +0200 Subject: UI: Initial popover support for panels - UILayout.popover(.. panel_type ..) A single panel - UILayout.popover_group(.. panel categories ..) Expands all panels matching args. Currently used in the topbar for redo and paint options. --- release/scripts/modules/bpy_types.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'release/scripts/modules/bpy_types.py') diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 1124070fea2..324bb43d890 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -144,6 +144,15 @@ class WindowManager(bpy_types.ID): finally: self.popmenu_end__internal(popup) + def popover(self, draw_func, title="", icon='NONE'): + import bpy + popup = self.popover_begin__internal(title, icon) + + try: + draw_func(popup, bpy.context) + finally: + self.popover_end__internal(popup) + def popup_menu_pie(self, event, draw_func, title="", icon='NONE'): import bpy pie = self.piemenu_begin__internal(title, icon, event) -- cgit v1.2.3