[Bf-blender-cvs] [56c3a79e168] temp-T73411-view-layer-lazy-cache: Fix bf_io_common_tests.
Monique
noreply at git.blender.org
Tue Sep 13 20:52:33 CEST 2022
Commit: 56c3a79e168e9d8a0778e68f610de430af278c2a
Author: Monique
Date: Tue Sep 13 20:44:48 2022 +0200
Branches: temp-T73411-view-layer-lazy-cache
https://developer.blender.org/rB56c3a79e168e9d8a0778e68f610de430af278c2a
Fix bf_io_common_tests.
===================================================================
M source/blender/blenloader/tests/blendfile_loading_base_test.cc
===================================================================
diff --git a/source/blender/blenloader/tests/blendfile_loading_base_test.cc b/source/blender/blenloader/tests/blendfile_loading_base_test.cc
index 7df0ce944e4..adf53f036c6 100644
--- a/source/blender/blenloader/tests/blendfile_loading_base_test.cc
+++ b/source/blender/blenloader/tests/blendfile_loading_base_test.cc
@@ -11,6 +11,7 @@
#include "BKE_global.h"
#include "BKE_idtype.h"
#include "BKE_image.h"
+#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_mball_tessellate.h"
#include "BKE_modifier.h"
@@ -125,6 +126,13 @@ bool BlendfileLoadingBaseTest::blendfile_load(const char *filepath)
<< test_assets_dir << "'";
return false;
}
+
+ /* Make sure that all view_layers in the file are synced. Depsgraph can make a copy of the whole
+ * scene, which will fail when one view layer isn't synced. */
+ LISTBASE_FOREACH (ViewLayer *, view_layer, &bfile->curscene->view_layers) {
+ BKE_view_layer_synced_ensure(bfile->curscene, view_layer);
+ }
+
return true;
}
More information about the Bf-blender-cvs
mailing list