diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-10-14 02:54:46 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-10-20 02:32:02 +0300 |
commit | f780bfafcfa988d1415f5758ceebbe1b4aee9ba7 (patch) | |
tree | e866f7a6d02bf33c905810f2f1f927b28386adb3 /source/blender/editors/sculpt_paint/sculpt.c | |
parent | 48fd10a77dd8e53eb0ef063ce11bf4086fdb9f17 (diff) |
Fix missing Sculpt Overlays updates when using modifiers
Now that sculpt mask and face sets can also be drawn without using the
PBVH, these operators need these extra updates when the data changes.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8956
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 5ef0b49adf7..3ded57d938f 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1047,6 +1047,21 @@ bool SCULPT_is_vertex_inside_brush_radius_symm(const float vertex[3], return false; } +void SCULPT_tag_update_overlays(bContext *C) +{ + ARegion *region = CTX_wm_region(C); + ED_region_tag_redraw(region); + + Object *ob = CTX_data_active_object(C); + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); + + DEG_id_tag_update(&ob->id, ID_RECALC_SHADING); + View3D *v3d = CTX_wm_view3d(C); + if (!BKE_sculptsession_use_pbvh_draw(ob, v3d)) { + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); + } +} + /* Sculpt Flood Fill API * * Iterate over connected vertices, starting from one or more initial vertices. */ |