Only allow material assignment if we have available materials to assign. See #1222.

This commit is contained in:
Dion Moult
2021-01-26 20:01:16 +11:00
parent 447a7a0eb2
commit 4527d3a96e
3 changed files with 15 additions and 0 deletions
@@ -31,25 +31,33 @@ class Data:
@classmethod
def load_materials(cls):
cls.materials = {}
cls.load_element("IfcMaterial", cls.materials)
@classmethod
def load_constituents(cls):
cls.constituent_sets = {}
cls.constituents = {}
cls.load_element("IfcMaterialConstituent", cls.constituents)
cls.load_element("IfcMaterialConstituentSet", cls.constituent_sets)
@classmethod
def load_layers(cls):
cls.layer_sets = {}
cls.layers = {}
cls.load_element("IfcMaterialLayer", cls.layers)
cls.load_element("IfcMaterialLayerSet", cls.layer_sets)
@classmethod
def load_profiles(cls):
cls.profile_sets = {}
cls.profiles = {}
cls.load_element("IfcMaterialProfile", cls.profiles)
cls.load_element("IfcMaterialProfileSet", cls.profile_sets)
@classmethod
def load_lists(cls):
cls.lists = {}
cls.load_element("IfcMaterialList", cls.lists)
@classmethod