diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-31 15:04:16 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-31 18:17:03 +0300 |
commit | 692891f69ea42af0ba890f5f92cbd1a3260442c9 (patch) | |
tree | 1aeb9469b7a2b26a8a25a09c6045faa51d34944b /source/blender/draw/engines/workbench/workbench_materials.c | |
parent | 9899999e944c0d954dbe5a7aa96c8e1680e7b3f8 (diff) |
Fix sculpt mode drawing with modifiers still being wrong in some cases
Centralize logic for when to use the PBVH for drawing, fix missing tests in
mask drawing, fix missing tests for multiple windows, only do more expensive
update for all viewports at end of the stroke.
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_materials.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_materials.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c index 02fbbe0b042..6ca55d48681 100644 --- a/source/blender/draw/engines/workbench/workbench_materials.c +++ b/source/blender/draw/engines/workbench/workbench_materials.c @@ -237,12 +237,12 @@ int workbench_material_get_accum_shader_index(WORKBENCH_PrivateData *wpd, int workbench_material_determine_color_type(WORKBENCH_PrivateData *wpd, Image *ima, Object *ob, - bool is_sculpt_mode) + bool use_sculpt_pbvh) { 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 || is_sculpt_mode)) || + if ((color_type == V3D_SHADING_TEXTURE_COLOR && (ima == NULL || use_sculpt_pbvh)) || (ob->dt < OB_TEXTURE)) { color_type = V3D_SHADING_MATERIAL_COLOR; } |