diff --git a/src/blenderbim/blenderbim/bim/module/geometry/operator.py b/src/blenderbim/blenderbim/bim/module/geometry/operator.py index 21e998bc67..d3ddc4222f 100644 --- a/src/blenderbim/blenderbim/bim/module/geometry/operator.py +++ b/src/blenderbim/blenderbim/bim/module/geometry/operator.py @@ -272,7 +272,8 @@ class UpdateRepresentation(bpy.types.Operator, Operator): if self.ifc_representation_class == "IfcTessellatedFaceSet": # We are explicitly casting to a tessellation, so remove all parametric materials. element_type = ifcopenshell.util.element.get_type(product) - ifcopenshell.api.run("material.unassign_material", tool.Ifc.get(), product=element_type) + if element_type: # Some invalid IFCs use material sets without a type. + ifcopenshell.api.run("material.unassign_material", tool.Ifc.get(), product=element_type) ifcopenshell.api.run("material.unassign_material", tool.Ifc.get(), product=product) else: # These objects are parametrically based on an axis and should not be modified as a mesh