Adding --surface-color in conversion settings to force the use of surface color instead of diffuse color. Issue #5075

This commit is contained in:
Cristian Ritter
2024-08-15 13:56:31 -03:00
parent 4348b9bff9
commit b5a61753a5
4 changed files with 25 additions and 5 deletions
+2 -2
View File
@@ -97,9 +97,9 @@ int GltfSerializer::writeMaterial(const ifcopenshell::geometry::taxonomy::style:
std::array<double, 4> base;
base.fill(1.0);
if (style->diffuse) {
if (style->get_color()) {
for (int i = 0; i < 3; ++i) {
base[i] = style->diffuse.ccomponents()(i);
base[i] = style->get_color().ccomponents()(i);
}
}
if (style->transparency == style->transparency) {