diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-03 14:32:36 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-03 22:30:35 +0300 |
commit | d7c2b78822ff20fb78418c43d6badd692fa98784 (patch) | |
tree | c1f8b9a0580afc173dd0829615f74a94a3254589 /source/blender/blenkernel/BKE_screen.h | |
parent | 9b01e7bc27c4a8c8c9f95aa074f458f3e734d23b (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/BKE_screen.h')
-rw-r--r-- | source/blender/blenkernel/BKE_screen.h | 7 |
1 files changed, 6 insertions, 1 deletions
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; |