Fixed volume transparency when changing volume type
This commit is contained in:
parent
200cbd165f
commit
9190810c1f
1 changed files with 7 additions and 0 deletions
|
@ -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…
Reference in a new issue