From 17ccb409ddfbf9f683a3160716c87f8404c45f89 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 15 Sep 2020 18:47:35 -0500 Subject: Bump file subversion after recent theme-related changes --- source/blender/blenloader/intern/versioning_290.c | 15 +++++++------ .../blender/blenloader/intern/versioning_userdef.c | 25 ++++++++++++---------- 2 files changed, 23 insertions(+), 17 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 3bf464602bc..aaf4ecbf255 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -650,6 +650,15 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + if (!MAIN_VERSION_ATLEAST(bmain, 291, 3)) { + LISTBASE_FOREACH (Collection *, collection, &bmain->collections) { + collection->color_tag = COLLECTION_COLOR_NONE; + } + LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { + scene->master_collection->color_tag = COLLECTION_COLOR_NONE; + } + } + /** * Versioning code until next subversion bump goes here. * @@ -661,11 +670,5 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) */ { /* Keep this block, even when empty. */ - LISTBASE_FOREACH (Collection *, collection, &bmain->collections) { - collection->color_tag = COLLECTION_COLOR_NONE; - } - LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { - scene->master_collection->color_tag = COLLECTION_COLOR_NONE; - } } } diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 3cc2372a2b0..36abbaf62cf 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -225,17 +225,7 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) FROM_DEFAULT_V4_UCHAR(space_image.grid); } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - #BLO_version_defaults_userpref_blend in this file. - * - "versioning_{BLENDER_VERSION}.c" - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ + if (!USER_VERSION_ATLEAST(291, 3)) { for (int i = 0; i < COLLECTION_COLOR_TOT; ++i) { FROM_DEFAULT_V4_UCHAR(collection_color[i].color); } @@ -250,6 +240,19 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) copy_v3_v3_uchar(btheme->space_node.grid, btheme->space_node.back); } + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - #BLO_version_defaults_userpref_blend in this file. + * - "versioning_{BLENDER_VERSION}.c" + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ + } + #undef FROM_DEFAULT_V4_UCHAR #undef USER_VERSION_ATLEAST -- cgit v1.2.3