diff --git a/src/bonsai/bonsai/tool/material.py b/src/bonsai/bonsai/tool/material.py index 695759227c..308658737f 100644 --- a/src/bonsai/bonsai/tool/material.py +++ b/src/bonsai/bonsai/tool/material.py @@ -331,6 +331,10 @@ class Material(bonsai.core.tool.Material): @classmethod def get_style(cls, material: ifcopenshell.entity_instance) -> Union[ifcopenshell.entity_instance, None]: + if not material.is_a("IfcMaterial"): + # material may also be an IfcMaterialConstituentSet / IfcMaterialLayerSet / + # IfcMaterialProfileSet / IfcMaterialList, none of which have HasRepresentation. + return None for material_representation in material.HasRepresentation: for representation in material_representation.Representations: for item in representation.Items: