Collection Manager: Fix remove issue. Task: T69577
Fix error when removing a collection with a child that is already linked to the parent collection.
This commit is contained in:
parent
52edc5f41f
commit
0657e99e1f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue