mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix fetching layers in item mode. Apparently the inverse name changes slightly.
Maybe because an item has a single layer whereas the shape is meant to have many layers?
This commit is contained in:
@@ -49,6 +49,8 @@ class LayersData:
|
||||
return []
|
||||
results = dict()
|
||||
shape = tool.Ifc.get().by_id(data.BIMMeshProperties.ifc_definition_id)
|
||||
for inverse in shape.LayerAssignments:
|
||||
for inverse in getattr(shape, "LayerAssignments", []):
|
||||
results[inverse.id()] = inverse.Name or "Unnamed"
|
||||
for inverse in getattr(shape, "LayerAssignment", []):
|
||||
results[inverse.id()] = inverse.Name or "Unnamed"
|
||||
return results
|
||||
|
||||
Reference in New Issue
Block a user