Fix #107906: sculpt box hide missing update with non-deform modifiers

When not drawing from PBVH (e.g. with non-deform modifiers), we have to
tag with ID_RECALC_GEOMETRY.

Pull Request: https://projects.blender.org/blender/blender/pulls/107938
This commit is contained in:
Philipp Oeser
2023-05-15 10:38:57 +02:00
committed by Joseph Eagar
parent 5c57b9aa79
commit b0bef8354d

View File

@@ -386,6 +386,11 @@ static int hide_show_exec(bContext *C, wmOperator *op)
BKE_pbvh_update_hide_attributes_from_mesh(pbvh);
}
RegionView3D *rv3d = CTX_wm_region_view3d(C);
if (!BKE_sculptsession_use_pbvh_draw(ob, rv3d)) {
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
}
DEG_id_tag_update(&ob->id, ID_RECALC_SHADING);
ED_region_tag_redraw(region);