Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-08 01:29:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-08 01:50:00 +0300
commit8f817de0cbef41dac81e6c7665ada509c3fe2988 (patch)
tree0802c3287116ce0bf600adc4bed8cba31cfc97b1 /source/blender/blenkernel/intern/collection.c
parente68ac2827dd4f8ad346011a8a408b342e2718707 (diff)
Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f7e we agree its best to change the convention. Names now mostly follow RNA. Some exceptions: - Use 'nodetrees' instead of 'nodegroups' since the struct is called NodeTree. - Use 'gpencils' instead of 'grease_pencil' since 'gpencil' is a common abbreviation in the C code. Other exceptions: - Leave 'wm' as it's a list of one. - Leave 'ipo' as is for versioning.
Diffstat (limited to 'source/blender/blenkernel/intern/collection.c')
-rw-r--r--source/blender/blenkernel/intern/collection.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index beefe4b5ac2..8a71c0c2e10 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -517,7 +517,7 @@ static bool collection_object_cyclic_check_internal(Object *object, Collection *
bool BKE_collection_object_cyclic_check(Main *bmain, Object *object, Collection *collection)
{
/* first flag all collections */
- BKE_main_id_tag_listbase(&bmain->collection, LIB_TAG_DOIT, true);
+ BKE_main_id_tag_listbase(&bmain->collections, LIB_TAG_DOIT, true);
return collection_object_cyclic_check_internal(object, collection);
}
@@ -548,7 +548,7 @@ Collection *BKE_collection_object_find(Main *bmain, Collection *collection, Obje
if (collection)
collection = collection->id.next;
else
- collection = bmain->collection.first;
+ collection = bmain->collections.first;
while (collection) {
if (BKE_collection_has_object(collection, ob))
@@ -737,11 +737,11 @@ static void collection_object_remove_nulls(Collection *collection)
void BKE_collections_object_remove_nulls(Main *bmain)
{
- for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
+ for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
collection_object_remove_nulls(scene->master_collection);
}
- for (Collection *collection = bmain->collection.first; collection; collection = collection->id.next) {
+ for (Collection *collection = bmain->collections.first; collection; collection = collection->id.next) {
collection_object_remove_nulls(collection);
}
}
@@ -785,17 +785,17 @@ void BKE_collections_child_remove_nulls(Main *bmain, Collection *collection)
* otherwise we can miss some cases...
* Also, master collections are not in bmain, so we also need to loop over scenes.
*/
- for (collection = bmain->collection.first; collection != NULL; collection = collection->id.next) {
+ for (collection = bmain->collections.first; collection != NULL; collection = collection->id.next) {
collection_null_children_remove(collection);
}
- for (Scene *scene = bmain->scene.first; scene != NULL; scene = scene->id.next) {
+ for (Scene *scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) {
collection_null_children_remove(BKE_collection_master(scene));
}
- for (collection = bmain->collection.first; collection != NULL; collection = collection->id.next) {
+ for (collection = bmain->collections.first; collection != NULL; collection = collection->id.next) {
collection_missing_parents_remove(collection);
}
- for (Scene *scene = bmain->scene.first; scene != NULL; scene = scene->id.next) {
+ for (Scene *scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) {
collection_missing_parents_remove(BKE_collection_master(scene));
}
}