Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-10-11 20:11:16 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-10-11 20:11:16 +0300
commit48fd4a01efd3a1d649a50b45184c91593219fb55 (patch)
treec8761121fae54309603e5e66008b9343a30eed24 /source
parent7119582b6686542f75858d48266a2a5a8664f8c0 (diff)
Sculpt: Fix mask from cavity not redrawing viewport with modifiers
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/eevee/eevee_materials.c4
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_ops.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c
index ff7dda1152c..f79e4e1d568 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@ -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);
diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.c b/source/blender/editors/sculpt_paint/sculpt_ops.c
index 1a9a565a434..56a35ee1774 100644
--- a/source/blender/editors/sculpt_paint/sculpt_ops.c
+++ b/source/blender/editors/sculpt_paint/sculpt_ops.c
@@ -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;
}