mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
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:
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user