mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 04:59:52 +00:00
checking if diffuse has value, if not, use surface
Signed-off-by: Cristian Ritter <cristian_ritter@hotmail.com>
This commit is contained in:
@@ -327,7 +327,7 @@ typedef item const* ptr;
|
|||||||
style(const std::string& name) : name(name), specularity(std::numeric_limits<double>::quiet_NaN()), transparency(std::numeric_limits<double>::quiet_NaN()), use_surface_color(false) {}
|
style(const std::string& name) : name(name), specularity(std::numeric_limits<double>::quiet_NaN()), transparency(std::numeric_limits<double>::quiet_NaN()), use_surface_color(false) {}
|
||||||
|
|
||||||
colour get_color() const {
|
colour get_color() const {
|
||||||
if (use_surface_color && surface) {
|
if ((use_surface_color && surface) || !diffuse) {
|
||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
return diffuse;
|
return diffuse;
|
||||||
|
|||||||
Reference in New Issue
Block a user