diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-04-15 22:20:39 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-04-20 03:12:28 +0300 |
commit | 44a386b88c25d0c48c03d5b01863a398053b2283 (patch) | |
tree | 9f2fef0c526184279a04f2db745c8bf9dd6c98e9 /source/blender | |
parent | 65aaa13a0001610e9d8727b916e413c4c0d9761e (diff) |
Fix T75329: Missing show_face_sets checks for Multires
These values were hardcoded before Face Sets were enabled for Multires,
so enable the show_face_sets checks now.
Reviewed By: jbakker
Maniphest Tasks: T75329
Differential Revision: https://developer.blender.org/D7444
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pbvh.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index d4408291712..4bbbae7081d 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -1854,7 +1854,7 @@ static PBVH *build_pbvh_from_ccg(Object *ob, SubdivCCG *subdiv_ccg) subdiv_ccg->grid_flag_mats, subdiv_ccg->grid_hidden); pbvh_show_mask_set(pbvh, ob->sculpt->show_mask); - pbvh_show_face_sets_set(pbvh, false); + pbvh_show_face_sets_set(pbvh, ob->sculpt->show_face_sets); return pbvh; } diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 977e70745a3..33aa20fa1e4 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -2958,7 +2958,7 @@ bool pbvh_has_face_sets(PBVH *bvh) { switch (bvh->type) { case PBVH_GRIDS: - return false; + return (bvh->pdata && CustomData_get_layer(bvh->pdata, CD_SCULPT_FACE_SETS)); case PBVH_FACES: return (bvh->pdata && CustomData_get_layer(bvh->pdata, CD_SCULPT_FACE_SETS)); case PBVH_BMESH: diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 8496bcac693..8b562413ce8 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -691,6 +691,8 @@ void GPU_pbvh_grid_buffers_update(GPU_PBVH_Buffers *buffers, { const bool show_mask = (update_flags & GPU_PBVH_BUFFERS_SHOW_MASK) != 0; const bool show_vcol = (update_flags & GPU_PBVH_BUFFERS_SHOW_VCOL) != 0; + const bool show_face_sets = sculpt_face_sets && + (update_flags & GPU_PBVH_BUFFERS_SHOW_SCULPT_FACE_SETS) != 0; bool empty_mask = true; bool default_face_set = true; @@ -738,7 +740,7 @@ void GPU_pbvh_grid_buffers_update(GPU_PBVH_Buffers *buffers, uchar face_set_color[4] = {UCHAR_MAX, UCHAR_MAX, UCHAR_MAX, UCHAR_MAX}; - if (subdiv_ccg && sculpt_face_sets) { + if (show_face_sets && subdiv_ccg && sculpt_face_sets) { const int face_index = BKE_subdiv_cgg_grid_to_face_index(subdiv_ccg, grid_index); const int fset = abs(sculpt_face_sets[face_index]); |