Sculpt: Fix mask from cavity not redrawing viewport with modifiers

This commit is contained in:
Joseph Eagar 2022-10-11 10:11:16 -07:00
parent 7119582b66
commit 48fd4a01ef
2 changed files with 5 additions and 4 deletions

View File

@ -812,6 +812,10 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata,
bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d) &&
!DRW_state_is_image_render();
if (ob->sculpt && ob->sculpt->pbvh) {
BKE_pbvh_is_drawing_set(ob->sculpt->pbvh, use_sculpt_pbvh);
}
/* First get materials for this mesh. */
if (ELEM(ob->type, OB_MESH, OB_SURF)) {
const int materials_len = DRW_cache_object_material_count_get(ob);

View File

@ -1116,10 +1116,7 @@ static int sculpt_bake_cavity_exec(bContext *C, wmOperator *op)
SCULPT_undo_push_end(ob);
SCULPT_flush_update_done(C, ob, SCULPT_UPDATE_MASK);
/* Unlike other operators we do not tag the ID for update here;
* it triggers a PBVH rebuild which is too slow and ruins
* the interactivity of the tool. */
SCULPT_tag_update_overlays(C);
return OPERATOR_FINISHED;
}