mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-20 12:12:15 +00:00
replacing diffuse to get_color method
This commit is contained in:
@@ -149,7 +149,7 @@ IfcGeom::Representation::Serialization::Serialization(const BRep& brep)
|
||||
int sid = -1;
|
||||
|
||||
if (it->hasStyle()) {
|
||||
const auto& clr = it->Style().diffuse.ccomponents();
|
||||
const auto& clr = it->Style().get_color().ccomponents();
|
||||
surface_styles_.push_back(clr(0));
|
||||
surface_styles_.push_back(clr(1));
|
||||
surface_styles_.push_back(clr(2));
|
||||
|
||||
@@ -89,6 +89,10 @@ void IfcGeom::set_default_style_file(const std::string& json_file) {
|
||||
boost::optional<pt::ptree&> diffuse = material.get_child_optional("diffuse");
|
||||
default_materials[name]->diffuse = read_colour_component(diffuse);
|
||||
|
||||
// @todo Is it necessary to get the surface too?
|
||||
// boost::optional<pt::ptree&> surface = material.get_child_optional("surface");
|
||||
// default_materials[name]->surface = read_colour_component(surface);
|
||||
|
||||
boost::optional<pt::ptree&> specular = material.get_child_optional("specular");
|
||||
default_materials[name]->specular = read_colour_component(specular);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user