diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-07-09 07:52:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-07-09 07:52:01 +0300 |
commit | ee1b1b9e59c790acb3e19b2ca1e004d0b76012af (patch) | |
tree | 7e13e927c986edfc986ee43e1c627e47b394cb77 | |
parent | bbc4a92318758ae104f796f62c7dceb1a972da44 (diff) |
Curve: change rules wrt active bezier
Activate the vertex even if only a single handle is selected
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 6 | ||||
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 |
3 files changed, 9 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 01e443cdb0d..d8a7b2d3d06 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -4297,12 +4297,14 @@ void BKE_curve_nurb_vert_active_validate(Curve *cu) if (BKE_curve_nurb_vert_active_get(cu, &nu, &vert)) { if (nu->type == CU_BEZIER) { - if ((((BezTriple *)vert)->f1 & SELECT) == 0) { + BezTriple *bezt = vert; + if (BEZT_ISSEL_ANY(bezt) == 0) { cu->actvert = CU_ACT_NONE; } } else { - if ((((BPoint *)vert)->f1 & SELECT) == 0) { + BPoint *bp = vert; + if ((bp->f1 & SELECT) == 0) { cu->actvert = CU_ACT_NONE; } } diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index b468ac35647..bf3dece93d4 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -4185,18 +4185,16 @@ bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool if (bezt) { if (hand == 1) { select_beztriple(bezt, SELECT, SELECT, HIDDEN); - BKE_curve_nurb_vert_active_set(cu, nu, bezt); } else { if (hand == 0) bezt->f1 |= SELECT; else bezt->f3 |= SELECT; - - cu->actvert = CU_ACT_NONE; } + BKE_curve_nurb_vert_active_set(cu, nu, bezt); } else { - BKE_curve_nurb_vert_active_set(cu, nu, bp); select_bpoint(bp, SELECT, SELECT, HIDDEN); + BKE_curve_nurb_vert_active_set(cu, nu, bp); } } else if (deselect) { @@ -4254,18 +4252,16 @@ bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool if (hand == 1) { select_beztriple(bezt, SELECT, SELECT, HIDDEN); - BKE_curve_nurb_vert_active_set(cu, nu, bezt); } else { if (hand == 0) bezt->f1 |= SELECT; else bezt->f3 |= SELECT; - - cu->actvert = CU_ACT_NONE; } + BKE_curve_nurb_vert_active_set(cu, nu, bezt); } else { - BKE_curve_nurb_vert_active_set(cu, nu, bp); select_bpoint(bp, SELECT, SELECT, HIDDEN); + BKE_curve_nurb_vert_active_set(cu, nu, bp); } } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 56de06bedac..988d4eb4959 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -6253,8 +6253,8 @@ static void drawvertsN(Nurb *nu, const char sel, const bool hide_handles, const if (bezt->hide == 0) { if (sel == 1 && bezt == vert) { UI_ThemeColor(TH_ACTIVE_VERT); - bglVertex3fv(bezt->vec[1]); + if (bezt->f2 & SELECT) bglVertex3fv(bezt->vec[1]); if (!hide_handles) { if (bezt->f1 & SELECT) bglVertex3fv(bezt->vec[0]); if (bezt->f3 & SELECT) bglVertex3fv(bezt->vec[2]); |