mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-06 11:47:58 -05:00
Fix: Painted object thumbnails uses bright colors if object sliced while selected and thumbnails not updating on remapping colors on AMS (#18037)
Since #15776, `GLVolume::simple_render()` brightens the painted colors of a selected volume. `render_thumbnail_internal()` draws through the same function, so the plate, G-code and 3MF thumbnails of a painted object that was selected at slice time were brightened, and the AMS color remap in the send and Sync AMS dialogs started from those brightened images. The thumbnail renderer now clears `selected` around the call and restores it afterward, as it already does for `is_active`.
This commit is contained in:
1 file changed
+5
@@ -8048,7 +8048,12 @@ void GLCanvas3D::render_thumbnail_internal(ThumbnailData& thumbnail_data, const
|
||||
shader->set_uniform("projection_matrix", projection_matrix);
|
||||
const Matrix3d view_normal_matrix = view_matrix.matrix().block(0, 0, 3, 3) * model_matrix.matrix().block(0, 0, 3, 3).inverse().transpose();
|
||||
shader->set_uniform("view_normal_matrix", view_normal_matrix);
|
||||
// ORCA simple_render() brightens the painted colors of a selected volume
|
||||
// A thumbnail shows the filament colors, so the selection highlight must stay out of it
|
||||
const bool is_selected = vol->selected;
|
||||
vol->selected = false;
|
||||
vol->simple_render(shader, model_objects, extruder_colors, ban_light);
|
||||
vol->selected = is_selected;
|
||||
vol->is_active = is_active;
|
||||
}
|
||||
shader->stop_using();
|
||||
|
||||
Reference in new issue
Block a user