Commit: 75b8c4fc18997851620f4abd491f7c418f6666ee
Author: Bastien Montagne
Date: Fri Mar 25 11:38:38 2022 +0100
Branches: master
https://developer.blender.org/rB75b8c4fc18997851620f4abd491f7c418f6666ee
LibOverride: Prevent some more potential modification of overridden collections.
===================================================================
M source/blender/blenkernel/intern/collection.c
===================================================================
diff --git a/source/blender/blenkernel/intern/collection.c
b/source/blender/blenkernel/intern/collection.c
index 891145b47c9..bdaea487cfb 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -432,7 +432,8 @@ void BKE_collection_add_from_object(Main *bmain,
bool is_instantiated = false;
FOREACH_SCENE_COLLECTION_BEGIN (scene, collection) {
- if (!ID_IS_LINKED(collection) && BKE_collection_has_object(collection,
ob_src)) {
+ if (!ID_IS_LINKED(collection) && !ID_IS_OVERRIDABLE_LIBRARY(collection) &&
+ BKE_collection_has_object(collection, ob_src)) {
collection_child_add(collection, collection_dst, 0, true);
is_instantiated = true;
}
@@ -454,7 +455,8 @@ void BKE_collection_add_from_collection(Main *bmain,
bool is_instantiated = false;
FOREACH_SCENE_COLLECTION_BEGIN (scene, collection) {
- if (!ID_IS_LINKED(collection) && collection_find_child(collection,
collection_src)) {
+ if (!ID_IS_LINKED(collection) && !ID_IS_OVERRIDABLE_LIBRARY(collection) &&
+ collection_find_child(collection, collection_src)) {
collection_child_add(collection, collection_dst, 0, true);
is_instantiated = true;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs