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/curve/editcurve_paint.c | |
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/curve/editcurve_paint.c')
-rw-r--r-- | source/blender/editors/curve/editcurve_paint.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index 0edee8a84ea..d930174c25b 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -784,13 +784,7 @@ static int curve_draw_exec(bContext *C, wmOperator *op) } /* Deselect all existing curves. */ - { - ViewLayer *view_layer = CTX_data_view_layer(C); - uint objects_len; - Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, CTX_wm_view3d(C), &objects_len); - ED_curve_deselect_all_multi(objects, objects_len); - MEM_freeN(objects); - } + ED_curve_deselect_all_multi(C); const float radius_min = cps->radius_min; const float radius_max = cps->radius_max; |