FDM painting gizmos (support/seam) now render object in neutral color

The goal is to ensure enough contrast independent on current filament color
This commit is contained in:
Lukas Matena 2020-09-25 16:04:28 +02:00
parent 2647dd1d5d
commit f890cd5b9c
4 changed files with 27 additions and 6 deletions

View file

@ -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;
}
}
}
}