diff options
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]); |