Give user additional feedback when trying to duplicate an IFCproject and Drawing. Also deselects the object to prevent inadvertently moving it.

This commit is contained in:
Ryan Schultz
2024-01-23 08:04:12 -06:00
parent a47a9ce0ce
commit 3a14b51fd3
@@ -767,8 +767,12 @@ class OverrideDuplicateMove(bpy.types.Operator):
element = tool.Ifc.get_entity(obj)
if element:
if element.is_a("IfcAnnotation") and element.ObjectType == "DRAWING":
self.report({'INFO'}, "Did not duplicate. Duplicate drawings through the Drawings and Documents UI.")
obj.select_set(False)
continue # For now, don't copy drawings until we stabilise a bit more. It's tricky.
elif element.is_a("IfcProject"):
self.report({'INFO'}, "Did not duplicate. IFC can only have one project.")
obj.select_set(False)
continue # Only one IfcProject is allowed.
linked_non_ifc_object = linked and not element