OverrideDelete - remove objects with X if they are not related to ifc

It was a bit frustraiting when you added a cube and can't just get rid of it with X hotkey 😅
This commit is contained in:
Andrej730
2023-04-20 17:15:17 +05:00
parent 046940f949
commit bfbfe17644
@@ -389,7 +389,10 @@ class OverrideDelete(bpy.types.Operator):
def _execute(self, context):
for obj in context.selected_objects:
tool.Geometry.delete_ifc_object(obj)
if tool.Ifc.get_entity(obj):
tool.Geometry.delete_ifc_object(obj)
else:
bpy.data.objects.remove(obj)
# Required otherwise gizmos are still visible
context.view_layer.objects.active = None
return {"FINISHED"}