diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-05-08 16:44:15 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-05-08 16:47:04 +0300 |
commit | 470cdeeae037c85d3b302e2b1cb5868e02e2bb59 (patch) | |
tree | 625654a0b7d47e1e01b13bc58cd273bbace93819 | |
parent | ac9fe9c2c17fee57a47df84d01cc9595e2985c5d (diff) |
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`.
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_data.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c index 2e8119fca2f..7b08e97ac31 100644 --- a/source/blender/draw/engines/workbench/workbench_data.c +++ b/source/blender/draw/engines/workbench/workbench_data.c @@ -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)) { |