Commit: 48fd4a01efd3a1d649a50b45184c91593219fb55
Author: Joseph Eagar
Date:   Tue Oct 11 10:11:16 2022 -0700
Branches: master
https://developer.blender.org/rB48fd4a01efd3a1d649a50b45184c91593219fb55

Sculpt: Fix mask from cavity not redrawing viewport with modifiers

===================================================================

M       source/blender/draw/engines/eevee/eevee_materials.c
M       source/blender/editors/sculpt_paint/sculpt_ops.c

===================================================================

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;
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to