[Bf-blender-cvs] [9bda62c136a] master: Fix T69176: Outliner->BlenderFile->Delete not working on some objects.

Bastien Montagne noreply at git.blender.org
Tue Aug 27 19:45:14 CEST 2019


Commit: 9bda62c136a5a2b799c43afefdf13c5f63e2e1e7
Author: Bastien Montagne
Date:   Tue Aug 27 19:41:12 2019 +0200
Branches: master
https://developer.blender.org/rB9bda62c136a5a2b799c43afefdf13c5f63e2e1e7

Fix T69176: Outliner->BlenderFile->Delete not working on some objects.

Object not referenced in any scene would not be deletable with previous
code... that was fine in 2.7x since it was not supposed to happen, but
now we can just use the nuclear `BKE_id_delete` for objects as well,
will take care of properly unlinking everything as needed.

===================================================================

M	source/blender/editors/space_outliner/outliner_tools.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 2c4a648da65..5f4a08be9ba 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -680,7 +680,7 @@ static void object_delete_cb(bContext *C,
     if (ob == CTX_data_edit_object(C)) {
       ED_object_editmode_exit(C, EM_FREEDATA);
     }
-    ED_object_base_free_and_unlink(CTX_data_main(C), scene, ob);
+    BKE_id_delete(bmain, ob);
     /* leave for ED_outliner_id_unref to handle */
 #if 0
     te->directdata = NULL;



More information about the Bf-blender-cvs mailing list