api.project.append_asset Material Layer orphan fix

Fixes typo introduced in b4740b6 where `element in MATERIAL_SETS` should
have been `element.is_a() in MATERIAL_SETS`. This resulted in
deduplication of layersets, but not of the layers themselves.
This commit is contained in:
Bruno Postle
2026-01-04 10:12:16 +00:00
parent cb08191083
commit db623f4e73
@@ -264,7 +264,7 @@ class Usecase:
name = element.Name
return next((e for e in self.file.by_type("IfcMaterial") if e.Name == name), None)
elif element in MATERIAL_SETS:
elif element.is_a() in MATERIAL_SETS:
ifc_class = element.is_a()
name_attr = "LayerSetName" if ifc_class == "IfcMaterialLayerSet" else "Name"
material_set_name = getattr(element, name_attr)