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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/curve.c19
-rw-r--r--source/blender/editors/curve/editcurve.c5
-rw-r--r--source/blender/makesdna/DNA_curve_types.h3
3 files changed, 15 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index c46cc83c21d..dfcd8f67698 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -878,7 +878,7 @@ void BKE_nurb_bezt_calc_plane(struct Nurb *nu, struct BezTriple *bezt, float r_p
/* ~~~~~~~~~~~~~~~~~~~~Non Uniform Rational B Spline calculations ~~~~~~~~~~~ */
-static void calcknots(float *knots, const short pnts, const short order, const short flag)
+static void calcknots(float *knots, const int pnts, const short order, const short flag)
{
/* knots: number of pnts NOT corrected for cyclic */
const int pnts_order = pnts + order;
@@ -924,7 +924,7 @@ static void calcknots(float *knots, const short pnts, const short order, const s
}
}
-static void makecyclicknots(float *knots, short pnts, short order)
+static void makecyclicknots(float *knots, int pnts, short order)
/* pnts, order: number of pnts NOT corrected for cyclic */
{
int a, b, order2, c;
@@ -1004,7 +1004,7 @@ void BKE_nurb_knot_calc_v(Nurb *nu)
makeknots(nu, 2);
}
-static void basisNurb(float t, short order, short pnts, float *knots, float *basis, int *start, int *end)
+static void basisNurb(float t, short order, int pnts, float *knots, float *basis, int *start, int *end)
{
float d, e;
int i, i1 = 0, i2 = 0, j, orderpluspnts, opp2, o2;
@@ -1146,7 +1146,7 @@ void BKE_nurb_makeFaces(Nurb *nu, float *coord_array, int rowstride, int resolu,
basis = basisv;
curv = totv;
while (curv--) {
- basisNurb(v, nu->orderv, (short)(nu->pntsv + cycl), nu->knotsv, basis, jstart + curv, jend + curv);
+ basisNurb(v, nu->orderv, nu->pntsv + cycl, nu->knotsv, basis, jstart + curv, jend + curv);
basis += KNOTSV(nu);
v += vstep;
}
@@ -1159,7 +1159,7 @@ void BKE_nurb_makeFaces(Nurb *nu, float *coord_array, int rowstride, int resolu,
u = ustart;
curu = totu;
while (curu--) {
- basisNurb(u, nu->orderu, (short)(nu->pntsu + cycl), nu->knotsu, basisu, &istart, &iend);
+ basisNurb(u, nu->orderu, nu->pntsu + cycl, nu->knotsu, basisu, &istart, &iend);
basis = basisv;
curv = totv;
@@ -1296,7 +1296,7 @@ void BKE_nurb_makeCurve(Nurb *nu, float *coord_array, float *tilt_array, float *
u = ustart;
while (resolu--) {
- basisNurb(u, nu->orderu, (short)(nu->pntsu + cycl), nu->knotsu, basisu, &istart, &iend);
+ basisNurb(u, nu->orderu, nu->pntsu + cycl, nu->knotsu, basisu, &istart, &iend);
/* calc sum */
sumdiv = 0.0;
@@ -3103,7 +3103,7 @@ static void calchandleNurb_intern(BezTriple *bezt, BezTriple *prev, BezTriple *n
static void calchandlesNurb_intern(Nurb *nu, int skip_align)
{
BezTriple *bezt, *prev, *next;
- short a;
+ int a;
if (nu->type != CU_BEZIER)
return;
@@ -3205,7 +3205,7 @@ void BKE_nurb_bezt_handle_test(BezTriple *bezt, const bool use_handle)
void BKE_nurb_handles_test(Nurb *nu, const bool use_handle)
{
BezTriple *bezt;
- short a;
+ int a;
if (nu->type != CU_BEZIER)
return;
@@ -3316,7 +3316,8 @@ void BKE_nurbList_handles_set(ListBase *editnurb, short code)
/* code==6: Clear align, like 3 but no toggle */
Nurb *nu;
BezTriple *bezt;
- short a, ok = 0;
+ int a;
+ short ok = 0;
if (code == 1 || code == 2) {
nu = editnurb->first;
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 6d234598bf6..6144c84f1ba 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -3791,7 +3791,7 @@ static void rotate_direction_nurb(Nurb *nu)
BPoint *bp1, *bp2, *temp;
int u, v;
- SWAP(short, nu->pntsu, nu->pntsv);
+ SWAP(int, nu->pntsu, nu->pntsv);
SWAP(short, nu->orderu, nu->orderv);
SWAP(short, nu->resolu, nu->resolv);
SWAP(short, nu->flagu, nu->flagv);
@@ -5476,7 +5476,8 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
BPoint *bp;
BezTriple *bezt;
int a;
- short sel = 0, lastsel = false;
+ int sel = 0;
+ short lastsel = false;
if (obedit->type == OB_SURF) {
for (nu = editnurb->first; nu; nu = nu->next) {
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index f30ecad4cd9..695df477e8b 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -131,7 +131,8 @@ typedef struct Nurb {
short type;
short mat_nr; /* index into material list */
short hide, flag;
- short pntsu, pntsv; /* number of points in the U or V directions */
+ int pntsu, pntsv; /* number of points in the U or V directions */
+ short pad[2];
short resolu, resolv; /* tessellation resolution in the U or V directions */
short orderu, orderv;
short flagu, flagv;