From a7fcd78d2d690f0fa57cc65d04ee20d9d26b08e4 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Thu, 7 Nov 2019 12:31:33 -0300 Subject: User Preference Experimental Tab Experimental tab in User Preferences for experimental features. The tab option is only visible when "Developer Extras" is on. Included here is a (commented out) example panel to be used as a template for the new experimental panels. Since these panels will come and go it is nice to have a reference in the code. Differential Revision: https://developer.blender.org/D6203 --- source/blender/makesdna/DNA_userdef_types.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 752d2853707..eae7a9f262f 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -595,6 +595,16 @@ typedef struct UserDef_FileSpaceData { int temp_win_sizey; } UserDef_FileSpaceData; +/** + * Store UI data here instead of the space + * since the space is typically a window which is freed. + */ +typedef struct UserDef_Experimental { + /** #eUserPref_Experimental_Flag options. */ + int flag; + char _pad0[4]; +} UserDef_Experimental; + typedef struct UserDef { /** UserDef has separate do-version handling, and can be read from other files. */ int versionfile, subversionfile; @@ -846,6 +856,8 @@ typedef struct UserDef { UserDef_SpaceData space_data; UserDef_FileSpaceData file_space_data; + UserDef_Experimental experimental; + /** Runtime data (keep last). */ UserDef_Runtime runtime; } UserDef; @@ -878,6 +890,7 @@ typedef enum eUserPref_Section { USER_SECTION_ANIMATION = 13, USER_SECTION_NAVIGATION = 14, USER_SECTION_FILE_PATHS = 15, + USER_SECTION_EXPERIMENTAL = 16, } eUserPref_Section; /** #UserDef_SpaceData.flag (State of the user preferences UI). */ @@ -887,6 +900,11 @@ typedef enum eUserPref_SpaceData_Flag { USER_SPACEDATA_ADDONS_SHOW_ONLY_ENABLED = (1 << 1), } eUserPref_SpaceData_Flag; +/** #UserDef_Experimental.flag. */ +typedef enum eUserPref_Experimental_Flag { + USER_EXPERIMENTAL_ALL = (1 << 0), +} eUserPref_Experimental_Flag; + /** #UserDef.flag */ typedef enum eUserPref_Flag { USER_AUTOSAVE = (1 << 0), -- cgit v1.2.3