Fix T69995: Object Drawtype Set To Solid Issues

When setting an object draw type to Solid it always used the Material
color mode. This change only sets the material color when the viewport
is set to display textures.
This commit is contained in:
2019-09-20 11:21:41 +02:00
parent 44d0c868bf
commit fde8682d96

View File

@@ -261,8 +261,8 @@ int workbench_material_determine_color_type(WORKBENCH_PrivateData *wpd,
int color_type = wpd->shading.color_type;
const Mesh *me = (ob->type == OB_MESH) ? ob->data : NULL;
if ((color_type == V3D_SHADING_TEXTURE_COLOR && (ima == NULL || use_sculpt_pbvh)) ||
(ob->dt < OB_TEXTURE)) {
if ((color_type == V3D_SHADING_TEXTURE_COLOR) &&
(ima == NULL || use_sculpt_pbvh || (ob->dt < OB_TEXTURE))) {
color_type = V3D_SHADING_MATERIAL_COLOR;
}
if (color_type == V3D_SHADING_VERTEX_COLOR && (me == NULL || me->mloopcol == NULL)) {