mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Show all available styles editing material styles #5525
Previously it would fail e.g. if IfcFillAreaStyle was already assigned to the material but UI was showing errors because enum items contained only surface styles.
This commit is contained in:
@@ -91,8 +91,12 @@ class MaterialsData:
|
||||
return results
|
||||
|
||||
@classmethod
|
||||
def styles(cls):
|
||||
return [(str(s.id()), s.Name or "Unnamed", "") for s in tool.Ifc.get().by_type("IfcSurfaceStyle") if s.Name]
|
||||
def styles(cls) -> list[tuple[str, str, str]]:
|
||||
return [
|
||||
(str(s.id()), style_name or "Unnamed", "")
|
||||
for s in tool.Ifc.get().by_type("IfcPresentationStyle")
|
||||
if (style_name := s.Name)
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def active_styles(cls):
|
||||
|
||||
Reference in New Issue
Block a user