Fix Assert: Wireframe XRay during Sculpting

In the situation that the viewport was set to solid/texture mode and
switch to wireframe and sculpt mode, an assert was triggered in
`workbench_cache_sculpt_populate`.
This commit is contained in:
Jeroen Bakker 2020-05-08 15:44:15 +02:00
parent ac9fe9c2c1
commit 470cdeeae0
1 changed files with 2 additions and 0 deletions

View File

@ -250,6 +250,8 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
wpd->shading = v3d->shading;
if (wpd->shading.type < OB_SOLID) {
wpd->shading.light = V3D_LIGHTING_FLAT;
wpd->shading.color_type = V3D_SHADING_OBJECT_COLOR;
wpd->shading.xray_alpha = 0.0f;
}
else if (XRAY_ENABLED(v3d)) {