mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 15:16:23 +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 []
|
return []
|
||||||
results = dict()
|
results = dict()
|
||||||
shape = tool.Ifc.get().by_id(data.BIMMeshProperties.ifc_definition_id)
|
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"
|
results[inverse.id()] = inverse.Name or "Unnamed"
|
||||||
return results
|
return results
|
||||||
|
|||||||
Reference in New Issue
Block a user