diff options
author | Monique <mdewanchand@atmind.nl> | 2022-09-13 21:44:48 +0300 |
---|---|---|
committer | Monique <mdewanchand@atmind.nl> | 2022-09-13 21:44:48 +0300 |
commit | 56c3a79e168e9d8a0778e68f610de430af278c2a (patch) | |
tree | 07f2af98db52075f1155eaffd69c902fdd1b6293 | |
parent | 3f5fd912a7bab78b4b85438f630f392ad8234bc8 (diff) |
Fix bf_io_common_tests.
-rw-r--r-- | source/blender/blenloader/tests/blendfile_loading_base_test.cc | 8 |
1 files changed, 8 insertions, 0 deletions
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; } |