forked from bartvdbraak/blender
Curve: change rules wrt active bezier
Activate the vertex even if only a single handle is selected
This commit is contained in:
parent
bbc4a92318
commit
ee1b1b9e59
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user