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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Inch <mythologylover75@gmail.com>2020-07-18 07:48:13 +0300
committerRyan Inch <mythologylover75@gmail.com>2020-07-18 07:48:13 +0300
commit0657e99e1f4ff01118591d19ffc740694869ba96 (patch)
tree3d8ca378cb04847af066ae0ffdd8dbca7eddbff2 /object_collection_manager
parent52edc5f41f231eac04415f3722a354ab5972b03a (diff)
Collection Manager: Fix remove issue. Task: T69577
Fix error when removing a collection with a child that is already linked to the parent collection.
Diffstat (limited to 'object_collection_manager')
-rw-r--r--object_collection_manager/__init__.py2
-rw-r--r--object_collection_manager/operators.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/object_collection_manager/__init__.py b/object_collection_manager/__init__.py
index e8b8f25c..1b33c549 100644
--- a/object_collection_manager/__init__.py
+++ b/object_collection_manager/__init__.py
@@ -22,7 +22,7 @@ bl_info = {
"name": "Collection Manager",
"description": "Manage collections and their objects",
"author": "Ryan Inch",
- "version": (2, 9, 3),
+ "version": (2, 9, 4),
"blender": (2, 80, 0),
"location": "View3D - Object Mode (Shortcut - M)",
"warning": '', # used for warning icon and text in addons panel
diff --git a/object_collection_manager/operators.py b/object_collection_manager/operators.py
index 54f9596b..77882c97 100644
--- a/object_collection_manager/operators.py
+++ b/object_collection_manager/operators.py
@@ -897,7 +897,8 @@ class CMRemoveCollectionOperator(Operator):
# link any subcollections of the to be deleted collection to it's parent
for subcollection in collection.children:
- parent_collection.children.link(subcollection)
+ if not subcollection.name in parent_collection.children:
+ parent_collection.children.link(subcollection)
# apply the stored view layer RTOs to the newly linked collections and their
# children