mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 06:32:09 +00:00
Materials UI - support showing styles assigned with IfcPresentationStyleAssignment
This commit is contained in:
@@ -131,7 +131,12 @@ class MaterialsData:
|
|||||||
for item in representation.Items:
|
for item in representation.Items:
|
||||||
if not item.is_a("IfcStyledItem"):
|
if not item.is_a("IfcStyledItem"):
|
||||||
continue
|
continue
|
||||||
for style in item.Styles:
|
current_styles: list[ifcopenshell.entity_instance] = list(item.Styles)
|
||||||
|
while current_styles:
|
||||||
|
style = current_styles.pop()
|
||||||
|
if style.is_a("IfcPresentationStyleAssignment"):
|
||||||
|
current_styles.extend(style.Styles)
|
||||||
|
continue
|
||||||
results.append(
|
results.append(
|
||||||
{
|
{
|
||||||
"context_type": context.ContextType,
|
"context_type": context.ContextType,
|
||||||
|
|||||||
Reference in New Issue
Block a user