From d7c2b78822ff20fb78418c43d6badd692fa98784 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 3 Jun 2018 13:32:36 +0200 Subject: UI: add subpanel support. In the Python API, any panel becomes a subpanel by setting bl_parent_id to the name of the parent panel. These subpanels can contain advanced or less commonly used settings. --- source/blender/blenkernel/BKE_screen.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/BKE_screen.h') diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index f284e633c5e..0b95152ad8e 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -205,7 +205,8 @@ typedef struct PanelType { char translation_context[BKE_ST_MAXNAME]; char context[BKE_ST_MAXNAME]; /* for buttons window */ char category[BKE_ST_MAXNAME]; /* for category tabs */ - char owner_id[BKE_ST_MAXNAME]; /* for work-spaces to selectively show. */ + char owner_id[BKE_ST_MAXNAME]; /* for work-spaces to selectively show. */ + char parent_id[BKE_ST_MAXNAME]; /* parent idname for subpanels */ int space_type; int region_type; @@ -218,6 +219,10 @@ typedef struct PanelType { /* draw entirely, view changes should be handled here */ void (*draw)(const struct bContext *C, struct Panel *pa); + /* sub panels */ + struct PanelType *parent; + ListBase children; + /* RNA integration */ ExtensionRNA ext; } PanelType; -- cgit v1.2.3