mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Fix bug where materials weren't created when importing assets from a library
This commit is contained in:
@@ -74,9 +74,7 @@ def get_material(element, should_skip_usage=False):
|
||||
return relationship.RelatingMaterial
|
||||
relating_type = get_type(element)
|
||||
if hasattr(relating_type, "HasAssociations") and relating_type.HasAssociations:
|
||||
for relationship in relating_type.HasAssociations:
|
||||
if relationship.is_a("IfcRelAssociatesMaterial"):
|
||||
return relationship.RelatingMaterial
|
||||
return get_material(relating_type, should_skip_usage)
|
||||
|
||||
|
||||
def get_container(element):
|
||||
|
||||
Reference in New Issue
Block a user