[Bf-blender-cvs] [1b84276e984] temp-lanpr-cleanup: Fix T69995: Object Drawtype Set To Solid Issues

Jeroen Bakker noreply at git.blender.org
Wed Sep 25 03:48:47 CEST 2019


Commit: 1b84276e9848834f4579645708bfb8d889d0f9a5
Author: Jeroen Bakker
Date:   Fri Sep 20 11:21:41 2019 +0200
Branches: temp-lanpr-cleanup
https://developer.blender.org/rB1b84276e9848834f4579645708bfb8d889d0f9a5

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.

===================================================================

M	source/blender/draw/engines/workbench/workbench_materials.c

===================================================================

diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index c90604678db..0f9551a8cc9 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -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)) {



More information about the Bf-blender-cvs mailing list