[Bf-blender-cvs] [18fbcaf7b92] master: Cleanup: rename BKE_collection_{free => free_data}
Campbell Barton
noreply at git.blender.org
Wed Aug 11 08:11:07 CEST 2021
Commit: 18fbcaf7b9273cc4a7e153fea60a53fec956d600
Author: Campbell Barton
Date: Wed Aug 11 16:09:23 2021 +1000
Branches: master
https://developer.blender.org/rB18fbcaf7b9273cc4a7e153fea60a53fec956d600
Cleanup: rename BKE_collection_{free => free_data}
This function doesn't free the collection, only it's memory.
===================================================================
M source/blender/blenkernel/BKE_collection.h
M source/blender/blenkernel/intern/collection.c
M source/blender/blenkernel/intern/scene.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_collection.h b/source/blender/blenkernel/BKE_collection.h
index 8b8d0f7b107..2c7143be60e 100644
--- a/source/blender/blenkernel/BKE_collection.h
+++ b/source/blender/blenkernel/BKE_collection.h
@@ -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,
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index dbcd80fe065..b62e33ff564 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -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);
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 9dab276af95..c55185c0f2a 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -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;
}
More information about the Bf-blender-cvs
mailing list