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:
authorYimingWu <xp8110@outlook.com>2021-07-04 08:23:52 +0300
committerYimingWu <xp8110@outlook.com>2021-07-04 08:23:52 +0300
commit442f269a72e8f07393fd246f642e210171a1c9bc (patch)
treeecab515215209172245f7709a0c07c1b14dab96c /source/blender/blenkernel/intern/collection.c
parent87dae08dd3f2a80dd208576b130cabaca21c9912 (diff)
parent2d146b61d8583ec7169c5c04263d475a542b06ce (diff)
Merge remote-tracking branch 'origin/master' into lineart-bvh
Diffstat (limited to 'source/blender/blenkernel/intern/collection.c')
-rw-r--r--source/blender/blenkernel/intern/collection.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index aa51ee0017e..24266dc6bea 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -79,7 +79,8 @@ static bool collection_object_remove(Main *bmain,
static CollectionChild *collection_find_child(Collection *parent, Collection *collection);
static CollectionParent *collection_find_parent(Collection *child, Collection *collection);
-static bool collection_find_child_recursive(Collection *parent, Collection *collection);
+static bool collection_find_child_recursive(const Collection *parent,
+ const Collection *collection);
/** \} */
@@ -710,7 +711,7 @@ Collection *BKE_collection_duplicate(Main *bmain,
* unless its duplication is a sub-process of another one. */
collection_new->id.tag &= ~LIB_TAG_NEW;
- /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW.*/
+ /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW. */
BKE_libblock_relink_to_newid(&collection_new->id);
#ifndef NDEBUG
@@ -1458,7 +1459,7 @@ bool BKE_collection_cycle_find(Collection *new_ancestor, Collection *collection)
}
/* Find possible objects in collection or its children, that would instantiate the given ancestor
- * collection (that would also make a fully invalid cycle of dependencies) .*/
+ * collection (that would also make a fully invalid cycle of dependencies). */
return collection_instance_find_recursive(collection, new_ancestor);
}
@@ -1521,9 +1522,9 @@ static CollectionChild *collection_find_child(Collection *parent, Collection *co
return BLI_findptr(&parent->children, collection, offsetof(CollectionChild, collection));
}
-static bool collection_find_child_recursive(Collection *parent, Collection *collection)
+static bool collection_find_child_recursive(const Collection *parent, const Collection *collection)
{
- LISTBASE_FOREACH (CollectionChild *, child, &parent->children) {
+ LISTBASE_FOREACH (const CollectionChild *, child, &parent->children) {
if (child->collection == collection) {
return true;
}
@@ -1536,7 +1537,7 @@ static bool collection_find_child_recursive(Collection *parent, Collection *coll
return false;
}
-bool BKE_collection_has_collection(Collection *parent, Collection *collection)
+bool BKE_collection_has_collection(const Collection *parent, const Collection *collection)
{
return collection_find_child_recursive(parent, collection);
}