mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 04:11:00 +00:00
Add material name in gltF
This commit is contained in:
@@ -106,7 +106,7 @@ int GltfSerializer::writeMaterial(const ifcopenshell::geometry::taxonomy::style:
|
|||||||
base[3] = 1. - style->transparency;
|
base[3] = 1. - style->transparency;
|
||||||
}
|
}
|
||||||
|
|
||||||
json_["materials"].push_back({ {"doubleSided", true}, {"pbrMetallicRoughness", {{"baseColorFactor", base}, {"metallicFactor", 0}}} });
|
json_["materials"].push_back({ {"name", style->name}, {"doubleSided", true}, {"pbrMetallicRoughness", {{"baseColorFactor", base}, {"metallicFactor", 0}}}});
|
||||||
|
|
||||||
if (style->transparency == style->transparency && style->transparency > 1.e-9) {
|
if (style->transparency == style->transparency && style->transparency > 1.e-9) {
|
||||||
json_["materials"].back()["alphaMode"] = "BLEND";
|
json_["materials"].back()["alphaMode"] = "BLEND";
|
||||||
|
|||||||
Reference in New Issue
Block a user