diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-26 10:47:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-26 12:25:25 +0300 |
commit | 40f8ddf8297a062968fc6a1523aa210d69c22626 (patch) | |
tree | 27e26dd44f3e8778ad06012d184fcb11ed175c94 /source/blender/editors/include/ED_mesh.h | |
parent | 30fbf905ef8bd587eef43030b81d75b9eb704bec (diff) |
3D View: move deselect all logic into an option
This removes `VIEW3D_OT_select_or_deselect_all`, adding a
deselect_all option to the `VIEW3D_OT_select` operator.
- Add utility functions to simplify de-selecting all.
- Return true from selection functions when they change the selection
to avoid redundant updates.
- Use arrays of bases when passing objects between selection utility
functions since some users require bases.
- Fix logical error in box selection that updated all objects after
the first hit.
Diffstat (limited to 'source/blender/editors/include/ED_mesh.h')
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index b912cf88102..9e68c4a03ae 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -203,6 +203,9 @@ void EDBM_select_swap(struct BMEditMesh *em); /* exported for UV */ bool EDBM_select_interior_faces(struct BMEditMesh *em); 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); + extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs; /* editmesh_preselect_edgering.c */ @@ -237,15 +240,15 @@ void EDBM_project_snap_verts(struct bContext *C, struct ARegion *ar, struct BMEd /* editface.c */ void paintface_flush_flags(struct bContext *C, struct Object *ob, short flag); bool paintface_mouse_select(struct bContext *C, struct Object *ob, const int mval[2], bool extend, bool deselect, bool toggle); -int do_paintface_box_select(struct ViewContext *vc, const struct rcti *rect, int sel_op); -void paintface_deselect_all_visible(struct bContext *C, struct Object *ob, int action, bool flush_flags); +bool do_paintface_box_select(struct ViewContext *vc, const struct rcti *rect, int sel_op); +bool paintface_deselect_all_visible(struct bContext *C, struct Object *ob, int action, bool flush_flags); void paintface_select_linked(struct bContext *C, struct Object *ob, const int mval[2], const bool select); bool paintface_minmax(struct Object *ob, float r_min[3], float r_max[3]); void paintface_hide(struct bContext *C, struct Object *ob, const bool unselected); void paintface_reveal(struct bContext *C, struct Object *ob, const bool select); -void paintvert_deselect_all_visible(struct Object *ob, int action, bool flush_flags); +bool paintvert_deselect_all_visible(struct Object *ob, int action, bool flush_flags); void paintvert_select_ungrouped(struct Object *ob, bool extend, bool flush_flags); void paintvert_flush_flags(struct Object *ob); void paintvert_tag_select_update(struct bContext *C, struct Object *ob); |