Fix bugs where adding types without a material was broken. See #1513.

This commit is contained in:
Dion Moult
2021-06-06 09:57:50 +10:00
parent e0cbbf2eb7
commit a8dc734351
4 changed files with 5 additions and 2 deletions
@@ -84,6 +84,8 @@ class Usecase:
def map_material_usages(self):
type_material = ifcopenshell.util.element.get_material(self.settings["relating_type"])
if not type_material:
return
if type_material.is_a("IfcMaterialLayerSet"):
ifcopenshell.api.run(
"material.assign_material",