mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 14:33:28 +00:00
Merge pull request #5184 from csritter/v0.8.0
Adding --surface-colour in conversion settings to force the use of surface color instead of diffuse color. Issue #5075
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -67,7 +67,7 @@ void WaveFrontOBJSerializer::writeMaterial(const ifcopenshell::geometry::taxonom
|
||||
mtl_stream.stream << "newmtl " << material_name << "\n";
|
||||
|
||||
{
|
||||
auto& diffuse = style.diffuse.ccomponents();
|
||||
auto& diffuse = style.get_color().ccomponents();
|
||||
mtl_stream.stream << "Kd " << diffuse(0) << " " << diffuse(1) << " " << diffuse(2) << "\n";
|
||||
}
|
||||
if (style.specular) {
|
||||
|
||||
Reference in New Issue
Block a user