[Bf-blender-cvs] [491168c02f4] asset-browser-poselib: Cleanup: Move version patch to correct file

Julian Eisel noreply at git.blender.org
Mon Jun 14 19:11:06 CEST 2021


Commit: 491168c02f43ba0cfa14d71500cb5406f91063f0
Author: Julian Eisel
Date:   Mon Jun 14 19:06:45 2021 +0200
Branches: asset-browser-poselib
https://developer.blender.org/rB491168c02f43ba0cfa14d71500cb5406f91063f0

Cleanup: Move version patch to correct file

Should be in `versioning_300.c` by now.

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

M	source/blender/blenloader/intern/versioning_290.c
M	source/blender/blenloader/intern/versioning_300.c

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

diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 2148f434a38..1a52f05dae3 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -2100,13 +2100,4 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
   {
     /* Keep this block, even when empty. */
   }
-
-  {
-    if (!DNA_struct_elem_find(
-            fd->filesdna, "WorkSpace", "AssetLibraryReference", "active_asset_library")) {
-      LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) {
-        BKE_asset_library_reference_init_default(&workspace->active_asset_library);
-      }
-    }
-  }
 }
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 268598ccc51..60650edcea6 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -30,7 +30,9 @@
 #include "DNA_listBase.h"
 #include "DNA_modifier_types.h"
 #include "DNA_text_types.h"
+#include "DNA_workspace_types.h"
 
+#include "BKE_asset.h"
 #include "BKE_lib_id.h"
 #include "BKE_main.h"
 #include "BKE_node.h"
@@ -259,5 +261,14 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
         }
       }
     }
+
+    {
+      if (!DNA_struct_elem_find(
+              fd->filesdna, "WorkSpace", "AssetLibraryReference", "active_asset_library")) {
+        LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) {
+          BKE_asset_library_reference_init_default(&workspace->active_asset_library);
+        }
+      }
+    }
   }
 }



More information about the Bf-blender-cvs mailing list