mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 03:05:53 +08:00
Fixed volume transparency when changing volume type
This commit is contained in:
parent
200cbd165f
commit
9190810c1f
@ -1845,6 +1845,13 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
||||
|
||||
volume->is_modifier = !mvs->model_volume->is_model_part();
|
||||
volume->set_color(color_from_model_volume(*mvs->model_volume));
|
||||
// force update of render_color alpha channel
|
||||
bool transparent = volume->color[3] < 1.0f;
|
||||
if (transparent)
|
||||
volume->force_transparent = true;
|
||||
volume->set_render_color();
|
||||
if (transparent)
|
||||
volume->force_transparent = false;
|
||||
|
||||
// updates volumes transformations
|
||||
volume->set_instance_transformation(mvs->model_volume->get_object()->instances[mvs->composite_id.instance_id]->get_transformation());
|
||||
|
Loading…
x
Reference in New Issue
Block a user