Fix T69176: Outliner->BlenderFile->Delete not working on some objects.
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 27 Aug 2019 17:41:12 +0000 (19:41 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 27 Aug 2019 17:44:49 +0000 (19:44 +0200)
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.

source/blender/editors/space_outliner/outliner_tools.c

index 2c4a648da6582284819f60371cc1139be6c0d879..5f4a08be9ba68582a5f54e28603ba43421543165 100644 (file)
@@ -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;