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:
authorBastien Montagne <bastien@blender.org>2022-05-19 17:54:10 +0300
committerBastien Montagne <bastien@blender.org>2022-05-19 17:54:10 +0300
commit436a7ee65176090ee44de6dbf38d4eb512ffaf9e (patch)
tree9a92fa46080e44dee8447abd54aa2dd9d057f9b3 /source/blender/blenkernel
parenteb13072399559de0a5b38b874b3a00850e1bf483 (diff)
parent2d5b91d6a0f7470dd475721ea038c061513090d7 (diff)
Merge branch 'blender-v3.2-release'
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/collection.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 0edc16e822c..76c6dc1d5e7 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -1172,14 +1172,21 @@ static bool scene_collections_object_remove(
{
bool removed = false;
+ /* If given object is removed from all collections in given scene, then it can also be safely
+ * removed from rigidbody world for given scene. */
if (collection_skip == NULL) {
BKE_scene_remove_rigidbody_object(bmain, scene, ob, free_us);
}
FOREACH_SCENE_COLLECTION_BEGIN (scene, collection) {
- if (collection != collection_skip) {
- removed |= collection_object_remove(bmain, collection, ob, free_us);
+ if (ID_IS_LINKED(collection) || ID_IS_OVERRIDE_LIBRARY(collection)) {
+ continue;
+ }
+ if (collection == collection_skip) {
+ continue;
}
+
+ removed |= collection_object_remove(bmain, collection, ob, free_us);
}
FOREACH_SCENE_COLLECTION_END;