Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-08-05 15:59:31 +0300
committerBastien Montagne <bastien@blender.org>2021-08-05 16:26:08 +0300
commit720ea8a67df06ba2242e7771b349cefd753f7ea5 (patch)
treeeda7a864a436138061e7ec6f78dcf8cea9a37a95 /source
parentbe6409a74850054d53b6c2f965e03e64e00a622f (diff)
Fix T89963: crash when library override is applied to an object from a linked scene.
LibOverride of scenes is not really supported currently, there are many issues with it. Will disable most user-accessible ways to create such overrides in a following commit.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/lib_override.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c
index 072304566e5..67ed7d1b394 100644
--- a/source/blender/blenkernel/intern/lib_override.c
+++ b/source/blender/blenkernel/intern/lib_override.c
@@ -1599,6 +1599,17 @@ static void lib_override_library_main_resync_on_library_indirect_level(
(!ID_IS_LINKED(id) && library_indirect_level != 0)) {
continue;
}
+
+ /* We cannot resync a scene that is currently active. */
+ if (id == &scene->id) {
+ id->tag &= ~LIB_TAG_LIB_OVERRIDE_NEED_RESYNC;
+ BKE_reportf(reports->reports,
+ RPT_WARNING,
+ "Scene '%s' was not resynced as it is the currently active one",
+ scene->id.name + 2);
+ continue;
+ }
+
Library *library = id->lib;
int level = 0;