From 9571146065082339b5b254a137f5ef9b03e02b51 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Wed, 1 Nov 2023 22:48:31 +1100 Subject: [PATCH] Fix #3951. `mats` selector now supports IfcMaterialList. --- src/ifcopenshell-python/ifcopenshell/util/element.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py index f3654407d6..11d222d318 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/element.py +++ b/src/ifcopenshell-python/ifcopenshell/util/element.py @@ -435,6 +435,8 @@ def get_materials(element, should_inherit=True): return [p.Material for p in material.MaterialProfiles] elif material.is_a("IfcMaterialConstituentSet"): return [c.Material for c in material.MaterialConstituents] + elif material.is_a("IfcMaterialList"): + return list(material.Materials) def get_styles(element):