Unlink only from relevant collections (#1467)

Objects may be linked to non ifc related collections, so keep those links whatever.
This commit is contained in:
s-leger
2021-05-17 01:35:14 +02:00
committed by GitHub
parent 0f55a98b2f
commit 5b02d3214d
@@ -45,7 +45,8 @@ class AssignObject(bpy.types.Operator):
self.remove_collection(collection, spatial_collection)
else:
for collection in related_object.users_collection:
collection.objects.unlink(related_object)
if collection.name.startswith("Ifc"):
collection.objects.unlink(related_object)
relating_collection.objects.link(related_object)
return {"FINISHED"}