This commit is contained in:
Dion Moult
2023-07-06 13:46:09 +10:00
parent f9173700a6
commit c18d96f0e3
@@ -415,11 +415,11 @@ class OverrideDelete(bpy.types.Operator):
if self.is_batch: if self.is_batch:
ifcopenshell.util.element.batch_remove_deep2(tool.Ifc.get()) ifcopenshell.util.element.batch_remove_deep2(tool.Ifc.get())
for obj in context.selected_objects: for obj in context.selected_objects:
pset = ifcopenshell.util.element.get_pset(tool.Ifc.get_entity(obj), "BBIM_Array") element = tool.Ifc.get_entity(obj)
if pset: if element:
self.report({"INFO"}, "This element is part of an IFC array, can't be deleted individually. Remove the array if you want to proceed.") if ifcopenshell.util.element.get_pset(element, "BBIM_Array"):
return {"FINISHED"} self.report({"INFO"}, "Elements that are part of an array cannot be deleted.")
if tool.Ifc.get_entity(obj): return {"FINISHED"}
tool.Geometry.delete_ifc_object(obj) tool.Geometry.delete_ifc_object(obj)
else: else:
bpy.data.objects.remove(obj) bpy.data.objects.remove(obj)