diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp index ca96af49c..84a5e4d2f 100644 --- a/src/slic3r/GUI/3DScene.cpp +++ b/src/slic3r/GUI/3DScene.cpp @@ -306,6 +306,7 @@ const float GLVolume::MODEL_COLOR[4][4] = { }; const float GLVolume::SLA_SUPPORT_COLOR[4] = { 0.75f, 0.75f, 0.75f, 1.0f }; const float GLVolume::SLA_PAD_COLOR[4] = { 0.0f, 0.2f, 0.0f, 1.0f }; +const float GLVolume::NEUTRAL_COLOR[4] = { 0.9f, 0.9f, 0.9f, 1.0f }; GLVolume::GLVolume(float r, float g, float b, float a) : m_transformed_bounding_box_dirty(true) @@ -327,6 +328,7 @@ GLVolume::GLVolume(float r, float g, float b, float a) , is_extrusion_path(false) , force_transparent(false) , force_native_color(false) + , force_neutral_color(false) , tverts_range(0, size_t(-1)) , qverts_range(0, size_t(-1)) { @@ -352,12 +354,16 @@ void GLVolume::set_render_color(const float* rgba, unsigned int size) void GLVolume::set_render_color() { - if (force_native_color) + if (force_native_color || force_neutral_color) { if (is_outside && shader_outside_printer_detection_enabled) set_render_color(OUTSIDE_COLOR, 4); - else - set_render_color(color, 4); + else { + if (force_native_color) + set_render_color(color, 4); + else + set_render_color(NEUTRAL_COLOR, 4); + } } else { if (hover == HS_Select) diff --git a/src/slic3r/GUI/3DScene.hpp b/src/slic3r/GUI/3DScene.hpp index 7e8ae6fe3..31e974be1 100644 --- a/src/slic3r/GUI/3DScene.hpp +++ b/src/slic3r/GUI/3DScene.hpp @@ -251,6 +251,7 @@ public: static const float MODEL_COLOR[4][4]; static const float SLA_SUPPORT_COLOR[4]; static const float SLA_PAD_COLOR[4]; + static const float NEUTRAL_COLOR[4]; enum EHoverState : unsigned char { @@ -336,6 +337,8 @@ public: bool force_transparent : 1; // Whether or not always use the volume's own color (not using SELECTED/HOVER/DISABLED/OUTSIDE) bool force_native_color : 1; + // Whether or not render this volume in neutral + bool force_neutral_color : 1; }; // Is mouse or rectangle selection over this object to select/deselect it ? diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 67eaffe50..a539ffc39 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -1725,7 +1725,19 @@ void GLCanvas3D::toggle_model_objects_visibility(bool visible, const ModelObject if ((mo == nullptr || m_model->objects[vol->composite_id.object_id] == mo) && (instance_idx == -1 || vol->composite_id.instance_id == instance_idx)) { vol->is_active = visible; - vol->force_native_color = (instance_idx != -1); + + if (instance_idx == -1) { + vol->force_native_color = false; + vol->force_neutral_color = false; + } else { + const GLGizmosManager& gm = get_gizmos_manager(); + auto gizmo_type = gm.get_current_type(); + if (gizmo_type == GLGizmosManager::FdmSupports + || gizmo_type == GLGizmosManager::Seam) + vol->force_neutral_color = true; + else + vol->force_native_color = true; + } } } } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp index ed98bf71d..939d3c48a 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp @@ -504,13 +504,13 @@ void TriangleSelectorGUI::render(ImGuiWrapper* imgui) m_iva_blockers.finalize_geometry(true); if (m_iva_enforcers.has_VBOs()) { - ::glColor4f(0.f, 0.f, 1.f, 0.2f); + ::glColor4f(0.f, 0.f, 1.f, 0.3f); m_iva_enforcers.render(); } if (m_iva_blockers.has_VBOs()) { - ::glColor4f(1.f, 0.f, 0.f, 0.2f); + ::glColor4f(1.f, 0.f, 0.f, 0.3f); m_iva_blockers.render(); }