mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 13:46:54 +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):
|
def _execute(self, context):
|
||||||
for obj in context.selected_objects:
|
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
|
# Required otherwise gizmos are still visible
|
||||||
context.view_layer.objects.active = None
|
context.view_layer.objects.active = None
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|||||||
Reference in New Issue
Block a user