From 2ea12bde8990413e2341dfe63b0b98cd8434f460 Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 25 Feb 2020 18:24:52 +0300 Subject: [PATCH] Debug for material colors with OCCT-7.4.0 --- src/Material/Material_Model.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Material/Material_Model.cxx b/src/Material/Material_Model.cxx index 5ab3d6e35..869e40dfb 100644 --- a/src/Material/Material_Model.cxx +++ b/src/Material/Material_Model.cxx @@ -401,6 +401,11 @@ QColor Material_Model::color( ReflectionType type ) const QColor value; if ( type >= 0 && type < 4 ) value = myReflection[ type ].color; +#if OCC_VERSION_LARGE >= 0x07040000 + // Compatibility with previous OCCT versions, set for non-physical materials always white color + if ( !isPhysical() ) + value = Qt::white; +#endif return value; } -- 2.39.2