diff options
-rw-r--r-- | source/blender/blenkernel/BKE_blender_version.h | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 10 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 35 |
3 files changed, 25 insertions, 22 deletions
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 852549f22d4..5510f3c3d2e 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -31,7 +31,7 @@ extern "C" { * \note Use #STRINGIFY() rather than defining with quotes. */ #define BLENDER_VERSION 290 -#define BLENDER_SUBVERSION 1 +#define BLENDER_SUBVERSION 2 /** Several breakages with 280, e.g. collections vs layers. */ #define BLENDER_MINVERSION 280 #define BLENDER_MINSUBVERSION 0 diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index b6d53aee618..07551f3ea2b 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -5194,16 +5194,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /** Repair files from duplicate brushes added to blend files, see: T76738. */ - if (!MAIN_VERSION_ATLEAST(bmain, 283, 17) || - ((bmain->versionfile == 290) && !MAIN_VERSION_ATLEAST(bmain, 290, 2))) { - short id_codes[] = {ID_BR, ID_PAL}; - for (int i = 0; i < ARRAY_SIZE(id_codes); i++) { - ListBase *lb = which_libbase(bmain, id_codes[i]); - BKE_main_id_repair_duplicate_names_listbase(lb); - } - } - /** * Versioning code until next subversion bump goes here. * diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 40f6689e43b..3b7e7c21b28 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -29,6 +29,7 @@ #include "BKE_collection.h" #include "BKE_colortools.h" +#include "BKE_lib_id.h" #include "BKE_main.h" #include "BLO_readfile.h" @@ -40,17 +41,16 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) { UNUSED_VARS(fd); - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ + + /** Repair files from duplicate brushes added to blend files, see: T76738. */ + if (!MAIN_VERSION_ATLEAST(bmain, 290, 2)) { + { + short id_codes[] = {ID_BR, ID_PAL}; + for (int i = 0; i < ARRAY_SIZE(id_codes); i++) { + ListBase *lb = which_libbase(bmain, id_codes[i]); + BKE_main_id_repair_duplicate_names_listbase(lb); + } + } if (!DNA_struct_elem_find(fd->filesdna, "SpaceImage", "float", "uv_opacity")) { for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { @@ -84,4 +84,17 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ + } } |