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:
authorCampbell Barton <ideasman42@gmail.com>2013-07-24 17:56:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-24 17:56:36 +0400
commitb6f58d0ea1c2d1b3b87293da1858b370d857a481 (patch)
treeca4ca51211c7b0adc0e821683d3305c1a6591bff /source/blender/editors/curve
parent57a4070b9d6da6151f1ff3d9cb4f88342be2dc5f (diff)
- add individual origin support for curves and improve the orientation calculations for curve handles,
- add support for using the active point's orientation. - add support for creating new custom orientations from curves. - fix error where only the last selected curve handle was taken into account for manipulator orientations.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/editcurve.c46
1 files changed, 4 insertions, 42 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 5352b367d05..a988b2295dc 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -2833,44 +2833,6 @@ void CURVE_OT_reveal(wmOperatorType *ot)
/********************** subdivide operator *********************/
-static BezTriple *next_spline_bezier_point_get(Nurb *nu, BezTriple *bezt)
-{
- BezTriple *nextbezt;
-
- if (bezt == nu->bezt + nu->pntsu - 1) {
- if (nu->flagu & CU_NURB_CYCLIC) {
- nextbezt = nu->bezt;
- }
- else {
- nextbezt = NULL;
- }
- }
- else {
- nextbezt = bezt + 1;
- }
-
- return nextbezt;
-}
-
-static BPoint *next_spline_bpoint_get(Nurb *nu, BPoint *bp)
-{
- BPoint *nextbp;
-
- if (bp == nu->bp + nu->pntsu - 1) {
- if (nu->flagu & CU_NURB_CYCLIC) {
- nextbp = nu->bp;
- }
- else {
- nextbp = NULL;
- }
- }
- else {
- nextbp = bp + 1;
- }
-
- return nextbp;
-}
-
/** Divide the line segments associated with the currently selected
* curve nodes (Bezier or NURB). If there are no valid segment
* selections within the current selection, nothing happens.
@@ -2902,7 +2864,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
a = nu->pntsu;
bezt = nu->bezt;
while (a--) {
- nextbezt = next_spline_bezier_point_get(nu, bezt);
+ nextbezt = BKE_nurb_bezt_get_next(nu, bezt);
if (nextbezt == NULL) {
break;
}
@@ -2924,7 +2886,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
keyIndex_updateBezt(editnurb, bezt, beztn, 1);
beztn++;
- nextbezt = next_spline_bezier_point_get(nu, bezt);
+ nextbezt = BKE_nurb_bezt_get_next(nu, bezt);
if (nextbezt == NULL) {
break;
}
@@ -2988,7 +2950,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
a = nu->pntsu;
bp = nu->bp;
while (a--) {
- nextbp = next_spline_bpoint_get(nu, bp);
+ nextbp = BKE_nurb_bpoint_get_next(nu, bp);
if (nextbp == NULL) {
break;
}
@@ -3013,7 +2975,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
keyIndex_updateBP(editnurb, bp, bpn, 1);
bpn++;
- nextbp = next_spline_bpoint_get(nu, bp);
+ nextbp = BKE_nurb_bpoint_get_next(nu, bp);
if (nextbp == NULL) {
break;
}