[Bf-blender-cvs] [aa8e058a596] master: LibOverride: Do not preserve local overrides when their linked data disappear.
Bastien Montagne
noreply at git.blender.org
Fri May 7 12:54:23 CEST 2021
Commit: aa8e058a596abd30d75987ca2cc11d8f8806512f
Author: Bastien Montagne
Date: Thu May 6 18:33:42 2021 +0200
Branches: master
https://developer.blender.org/rBaa8e058a596abd30d75987ca2cc11d8f8806512f
LibOverride: Do not preserve local overrides when their linked data disappear.
This is the opposite of previous code, which would keep those
'deprecated' overrides arround (often in a dedicated collection), when
they were detected as user-edited.
While this is a safe-ish way to (try to) preserve user-edited data, this
tends to add too much 'trash' data to production scenes, which cleaning
becomes a burden.
Note that user will get warnings in thos cases, and can always choose
not to save the current blend file and go fix the library issue instead.
===================================================================
M source/blender/blenkernel/intern/lib_override.c
===================================================================
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c
index 6c94eda2ee0..5bcd5338f8f 100644
--- a/source/blender/blenkernel/intern/lib_override.c
+++ b/source/blender/blenkernel/intern/lib_override.c
@@ -1068,6 +1068,7 @@ bool BKE_lib_override_library_resync(Main *bmain,
id->tag &= ~LIB_TAG_MISSING;
CLOG_INFO(&LOG, 2, "Old override %s is being deleted", id->name);
}
+#if 0
else {
/* Otherwise, keep them, user needs to decide whether what to do with them. */
BLI_assert((id->tag & LIB_TAG_DOIT) == 0);
@@ -1075,6 +1076,16 @@ bool BKE_lib_override_library_resync(Main *bmain,
id->flag |= LIB_LIB_OVERRIDE_RESYNC_LEFTOVER;
CLOG_INFO(&LOG, 2, "Old override %s is being kept around as it was user-edited", id->name);
}
+#else
+ else {
+ /* Delete them nevertheless, with fat warning, user needs to decide whether they want to
+ * save that version of the file (and accept the loss), or not. */
+ id->tag |= LIB_TAG_DOIT;
+ id->tag &= ~LIB_TAG_MISSING;
+ CLOG_WARN(
+ &LOG, "Old override %s is being deleted even though it was user-edited", id->name);
+ }
+#endif
}
}
FOREACH_MAIN_ID_END;
More information about the Bf-blender-cvs
mailing list