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:
authorCampbell Barton <ideasman42@gmail.com>2021-03-28 09:28:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-28 09:32:37 +0300
commit5b1980859ad20ad24a02589f4ad72a81a82df3ba (patch)
treecc7fca868ee15291d2398c5803325b058af3bfa2 /source/blender/editors/object
parenta9e7d503ddcdb72703c125a0b0dac28e513678c3 (diff)
Workaround T86992: Tagged ID deletion conflicts with freeing objects
da160dc32d1518dc3e59a8fb7995b59c88870444 exposed a bug in `BKE_id_multi_tagged_delete` causing a memory leak in soft-body that made `physics_softbody` test fail. Use a loop to remove ID's to keep tests working until T86992 is fixed.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index c0b31d6ed65..246c97c6078 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1997,7 +1997,15 @@ static int object_delete_exec(bContext *C, wmOperator *op)
}
if (tagged_count > 0) {
+#if 0 /* Temporary workaround for bug in tagged delete, see: T86992 */
BKE_id_multi_tagged_delete(bmain);
+#else
+ LISTBASE_FOREACH_MUTABLE (Object *, ob, &bmain->objects) {
+ if (ob->id.tag & LIB_TAG_DOIT) {
+ BKE_id_delete(bmain, &ob->id);
+ }
+ }
+#endif
}
BKE_reportf(op->reports, RPT_INFO, "Deleted %u object(s)", (changed_count + tagged_count));