From d9a11c30ef93b6cbc5b0d370ec0cd1997f442616 Mon Sep 17 00:00:00 2001 From: Maurice Date: Mon, 28 Jun 2021 13:01:31 +0000 Subject: [PATCH] 3d viewer fix for 3d single material object Diffuse Only opacity --- 3d-viewer/3d_rendering/legacy/3d_model.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/3d-viewer/3d_rendering/legacy/3d_model.cpp b/3d-viewer/3d_rendering/legacy/3d_model.cpp index 30e00c8fa9..6562449d5f 100644 --- a/3d-viewer/3d_rendering/legacy/3d_model.cpp +++ b/3d-viewer/3d_rendering/legacy/3d_model.cpp @@ -149,7 +149,8 @@ MODEL_3D::MODEL_3D( const S3DMODEL& a3DModel, MATERIAL_MODE aMaterialMode ) auto& mesh_group = mesh_groups[mesh.m_MaterialIdx]; auto& material = m_materials[mesh.m_MaterialIdx]; - if( material.IsTransparent() ) + if( material.IsTransparent() + && m_materialMode != MATERIAL_MODE::DIFFUSE_ONLY ) m_have_transparent_meshes = true; else m_have_opaque_meshes = true;