Fixed duplicated objects collections issue after 586707dd2

Duplicated objects were not able to have their own collection after 586707dd2

Also fixed bim test
FAILED test/bim/test_feature.py::test_copy_a_storey - AssertionError: assert 'IfcBuildingStorey/My Storey.001' in ['IfcBuildingStorey/My Storey']
This commit is contained in:
Andrej730
2023-06-20 19:42:31 +05:00
parent 6b0200e1f0
commit a7283ca538
@@ -561,6 +561,8 @@ class OverrideDuplicateMove(bpy.types.Operator):
collection.objects.link(new_obj)
obj.select_set(False)
new_obj.select_set(True)
# clear object's collection so it will be able to have it's own
new_obj.BIMObjectProperties.collection = None
# Copy the actual class
new = blenderbim.core.root.copy_class(tool.Ifc, tool.Collector, tool.Geometry, tool.Root, obj=new_obj)
if new: