diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-05-26 03:34:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-05-26 03:37:04 +0400 |
commit | a1d286a6995ec1a1bf5d74fb1cc7152e51654e1f (patch) | |
tree | 36f1bdddcb6e3ff8bed3a41651313415a29e0a39 | |
parent | d84af360caa5df0361f792632566863bebda17dc (diff) |
Fix curve switch direction ignoring active vertex
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 20e55190a81..61fe30e4ec5 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -2427,11 +2427,15 @@ static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) Curve *cu = (Curve *)obedit->data; EditNurb *editnurb = cu->editnurb; Nurb *nu; + int i; - for (nu = editnurb->nurbs.first; nu; nu = nu->next) { + for (nu = editnurb->nurbs.first, i = 0; nu; nu = nu->next, i++) { if (isNurbsel(nu)) { BKE_nurb_direction_switch(nu); keyData_switchDirectionNurb(cu, nu); + if ((i == cu->actnu) && (cu->actvert != CU_ACT_NONE)) { + cu->actvert = (nu->pntsu - 1) - cu->actvert; + } } } |