From e4e23bdd7327624f298e2f0d5c920b84aa4baebf Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 1 Aug 2023 21:25:38 -0400 Subject: [PATCH] Cleanup: Sculpt: Remove unnecessary visibility flushing Face set code modifies visibility of faces, then flushes those changes to vertex and edge visibility. However, then it did an extra flush back from vertices to faces and edges, which shouldn't be necessary. --- source/blender/editors/sculpt_paint/sculpt_face_set.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.cc b/source/blender/editors/sculpt_paint/sculpt_face_set.cc index b5ceb83c95c..327c1a51144 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.cc +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.cc @@ -718,10 +718,6 @@ static int sculpt_face_set_init_exec(bContext *C, wmOperator *op) BKE_pbvh_update_vertex_data(ss->pbvh, PBVH_UpdateVisibility); - if (BKE_pbvh_type(pbvh) == PBVH_FACES) { - BKE_mesh_flush_hidden_from_verts(mesh); - } - SCULPT_tag_update_overlays(C); return OPERATOR_FINISHED; @@ -1307,8 +1303,6 @@ static void sculpt_face_set_edit_modify_geometry(bContext *C, static void face_set_edit_do_post_visibility_updates(Object *ob, Span nodes) { SculptSession *ss = ob->sculpt; - PBVH *pbvh = ss->pbvh; - Mesh *mesh = static_cast(ob->data); /* Sync face sets visibility and vertex visibility as now all Face Sets are visible. */ SCULPT_visibility_sync_all_from_faces(ob); @@ -1318,10 +1312,6 @@ static void face_set_edit_do_post_visibility_updates(Object *ob, Spanpbvh, PBVH_UpdateVisibility); - - if (BKE_pbvh_type(pbvh) == PBVH_FACES) { - BKE_mesh_flush_hidden_from_verts(mesh); - } } static void sculpt_face_set_edit_modify_face_sets(Object *ob,