mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 16:22:53 +00:00
Fix possible crash on bim.split_along_edge #7394
This commit is contained in:
@@ -598,7 +598,11 @@ class UpdateRepresentation(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
tool.Material.ensure_material_unassigned([element_type])
|
tool.Material.ensure_material_unassigned([element_type])
|
||||||
ifcopenshell.api.material.unassign_material(self.file, products=[product])
|
ifcopenshell.api.material.unassign_material(self.file, products=[product])
|
||||||
tool.Material.ensure_material_unassigned([product])
|
tool.Material.ensure_material_unassigned([product])
|
||||||
data = obj.data # Required after ensure_material_unassigned
|
|
||||||
|
# Required after ensure_material_unassigned, since data might be recreated.
|
||||||
|
data = obj.data
|
||||||
|
assert tool.Geometry.is_data_supported_for_adding_representation(data)
|
||||||
|
mprops = tool.Geometry.get_mesh_props(data)
|
||||||
else:
|
else:
|
||||||
# These objects are parametrically based on an axis and should not be modified as a mesh
|
# These objects are parametrically based on an axis and should not be modified as a mesh
|
||||||
if extrusion := tool.Model.get_extrusion(old_representation):
|
if extrusion := tool.Model.get_extrusion(old_representation):
|
||||||
|
|||||||
Reference in New Issue
Block a user