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:
-rw-r--r--source/blender/blenkernel/intern/curve.c2
-rw-r--r--source/blender/include/butspace.h1
-rw-r--r--source/blender/makesdna/DNA_curve_types.h4
-rw-r--r--source/blender/src/buttons_editing.c12
4 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 769c31ad8a9..ece0a7f1d6c 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -1445,7 +1445,7 @@ static void alfa_bezpart(BezTriple *prevbezt, BezTriple *bezt, Nurb *nu, float *
for(a=0; a<resolu; a++, fac+= dfac) {
- set_four_ipo(fac, t, KEY_LINEAR);
+ set_four_ipo(fac, t, nu->tilt_interp);
data_a[a]= t[0]*pprev->alfa + t[1]*prevbezt->alfa + t[2]*bezt->alfa + t[3]*next->alfa;
}
diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h
index 95ca38471a9..e1aeb4df1e4 100644
--- a/source/blender/include/butspace.h
+++ b/source/blender/include/butspace.h
@@ -453,6 +453,7 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la
#define B_SETRESOLU 2121
#define B_SETW4 2122
#define B_SUBSURFTYPE 2123
+#define B_TILTINTERP 2124
/* *********************** */
#define B_FONTBUTS 2300
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 8dc284888d7..bd772bbeecb 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -116,9 +116,11 @@ typedef struct Nurb {
float *knotsu, *knotsv;
BPoint *bp;
BezTriple *bezt;
+
+ short tilt_interp; /* KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE */
+ short pad;
int charidx;
- int pad;
} Nurb;
typedef struct CharInfo {
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index 3c995c4d19a..6efc9ffba55 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -2794,6 +2794,10 @@ void do_curvebuts(unsigned short event)
allqueue(REDRAWVIEW3D, 0);
}
break;
+ case B_TILTINTERP:
+ DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
+ allqueue(REDRAWVIEW3D, 0);
+ break;
case B_SUBSURFTYPE:
/* fallthrough */
case B_MAKEDISP:
@@ -2904,6 +2908,14 @@ static void editing_panel_curve_tools(Object *ob, Curve *cu)
nu= lastnu;
if(nu==NULL) nu= editNurb.first;
if(nu) {
+ if (ob->type==OB_CURVE) {
+ uiDefBut(block, LABEL, 0, "Tilt",
+ 467,87,72, 18, 0, 0, 0, 0, 0, "");
+ /* KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE */
+ uiDefButS(block, MENU, B_TILTINTERP, "Tilt Interpolation %t|Linear %x0|Cardinal %x1|BSpline %x2",
+ 467,67,72, 18, &(nu->tilt_interp), 0, 0, 0, 0, "Tilt interpolation");
+ }
+
uiBlockBeginAlign(block);
sp= &(nu->orderu);
uiDefButS(block, NUM, B_SETORDER, "Order U:", 565,90,102, 19, sp, 2.0, 6.0, 0, 0, "Nurbs only; the amount of control points involved");