[Bf-blender-cvs] [17ccb409ddf] master: Bump file subversion after recent theme-related changes

Hans Goudey noreply at git.blender.org
Wed Sep 16 01:47:50 CEST 2020


Commit: 17ccb409ddfbf9f683a3160716c87f8404c45f89
Author: Hans Goudey
Date:   Tue Sep 15 18:47:35 2020 -0500
Branches: master
https://developer.blender.org/rB17ccb409ddfbf9f683a3160716c87f8404c45f89

Bump file subversion after recent theme-related changes

===================================================================

M	source/blender/blenkernel/BKE_blender_version.h
M	source/blender/blenloader/intern/versioning_290.c
M	source/blender/blenloader/intern/versioning_userdef.c

===================================================================

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



More information about the Bf-blender-cvs mailing list