diff options
-rw-r--r-- | source/blender/draw/intern/draw_pbvh.cc | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_face_set.cc | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_pbvh.cc b/source/blender/draw/intern/draw_pbvh.cc index 2f325f7cf62..895abdfc2ac 100644 --- a/source/blender/draw/intern/draw_pbvh.cc +++ b/source/blender/draw/intern/draw_pbvh.cc @@ -558,10 +558,10 @@ struct PBVHBatches { foreach_faces( [&](int /*buffer_i*/, int /*tri_i*/, int /*vertex_i*/, const MLoopTri *tri) { - if (last_poly != tri->poly && args->face_sets) { + if (last_poly != tri->poly) { last_poly = tri->poly; - const int fset = abs(face_sets[tri->poly]); + const int fset = face_sets[tri->poly]; if (fset != args->face_sets_color_default) { BKE_paint_face_set_overlay_color_get( diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.cc b/source/blender/editors/sculpt_paint/sculpt_face_set.cc index 1327f40f95a..962ecf42691 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.cc +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.cc @@ -248,6 +248,12 @@ void SCULPT_do_draw_face_sets_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, in SculptSession *ss = ob->sculpt; Brush *brush = BKE_paint_brush(&sd->paint); + if (ss->pbvh) { + Mesh *mesh = BKE_mesh_from_object(ob); + BKE_pbvh_face_sets_color_set( + ss->pbvh, mesh->face_sets_color_seed, mesh->face_sets_color_default); + } + BKE_curvemapping_init(brush->curve); /* Threaded loop over nodes. */ |