mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +00:00
This commit is contained in:
@@ -432,8 +432,11 @@ void XmlSerializer::finalize() {
|
|||||||
emitted_materials.insert(mat);
|
emitted_materials.insert(mat);
|
||||||
ptree node;
|
ptree node;
|
||||||
node.put("<xmlattr>.id", qualify_unrooted_instance(mat));
|
node.put("<xmlattr>.id", qualify_unrooted_instance(mat));
|
||||||
if (mat->as<IfcMaterialLayerSetUsage>()) {
|
if (mat->as<IfcMaterialLayerSetUsage>() || mat->as<IfcMaterialLayerSet>()) {
|
||||||
IfcMaterialLayerSet* layerset = mat->as<IfcMaterialLayerSetUsage>()->ForLayerSet();
|
IfcMaterialLayerSet* layerset = mat->as<IfcMaterialLayerSet>();
|
||||||
|
if (!layerset) {
|
||||||
|
layerset = mat->as<IfcMaterialLayerSetUsage>()->ForLayerSet();
|
||||||
|
}
|
||||||
if (layerset->hasLayerSetName()) {
|
if (layerset->hasLayerSetName()) {
|
||||||
node.put("<xmlattr>.LayerSetName", layerset->LayerSetName());
|
node.put("<xmlattr>.LayerSetName", layerset->LayerSetName());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user