Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-05-26 11:37:47 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-05-26 11:37:47 +0300
commit49f59092e7c8c652df015bdfd27bae2480e51d01 (patch)
tree7360626291190beb7537370efc7a9a7d5af7203f /source/blender/editors/curve/editcurve_select.c
parent495a98d623648ca787ddb2c0dbaa08fe313f1adf (diff)
Curves: Implement Handles for selected points only
When editing a complex curve is very annoying to have all handles at a time. Also, this is a requirement for the current GSoC Edit Grease Pencil using curves. I have seen that this improvement can be used in any other area of blender, so I have decided to publish the option in the overlay panel.. Reviewed By: fclem, #user_interface, billreynish, Severin Differential Revision: https://developer.blender.org/D7754
Diffstat (limited to 'source/blender/editors/curve/editcurve_select.c')
-rw-r--r--source/blender/editors/curve/editcurve_select.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c
index 9cf61d02677..9294bc6e91b 100644
--- a/source/blender/editors/curve/editcurve_select.c
+++ b/source/blender/editors/curve/editcurve_select.c
@@ -590,8 +590,8 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
changed = ED_curve_deselect_all(cu->editnurb);
break;
case SEL_INVERT:
- changed = ED_curve_select_swap(
- cu->editnurb, (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_CU_HANDLES) == 0);
+ changed = ED_curve_select_swap(cu->editnurb,
+ v3d->overlay.handle_display == CURVE_HANDLE_NONE);
break;
}
@@ -772,7 +772,7 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
if (last == bp) {
direction = 1 - direction;
- BKE_nurbList_flag_set(editnurb, 0);
+ BKE_nurbList_flag_set(editnurb, SELECT, false);
}
last = bp;
@@ -826,8 +826,10 @@ static int select_next_exec(bContext *C, wmOperator *UNUSED(op))
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
Object *obedit = objects[ob_index];
+
ListBase *editnurb = object_editcurve_get(obedit);
select_adjacent_cp(editnurb, 1, 0, SELECT);
+
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
}
@@ -861,8 +863,10 @@ static int select_previous_exec(bContext *C, wmOperator *UNUSED(op))
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
Object *obedit = objects[ob_index];
+
ListBase *editnurb = object_editcurve_get(obedit);
select_adjacent_cp(editnurb, -1, 0, SELECT);
+
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
}
@@ -1392,6 +1396,7 @@ static int select_nth_exec(bContext *C, wmOperator *op)
if (ed_curve_select_nth(obedit->data, &op_params) == true) {
changed = true;
+
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
}