mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
fix error in data.py occurring if object has no material
This commit is contained in:
@@ -323,6 +323,6 @@ class ObjectMaterialData:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def active_material_constituents(cls):
|
def active_material_constituents(cls):
|
||||||
material = cls.material
|
material = cls.material
|
||||||
if not material.is_a("IfcMaterialConstituentSet"):
|
if not cls.material or not material.is_a("IfcMaterialConstituentSet"):
|
||||||
return []
|
return []
|
||||||
return [m.Name for m in material.MaterialConstituents if m.Name]
|
return [m.Name for m in material.MaterialConstituents if m.Name]
|
||||||
|
|||||||
Reference in New Issue
Block a user