diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-12-07 00:46:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-12-07 05:20:37 +0300 |
commit | 8b512414c5751c39d443c85d3dcb4820c14e3ba0 (patch) | |
tree | 5468bd943b5496c5b3a507aa1f94afd07cbe1cc5 /source/blender/makesdna/DNA_userdef_types.h | |
parent | 7c2217cd126a97df9b1c305f79a605f25c06a229 (diff) |
Preferences: correct experimental flag use
Add utilities for checking when experimental features
should be used.
Diffstat (limited to 'source/blender/makesdna/DNA_userdef_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index c26eb58a8f9..adab1f31507 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -600,10 +600,6 @@ 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; @@ -613,6 +609,10 @@ typedef struct UserDef_Experimental { char _pad0[3]; } UserDef_Experimental; +#define USER_EXPEREMENTAL_TEST(userdef, member) \ + (((userdef)->flag & USER_DEVELOPER_UI) && \ + (((userdef)->experimental.flag & USER_EXPERIMENTAL_ALL) || ((userdef)->experimental).member)) + typedef struct UserDef { /** UserDef has separate do-version handling, and can be read from other files. */ int versionfile, subversionfile; |