Sculpt: fix draw face sets not updating on first stroke
This commit is contained in:
parent
4bdba62cb9
commit
6d3da28676
|
@ -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(
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue