Use first layer/profile from the set to pick up the material #5238

As currently we do not support multilayer/profile geometry and therefore we can't correctly represent them when they have multiple styles. As a workaround we'll use the material/style from the first layer and apply it to the entire object.
This commit is contained in:
Andrej730
2024-08-29 17:21:18 +05:00
parent 4a59b30f1b
commit f3ab214752
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -582,6 +582,7 @@ class Geometry(bonsai.core.tool.Geometry):
settings = ifcopenshell.geom.settings()
settings.set("weld-vertices", True)
settings.set("apply-default-materials", False)
settings.set("layerset-first", True)
settings.set("keep-bounding-boxes", True)
context = representation.ContextOfItems
+1
View File
@@ -568,6 +568,7 @@ class Loader(bonsai.core.tool.Loader):
settings.set("context-ids", [context.id()])
settings.set("apply-default-materials", False)
settings.set("keep-bounding-boxes", True)
settings.set("layerset-first", True)
if is_gross:
settings.set("disable-opening-subtractions", True)
results.append(settings)