From 6992fc0b3bf85e985169157b2e7ced1e1ed7fcdf Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 27 Nov 2019 15:02:41 +0100 Subject: Add 'EDBM_selectmode_disable_multi' and use in knifeproject As a followup to rB6f4e595e9ba9 and as per @campbellbarton suggestion, this adds EDBM_selectmode_disable_multi, similar to EDBM_mesh_deselect_all_multi & EDBM_mesh_deselect_all, so other similar uses don't need to be done in a loop. Also, selected_objects isn't a reliable way to handle this case - since objects can be in edit-mode & not selected, use BKE_view_layer_array_from_bases_in_edit_mode_unique_data instead Differential Revision: https://developer.blender.org/D6317 --- source/blender/editors/include/ED_mesh.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/editors/include/ED_mesh.h') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index fc7b0d8be8f..835e1b4e26f 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -236,6 +236,14 @@ void em_setup_viewcontext(struct bContext *C, struct ViewContext *vc); /* rename bool EDBM_mesh_deselect_all_multi_ex(struct Base **bases, const uint bases_len); bool EDBM_mesh_deselect_all_multi(struct bContext *C); +bool EDBM_selectmode_disable_multi_ex(struct Scene *scene, + struct Base **bases, + const uint bases_len, + const short selectmode_disable, + const short selectmode_fallback); +bool EDBM_selectmode_disable_multi(struct bContext *C, + const short selectmode_disable, + const short selectmode_fallback); /* editmesh_preselect_edgering.c */ struct EditMesh_PreSelEdgeRing; -- cgit v1.2.3