Painting gizmos fixes:

- modifiers are not rendered in neutral color when a painting gizmo is open, so they are distinguishable from model parts
- modifiers are now correctly handled by clipping plane (the cut was not triangulated for them)
This commit is contained in:
Lukas Matena 2020-10-03 15:45:21 +02:00
parent 48e5f53663
commit f4e3eb7482
2 changed files with 5 additions and 9 deletions

View file

@ -1670,8 +1670,9 @@ void GLCanvas3D::toggle_model_objects_visibility(bool visible, const ModelObject
} else {
const GLGizmosManager& gm = get_gizmos_manager();
auto gizmo_type = gm.get_current_type();
if (gizmo_type == GLGizmosManager::FdmSupports
|| gizmo_type == GLGizmosManager::Seam)
if ( (gizmo_type == GLGizmosManager::FdmSupports
|| gizmo_type == GLGizmosManager::Seam)
&& ! vol->is_modifier)
vol->force_neutral_color = true;
else
vol->force_native_color = true;

View file

@ -295,11 +295,9 @@ void ObjectClipper::on_update()
if (has_hollowed)
meshes.push_back(get_pool()->hollowed_mesh()->get_hollowed_mesh());
if (meshes.empty()) {
if (meshes.empty())
for (const ModelVolume* mv : mo->volumes)
if (mv->is_model_part())
meshes.push_back(&mv->mesh());
}
meshes.push_back(&mv->mesh());
if (meshes != m_old_meshes) {
m_clippers.clear();
@ -335,9 +333,6 @@ void ObjectClipper::render_cut() const
size_t clipper_id = 0;
for (const ModelVolume* mv : mo->volumes) {
if (! mv->is_model_part())
continue;
Geometry::Transformation vol_trafo = mv->get_transformation();
Geometry::Transformation trafo = inst_trafo * vol_trafo;
trafo.set_offset(trafo.get_offset() + Vec3d(0., 0., sel_info->get_sla_shift()));