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:
authorJacques Lucke <jacques@blender.org>2022-08-19 17:25:41 +0300
committerJacques Lucke <jacques@blender.org>2022-08-19 17:25:41 +0300
commit35a41a49a8e0c77e3efce80609fb8af9b20e9768 (patch)
tree1a7087e3bc696afe326e8851a6d2f0a08ec74347 /source/blender/editors/space_outliner
parente4f1d719080ab15f4a33034a1eccacace4600b04 (diff)
parent16084066009ed954761b7652edd926c00733a437 (diff)
Merge branch 'blender-v3.3-release'
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index be0b011345f..4c2ec5508e9 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -2341,6 +2341,17 @@ static TreeTraversalAction outliner_find_objects_to_delete(TreeElement *te, void
return TRAVERSE_SKIP_CHILDS;
}
+ /* Do not allow to delete children objects of an override collection. */
+ TreeElement *te_parent = te->parent;
+ if (outliner_is_collection_tree_element(te_parent)) {
+ TreeStoreElem *tselem_parent = TREESTORE(te_parent);
+ ID *id_parent = tselem_parent->id;
+ BLI_assert(GS(id_parent->name) == ID_GR);
+ if (ID_IS_OVERRIDE_LIBRARY_REAL(id_parent)) {
+ return TRAVERSE_SKIP_CHILDS;
+ }
+ }
+
ID *id = tselem->id;
if (ID_IS_OVERRIDE_LIBRARY_REAL(id)) {