forked from bartvdbraak/blender
Workbench: Fix assert with sculpt in textured color mode
This commit is contained in:
parent
5b021dff41
commit
39a09b536e
@ -114,7 +114,7 @@ static void workbench_cache_sculpt_populate(WORKBENCH_PrivateData *wpd,
|
||||
eV3DShadingColorType color_type)
|
||||
{
|
||||
const bool use_single_drawcall = !ELEM(color_type, V3D_SHADING_MATERIAL_COLOR);
|
||||
BLI_assert(wpd->shading.color_type != V3D_SHADING_TEXTURE_COLOR);
|
||||
BLI_assert(color_type != V3D_SHADING_TEXTURE_COLOR);
|
||||
|
||||
if (use_single_drawcall) {
|
||||
DRWShadingGroup *grp = workbench_material_setup(wpd, ob, 0, color_type, NULL);
|
||||
@ -309,6 +309,11 @@ static eV3DShadingColorType workbench_color_type_get(WORKBENCH_PrivateData *wpd,
|
||||
}
|
||||
}
|
||||
|
||||
if (is_sculpt_pbvh && color_type == V3D_SHADING_TEXTURE_COLOR) {
|
||||
/* Force use of material color for sculpt. */
|
||||
color_type = V3D_SHADING_MATERIAL_COLOR;
|
||||
}
|
||||
|
||||
if (r_draw_shadow) {
|
||||
*r_draw_shadow = (ob->dtx & OB_DRAW_NO_SHADOW_CAST) == 0 && SHADOW_ENABLED(wpd);
|
||||
/* Currently unsupported in sculpt mode. We could revert to the slow
|
||||
|
Loading…
Reference in New Issue
Block a user