mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-06 04:16:25 +00:00
Fix #3066. Regression crash when deleting openings.
This commit is contained in:
@@ -84,6 +84,7 @@ class Geometry(blenderbim.core.tool.Geometry):
|
|||||||
bpy.data.collections.remove(obj.users_collection[0])
|
bpy.data.collections.remove(obj.users_collection[0])
|
||||||
if getattr(element, "FillsVoids", None):
|
if getattr(element, "FillsVoids", None):
|
||||||
bpy.ops.bim.remove_filling(filling=element.id())
|
bpy.ops.bim.remove_filling(filling=element.id())
|
||||||
|
|
||||||
if element.is_a("IfcOpeningElement"):
|
if element.is_a("IfcOpeningElement"):
|
||||||
if element.HasFillings:
|
if element.HasFillings:
|
||||||
for rel in element.HasFillings:
|
for rel in element.HasFillings:
|
||||||
@@ -97,7 +98,7 @@ class Geometry(blenderbim.core.tool.Geometry):
|
|||||||
bpy.ops.bim.remove_opening(opening_id=rel.RelatedOpeningElement.id())
|
bpy.ops.bim.remove_opening(opening_id=rel.RelatedOpeningElement.id())
|
||||||
for port in ifcopenshell.util.system.get_ports(element):
|
for port in ifcopenshell.util.system.get_ports(element):
|
||||||
blenderbim.core.system.remove_port(tool.Ifc, tool.System, port=port)
|
blenderbim.core.system.remove_port(tool.Ifc, tool.System, port=port)
|
||||||
ifcopenshell.api.run("root.remove_product", tool.Ifc.get(), product=element)
|
ifcopenshell.api.run("root.remove_product", tool.Ifc.get(), product=element)
|
||||||
try:
|
try:
|
||||||
obj.name
|
obj.name
|
||||||
bpy.data.objects.remove(obj)
|
bpy.data.objects.remove(obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user