diff options
Diffstat (limited to 'source/blender/editors/transform')
3 files changed, 8 insertions, 20 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 85a2da10596..55ecc53fd01 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1667,7 +1667,7 @@ void calculateCenter(TransInfo *t) float center[3]; Curve *cu = (Curve *)t->obedit->data; - if (ED_curve_actSelection(cu, center)) { + if (ED_curve_active_center(cu, center)) { copy_v3_v3(t->center, center); calculateCenter2D(t); break; diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index ddbb05f2536..fc4e5fcb8e5 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -397,7 +397,7 @@ int calc_manipulator_stats(const bContext *C) Curve *cu = obedit->data; float center[3]; - if (v3d->around == V3D_ACTIVE && ED_curve_actSelection(cu, center)) { + if (v3d->around == V3D_ACTIVE && ED_curve_active_center(cu, center)) { calc_tw_center(scene, center); totsel++; } diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index be8bc460764..1cb441b5b16 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -705,27 +705,15 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], } /* end editmesh */ else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { Curve *cu = obedit->data; - Nurb *nu; - BezTriple *bezt; + Nurb *nu = NULL; + BezTriple *bezt = NULL; int a; ListBase *nurbs = BKE_curve_editNurbs_get(cu); - if (activeOnly && cu->lastsel) { - for (nu = nurbs->first; nu; nu = nu->next) { - if (nu->type == CU_BEZIER) { - if (ARRAY_HAS_ITEM((BezTriple *)cu->lastsel, nu->bezt, nu->pntsu)) { - bezt = cu->lastsel; - BKE_nurb_bezt_calc_normal(nu, bezt, normal); - BKE_nurb_bezt_calc_plane(nu, bezt, plane); - break; - } - } - else { - if (ARRAY_HAS_ITEM((BPoint *)cu->lastsel, nu->bp, nu->pntsu)) { - /* do nothing */ - break; - } - } + if (activeOnly && BKE_curve_nurb_vert_active_get(cu, &nu, (void *)&bezt)) { + if (nu->type == CU_BEZIER) { + BKE_nurb_bezt_calc_normal(nu, bezt, normal); + BKE_nurb_bezt_calc_plane(nu, bezt, plane); } } else { |