Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/collection.c
| Show First 20 Lines • Show All 678 Lines • ▼ Show 20 Lines | static bool collection_object_remove(Main *bmain, | ||||
| if (cob == NULL) { | if (cob == NULL) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| BLI_freelinkN(&collection->gobject, cob); | BLI_freelinkN(&collection->gobject, cob); | ||||
| BKE_collection_object_cache_free(collection); | BKE_collection_object_cache_free(collection); | ||||
| if (free_us) { | if (free_us) { | ||||
| /* This is important, so edit-mode data is flushed, while we could only flush the data | |||||
| * instead of exiting, this currently causes a crash see T72667. */ | |||||
| BKE_object_editmode_exit(bmain, ob); | |||||
| BKE_id_free_us(bmain, ob); | BKE_id_free_us(bmain, ob); | ||||
| } | } | ||||
| else { | else { | ||||
| id_us_min(&ob->id); | id_us_min(&ob->id); | ||||
| } | } | ||||
| collection_tag_update_parent_recursive(bmain, collection, ID_RECALC_COPY_ON_WRITE); | collection_tag_update_parent_recursive(bmain, collection, ID_RECALC_COPY_ON_WRITE); | ||||
| ▲ Show 20 Lines • Show All 805 Lines • Show Last 20 Lines | |||||