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
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-05-25 18:39:16 +0300
committerBastien Montagne <bastien@blender.org>2020-05-25 18:44:27 +0300
commit396bf6ca781fdfa79544c92f3d6bdff52c96fedf (patch)
tree68765eecfc5dd9d8d90e9e19d67e9fd037cdadba /source/blender/blenloader/intern/writefile.c
parent6d4dc22e17a7b2bb22495602a8f64cd6c00162d3 (diff)
Fix T73164: Undo does not always properly clear no-more-used library data.
Solution is actually very simple, and even makes existing code simpler: just write all lib IDs when storing and undo step. That way we do not have to guess which indirectly used library should be kept or not after an undo step reading.
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index a54085b3036..5550c4ab6c6 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -3917,6 +3917,11 @@ static void write_libraries(WriteData *wd, Main *main)
if (main->curlib && main->curlib->packedfile) {
found_one = true;
}
+ else if (wd->use_memfile) {
+ /* When writing undo step we always write all existing libraries, makes reading undo step
+ * much easier when dealing with purely indirectly used libraries. */
+ found_one = true;
+ }
else {
found_one = false;
while (!found_one && tot--) {