diff options
author | Habib Gahbiche <habibgahbiche@gmail.com> | 2018-10-30 22:15:43 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-10-30 22:22:55 +0300 |
commit | 9d9d44dbcb18aa1e08fee2119b2ea434189f78bd (patch) | |
tree | b59b1d67bcac33b8a72ec062fd54ae92637c610c /source/blender/editors/curve/editcurve_select.c | |
parent | 47afabbb429d0fa67c858eb5031818122d37745c (diff) |
Multi-Objects: CURVE_OT_de_select_first
Reviewers: dfelinto
https://developer.blender.org/D3839
Diffstat (limited to 'source/blender/editors/curve/editcurve_select.c')
-rw-r--r-- | source/blender/editors/curve/editcurve_select.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c index f7ac16d2aad..0313ded664d 100644 --- a/source/blender/editors/curve/editcurve_select.c +++ b/source/blender/editors/curve/editcurve_select.c @@ -403,13 +403,18 @@ static void selectend_nurb(Object *obedit, eEndPoint_Types selfirst, bool doswap static int de_select_first_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *obedit = CTX_data_edit_object(C); - - selectend_nurb(obedit, FIRST, true, DESELECT); - DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE); - WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); - BKE_curve_nurb_vert_active_validate(obedit->data); + ViewLayer *view_layer = CTX_data_view_layer(C); + uint objects_len = 0; + Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len); + for (uint ob_index = 0; ob_index < objects_len; ob_index++) { + Object *obedit = objects[ob_index]; + selectend_nurb(obedit, FIRST, true, DESELECT); + DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); + BKE_curve_nurb_vert_active_validate(obedit->data); + } + MEM_freeN(objects); return OPERATOR_FINISHED; } |