Cleanup: rename BKE_collection_{free => free_data}

This function doesn't free the collection, only it's memory.
This commit is contained in:
Campbell Barton 2021-08-11 16:09:23 +10:00
parent 2f39f7f815
commit 18fbcaf7b9
3 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ void BKE_collection_add_from_collection(struct Main *bmain,
struct Scene *scene,
struct Collection *collection_src,
struct Collection *collection_dst);
void BKE_collection_free(struct Collection *collection);
void BKE_collection_free_data(struct Collection *collection);
bool BKE_collection_delete(struct Main *bmain, struct Collection *collection, bool hierarchy);
struct Collection *BKE_collection_duplicate(struct Main *bmain,

View File

@ -508,7 +508,7 @@ void BKE_collection_add_from_collection(Main *bmain,
* \{ */
/** Free (or release) any data used by this collection (does not free the collection itself). */
void BKE_collection_free(Collection *collection)
void BKE_collection_free_data(Collection *collection)
{
BKE_libblock_free_data(&collection->id, false);
collection_free_data(&collection->id);

View File

@ -445,7 +445,7 @@ static void scene_free_data(ID *id)
* for objects directly in the master collection? then other
* collections in the scene need to do it too? */
if (scene->master_collection) {
BKE_collection_free(scene->master_collection);
BKE_collection_free_data(scene->master_collection);
MEM_freeN(scene->master_collection);
scene->master_collection = NULL;
}