diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-27 13:28:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-27 17:03:43 +0300 |
commit | eda770f88406c22ad91ee2d5f576477f5e3c8f13 (patch) | |
tree | d3086c808bba461c1bc669693cd24fb469f89826 /source/blender/blenloader | |
parent | 66298a99e3f068f822f97c573cc1532282306ad3 (diff) |
Theme: set default theme 'Flatty Dark Blueberry'
The theme is now stored in generated C code,
which can be extracted from existing user preferences.
This theme can then be used for version patching themes
instead of duplicating values
Note that theme versioning has been removed,
since minor changes from now on won't apply well on top of 2.7x theme.
Theme colors from interface_widgets.c have been removed too.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 3 | ||||
-rw-r--r-- | source/blender/blenloader/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 7 |
3 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 327812f78d5..1251424719a 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -163,6 +163,9 @@ struct BlendThumbnail *BLO_thumbnail_from_file(const char *filepath); struct Main *BLO_main_from_memfile(struct MemFile *memfile, struct Main *bmain, struct Scene **r_scene); +/* datafiles (generated theme) */ +extern const struct bTheme U_theme_default; + #ifdef __cplusplus } #endif diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index 2c6f6f3edfb..b340aa28324 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -47,6 +47,7 @@ set(INC_SYS ) set(SRC + ${CMAKE_SOURCE_DIR}/release/datafiles/userdef/userdef_default_theme.c intern/blend_validate.c intern/readblenentry.c intern/readfile.c diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index 210dc07d7f2..860d1432370 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -94,6 +94,13 @@ void BLO_update_defaults_userpref_blend(void) #else U.flag &= ~USER_SCRIPT_AUTOEXEC_DISABLE; #endif + + /* Ignore the theme saved in the blend file, + * instead use the theme from 'userdef_default_theme.c' */ + { + bTheme *theme = U.themes.first; + memcpy(theme, &U_theme_default, sizeof(bTheme)); + } } /** |