diff options
-rw-r--r-- | source/blender/blenkernel/BKE_blender_version.h | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 15 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_userdef.c | 25 |
3 files changed, 24 insertions, 18 deletions
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index ef5ccc3696d..19350e3e3b0 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -39,7 +39,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 2 +#define BLENDER_FILE_SUBVERSION 3 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file 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 |