OVERLAY: Viewport Background Color visible in Material Preview Mode

When user used a custom background color, this color was also visible in
material preview mode, when the world opacity was less than 1. This
patch will draw the theme color as it was used to.
This commit is contained in:
Jeroen Bakker 2020-03-10 11:34:33 +01:00
parent dc3ff1db3f
commit 982b498c22
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ void OVERLAY_background_cache_init(OVERLAY_Data *vedata)
copy_v3_v3(color_override, &scene->world->horr);
color_override[3] = 1.0f;
}
else if (v3d->shading.background_type == V3D_SHADING_BACKGROUND_VIEWPORT) {
else if (v3d->shading.background_type == V3D_SHADING_BACKGROUND_VIEWPORT &&
v3d->shading.type <= OB_SOLID) {
background_type = BG_SOLID;
copy_v3_v3(color_override, v3d->shading.background_color);
color_override[3] = 1.0f;