mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-03 18:27:59 -05:00
Fix: Non positive volumes of selected or non selected object visible on Texture displacement gizmo (#17656)
The Texture displacement gizmo made every volume visible again on each frame, so modifiers, negative volumes and support blockers/enforcers from other objects and instances showed through. It now restores only the selected instance, and hides the selected object's non-part volumes while the gizmo is open.
(cherry picked from commit c56506d68b)
This commit is contained in:
1 parent
36bf1617eb
commit
2bee8e2fb2
2 files changed
+10
-1
No files matched your search
@@ -2177,6 +2177,11 @@ void GLCanvas3D::toggle_model_objects_visibility(bool visible, const ModelObject
|
||||
vol->force_neutral_color = false;
|
||||
else if (gizmo_type == GLGizmosManager::MmSegmentation)
|
||||
vol->is_active = false;
|
||||
else if (gizmo_type == GLGizmosManager::TextureDisplacement) {
|
||||
vol->force_native_color = true;
|
||||
if (vol->is_modifier) // GLVolume::is_modifier == any non-model-part volume
|
||||
vol->is_active = false;
|
||||
}
|
||||
else
|
||||
vol->force_native_color = true;
|
||||
}
|
||||
|
||||
@@ -732,7 +732,11 @@ void GLGizmoTextureDisplacement::render_painter_gizmo()
|
||||
if (const ModelVolume *part = preview_part(*preview); part != nullptr)
|
||||
previewed.push_back(part);
|
||||
}
|
||||
m_parent.toggle_model_objects_visibility(true);
|
||||
m_parent.toggle_model_objects_visibility(
|
||||
true,
|
||||
m_c->selection_info()->model_object(),
|
||||
m_c->selection_info()->get_active_instance()
|
||||
);
|
||||
for (const ModelVolume *volume : previewed)
|
||||
m_parent.toggle_model_objects_visibility(false, m_c->selection_info()->model_object(),
|
||||
m_c->selection_info()->get_active_instance(), volume);
|
||||
|
||||
Reference in new issue
Block a user