diff --git a/source/blender/include/BIF_transform.h b/source/blender/include/BIF_transform.h index 07faf2a615d..37f4b97ebb0 100755 --- a/source/blender/include/BIF_transform.h +++ b/source/blender/include/BIF_transform.h @@ -46,6 +46,7 @@ #define TFM_SHEAR 5 #define TFM_WARP 7 #define TFM_SHRINKFATTEN 8 +#define TFM_TILT 9 #define TFM_LAMP_ENERGY 10 diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index 51d8c07aede..9c88d914254 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -568,8 +568,11 @@ void extrude_mesh(void) Transform(TFM_SHRINKFATTEN); } else { - if(transmode=='n') + if(transmode=='n') { + Mat4MulVecfl(G.obedit->obmat, nor); + VecSubf(nor, nor, G.obedit->obmat[3]); BIF_setSingleAxisConstraint(nor); + } Transform(TFM_TRANSLATION); } #else diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 1dee3072025..42f081c55e4 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -1550,10 +1550,18 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) countall(); makeDispList(G.obedit); } - else if((G.qual==LR_ALTKEY) && G.obedit->type==OB_CURVE) - clear_tilt(); - else if((G.qual==0)) - transform('t'); + if (G.obedit->type==OB_CURVE) { + if (G.qual==LR_ALTKEY) { + clear_tilt(); + } + else if (G.qual==0) { +#ifdef NEWTRANSFORM + Transform(TFM_TILT); +#else + transform('t'); +#endif + } + } } else if(G.qual==LR_CTRLKEY) { make_track(); diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index fb024d9b05b..0a598fd52f8 100755 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -410,6 +410,7 @@ static void createTransPose(void) for(i=0; iext= tdx; td->tdi = NULL; + td->val = NULL; } /* recursive fill trans data */ td= Trans.data; @@ -452,6 +453,7 @@ static void createTransArmatureVerts(void) td->ext = NULL; td->tdi = NULL; + td->val = NULL; td++; } @@ -466,6 +468,7 @@ static void createTransArmatureVerts(void) td->ext = NULL; td->tdi = NULL; + td->val = NULL; td++; } @@ -513,6 +516,7 @@ static void createTransMBallVerts(void) td->ext = tx; td->tdi = NULL; + td->val = NULL; tx->size = &ml->expx; tx->isize[0] = ml->expx; @@ -582,6 +586,7 @@ static void createTransCurveVerts(void) else td->flag= 0; td->ext = NULL; td->tdi = NULL; + td->val = NULL; Mat3CpyMat3(td->smtx, smtx); Mat3CpyMat3(td->mtx, mtx); @@ -589,6 +594,7 @@ static void createTransCurveVerts(void) td++; count++; } + /* THIS IS THE CV, the other two are handles */ if(propmode || (bezt->f2 & 1)) { VECCOPY(td->iloc, bezt->vec[1]); td->loc= bezt->vec[1]; @@ -597,6 +603,8 @@ static void createTransCurveVerts(void) else td->flag= 0; td->ext = NULL; td->tdi = NULL; + td->val = &(bezt->alfa); + td->ival = bezt->alfa; Mat3CpyMat3(td->smtx, smtx); Mat3CpyMat3(td->mtx, mtx); @@ -612,6 +620,7 @@ static void createTransCurveVerts(void) else td->flag= 0; td->ext = NULL; td->tdi = NULL; + td->val = NULL; Mat3CpyMat3(td->smtx, smtx); Mat3CpyMat3(td->mtx, mtx); @@ -633,6 +642,8 @@ static void createTransCurveVerts(void) else td->flag= 0; td->ext = NULL; td->tdi = NULL; + td->val = &(bp->alfa); + td->ival = bp->alfa; Mat3CpyMat3(td->smtx, smtx); Mat3CpyMat3(td->mtx, mtx); @@ -690,6 +701,7 @@ static void createTransLatticeVerts(void) td->ext = NULL; td->tdi = NULL; + td->val = NULL; td++; count++; @@ -717,6 +729,7 @@ static void VertsToTransData(TransData *td, EditVert *eve) td->ext = NULL; td->tdi = NULL; + td->val = NULL; } static void createTransEditVerts(void) @@ -1190,12 +1203,14 @@ static void createTransObject(void) } else { ObjectToTransData(td, ob); - td->tdi= NULL; + td->tdi = NULL; + td->val = NULL; } } else { ObjectToTransData(td, ob); - td->tdi= NULL; + td->tdi = NULL; + td->val = NULL; } td++; tx++; @@ -1266,12 +1281,6 @@ void Transform(int mode) areawinset(curarea->win); Mat3One(mati); - /* FOR TESTS - { - float axis[3] = {0.0f, 0.0f, 1.0f}; - VecRotToMat3(axis, M_PI / 3, mati); - } - */ /* stupid PET initialisation code */ /* START */ @@ -1325,6 +1334,9 @@ void Transform(int mode) case TFM_SHRINKFATTEN: initShrinkFatten(&Trans); break; + case TFM_TILT: + initTilt(&Trans); + break; } // Emptying event queue @@ -1360,9 +1372,11 @@ void Transform(int mode) if(val) { switch (event){ - // enforce redraw of transform when modifiers are used + /* enforce redraw of transform when modifiers are used */ case LEFTCTRLKEY: case RIGHTCTRLKEY: + case LEFTSHIFTKEY: + case RIGHTSHIFTKEY: Trans.redraw = 1; break; @@ -1401,7 +1415,7 @@ void Transform(int mode) else if(cmode == 'x') { if (G.qual == 0) setLocalConstraint(&Trans, (CON_AXIS0), "along local X"); - else if (G.qual == LR_ALTKEY) + else if (G.qual == LR_SHIFTKEY) setLocalConstraint(&Trans, (CON_AXIS1|CON_AXIS2), "locking local X"); cmode = 'X'; @@ -1409,7 +1423,7 @@ void Transform(int mode) else { if (G.qual == 0) setConstraint(&Trans, mati, (CON_AXIS0), "along global X"); - else if (G.qual == LR_ALTKEY) + else if (G.qual == LR_SHIFTKEY) setConstraint(&Trans, mati, (CON_AXIS1|CON_AXIS2), "locking global X"); cmode = 'x'; @@ -1424,7 +1438,7 @@ void Transform(int mode) else if(cmode == 'y') { if (G.qual == 0) setLocalConstraint(&Trans, (CON_AXIS1), "along global Y"); - else if (G.qual == LR_ALTKEY) + else if (G.qual == LR_SHIFTKEY) setLocalConstraint(&Trans, (CON_AXIS0|CON_AXIS2), "locking global Y"); cmode = 'Y'; @@ -1432,7 +1446,7 @@ void Transform(int mode) else { if (G.qual == 0) setConstraint(&Trans, mati, (CON_AXIS1), "along local Y"); - else if (G.qual == LR_ALTKEY) + else if (G.qual == LR_SHIFTKEY) setConstraint(&Trans, mati, (CON_AXIS0|CON_AXIS2), "locking local Y"); cmode = 'y'; @@ -1447,7 +1461,7 @@ void Transform(int mode) else if(cmode == 'z') { if (G.qual == 0) setLocalConstraint(&Trans, (CON_AXIS2), "along local Z"); - else if (G.qual == LR_ALTKEY) + else if (G.qual == LR_SHIFTKEY) setLocalConstraint(&Trans, (CON_AXIS0|CON_AXIS1), "locking local Z"); cmode = 'Z'; @@ -1455,7 +1469,7 @@ void Transform(int mode) else { if (G.qual == 0) setConstraint(&Trans, mati, (CON_AXIS2), "along global Z"); - else if (G.qual == LR_ALTKEY) + else if (G.qual == LR_SHIFTKEY) setConstraint(&Trans, mati, (CON_AXIS0|CON_AXIS1), "locking global Z"); cmode = 'z'; @@ -1492,6 +1506,13 @@ void Transform(int mode) } else { switch (event){ + /* enforce redraw of transform when modifiers are used */ + case LEFTCTRLKEY: + case RIGHTCTRLKEY: + case LEFTSHIFTKEY: + case RIGHTSHIFTKEY: + Trans.redraw = 1; + break; case MIDDLEMOUSE: postSelectConstraint(&Trans); Trans.redraw = 1; @@ -2390,3 +2411,91 @@ int ShrinkFatten(TransInfo *t, short mval[2]) return 1; } + +/* ************************** TILT *************************** */ + +void initTilt(TransInfo *t) +{ + t->idx_max = 0; + t->num.idx_max = 0; + t->snap[0] = 0.0f; + t->snap[1] = G.vd->grid * (float)((5.0/180)*M_PI); + t->snap[2] = t->snap[1] * 0.2f; + t->fac = 0; + t->transform = Tilt; +} + + + +int Tilt(TransInfo *t, short mval[2]) +{ + TransData *td = t->data; + int i; + char str[50]; + + float final; + + int dx2 = t->center2d[0] - mval[0]; + int dy2 = t->center2d[1] - mval[1]; + float B = (float)sqrt(dx2*dx2+dy2*dy2); + + int dx1 = t->center2d[0] - t->imval[0]; + int dy1 = t->center2d[1] - t->imval[1]; + float A = (float)sqrt(dx1*dx1+dy1*dy1); + + int dx3 = mval[0] - t->imval[0]; + int dy3 = mval[1] - t->imval[1]; + + float deler= ((dx1*dx1+dy1*dy1)+(dx2*dx2+dy2*dy2)-(dx3*dx3+dy3*dy3)) + / (2 * A * B); + + float dphi; + + dphi = saacos(deler); + if( (dx1*dy2-dx2*dy1)>0.0 ) dphi= -dphi; + + if(G.qual & LR_SHIFTKEY) t->fac += dphi/30.0f; + else t->fac += dphi; + + final = t->fac; + + snapGrid(t, &final); + + t->imval[0] = mval[0]; + t->imval[1] = mval[1]; + + if (hasNumInput(&t->num)) { + char c[20]; + + applyNumInput(&t->num, &final); + + outputNumInput(&(t->num), c); + + sprintf(str, "Tilt: %s %s", &c[0], t->proptext); + + final *= (float)(M_PI / 180.0); + } + else { + sprintf(str, "Tilt: %.2f %s", 180.0*final/M_PI, t->proptext); + } + + for(i = 0 ; i < t->total; i++, td++) { + if (td->flag & TD_NOACTION) + break; + + if (td->val) { + *td->val = td->ival + final * td->factor; + } + } + + recalcData(t); + + headerprint(str); + + force_draw(0); + + helpline (t->center); + + return 1; +} + diff --git a/source/blender/src/transform.h b/source/blender/src/transform.h index 20359cc00ec..b69999d4e94 100755 --- a/source/blender/src/transform.h +++ b/source/blender/src/transform.h @@ -83,7 +83,6 @@ typedef struct TransDataExtension { float *size; /* Size of the data to transform (Faculative) */ float isize[3]; /* Initial size */ float obmat[3][3]; /* Object matrix */ - void *bone; /* ARGH! old transform demanded it, added for now (ton) */ } TransDataExtension; @@ -92,6 +91,8 @@ typedef struct TransData { float factor; /* Factor of the transformation (for Proportionnal Editing) */ float *loc; /* Location of the data to transform */ float iloc[3]; /* Initial location */ + float *val; /* Value pointer for special transforms */ + float ival; /* Old value*/ float center[3]; /* Individual data center */ float mtx[3][3]; /* Transformation matrix from data space to global space */ float smtx[3][3]; /* Transformation matrix from global space to data space */ @@ -135,18 +136,6 @@ typedef struct TransInfo { #define NOFRACTION 16 #define AFFECTALL 32 -/* transinfo->mode */ -#define TFM_REPEAT 0 -#define TFM_TRANSLATION 1 -#define TFM_ROTATION 2 -#define TFM_RESIZE 3 -#define TFM_TOSPHERE 4 -#define TFM_SHEAR 5 -#define TFM_WARP 7 -#define TFM_SHRINKFATTEN 8 - -#define TFM_LAMP_ENERGY 10 - /* transinfo->flag */ #define T_OBJECT 1 #define T_EDIT 2 @@ -161,12 +150,6 @@ typedef struct TransInfo { #define CON_SELECT 16 #define CON_NOFLIP 32 /* does not reorient vector to face viewport when on */ -#define PROP_SHARP 0 -#define PROP_SMOOTH 1 -#define PROP_ROOT 2 -#define PROP_LIN 3 -#define PROP_CONST 4 - /* transdata->flag */ #define TD_SELECTED 1 #define TD_NOACTION 2 @@ -195,5 +178,8 @@ int Rotation(TransInfo *t, short mval[2]); void initShrinkFatten(TransInfo *t); int ShrinkFatten(TransInfo *t, short mval[2]); +void initTilt(TransInfo *t); +int Tilt(TransInfo *t, short mval[2]); + #endif diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index 5793ffc69e7..00cacf39502 100755 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -117,7 +117,7 @@ void getConstraintMatrix(TransInfo *t); void constraintNumInput(TransInfo *t, float vec[3]) { int mode = t->con.mode; - float nval = (t->num.flags & NULLONE)?1.0f:0.0f; + float nval = (t->num.flag & NULLONE)?1.0f:0.0f; if (getConstraintSpaceDimension(t) == 2) { if (mode & (CON_AXIS0|CON_AXIS1)) { @@ -158,7 +158,7 @@ static void postConstraintChecks(TransInfo *t, float vec[3], float pvec[3]) { snapGrid(t, vec); - if (t->num.flags & NULLONE) { + if (t->num.flag & NULLONE) { if (!(t->con.mode & CON_AXIS0)) vec[0] = 1.0f; @@ -394,6 +394,7 @@ static void applyObjectConstraintSize(TransInfo *t, TransData *td, float smat[3] Mat3MulMat3(smat, td->axismtx, tmat); } } + /* * Generic callback for constant spacial constraints applied to rotations * @@ -481,25 +482,25 @@ static void drawObjectConstraint(TransInfo *t) { TransData * td = t->data; if (t->con.mode & CON_AXIS0) { - drawLine(td->ob->obmat[3], td->axismtx[0], 255 - 'x'); + drawLine(td->ob->obmat[3], td->axismtx[0], 'x', DRAWLIGHT); } if (t->con.mode & CON_AXIS1) { - drawLine(td->ob->obmat[3], td->axismtx[1], 255 - 'y'); + drawLine(td->ob->obmat[3], td->axismtx[1], 'y', DRAWLIGHT); } if (t->con.mode & CON_AXIS2) { - drawLine(td->ob->obmat[3], td->axismtx[2], 255 - 'z'); + drawLine(td->ob->obmat[3], td->axismtx[2], 'z', DRAWLIGHT); } td++; for(i=1;itotal;i++,td++) { if (t->con.mode & CON_AXIS0) { - drawLine(td->ob->obmat[3], td->axismtx[0], 'x'); + drawLine(td->ob->obmat[3], td->axismtx[0], 'x', 0); } if (t->con.mode & CON_AXIS1) { - drawLine(td->ob->obmat[3], td->axismtx[1], 'y'); + drawLine(td->ob->obmat[3], td->axismtx[1], 'y', 0); } if (t->con.mode & CON_AXIS2) { - drawLine(td->ob->obmat[3], td->axismtx[2], 'z'); + drawLine(td->ob->obmat[3], td->axismtx[2], 'z', 0); } } } @@ -541,11 +542,6 @@ void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[]) t->con.mode = mode; getConstraintMatrix(t); - VECCOPY(t->con.center, t->center); - if (t->flag & T_EDIT) { - Mat4MulVecfl(G.obedit->obmat, t->con.center); - } - startConstraint(t); t->con.applyVec = applyAxisConstraintVec; @@ -570,8 +566,6 @@ void setLocalConstraint(TransInfo *t, int mode, const char text[]) { t->con.mode = mode; getConstraintMatrix(t); - VECCOPY(t->con.center, t->center); - startConstraint(t); t->con.drawExtra = drawObjectConstraint; @@ -599,11 +593,6 @@ void BIF_setSingleAxisConstraint(float vec[3]) { t->con.mode = (CON_AXIS0|CON_APPLY); getConstraintMatrix(t); - VECCOPY(t->con.center, t->center); - if (t->flag & T_OBJECT) { - Mat4MulVecfl(G.obedit->obmat, t->con.center); - } - t->con.drawExtra = NULL; t->con.applyVec = applyAxisConstraintVec; t->con.applySize = applyAxisConstraintSize; @@ -613,7 +602,6 @@ void BIF_setSingleAxisConstraint(float vec[3]) { void BIF_drawConstraint(void) { - //int i = -1; TransInfo *t = BIF_GetTransInfo(); TransCon *tc = &(t->con); @@ -625,19 +613,19 @@ void BIF_drawConstraint(void) } else { if (tc->mode & CON_SELECT) { - drawLine(tc->center, tc->mtx[0], 'x'); - drawLine(tc->center, tc->mtx[1], 'y'); - drawLine(tc->center, tc->mtx[2], 'z'); + drawLine(tc->center, tc->mtx[0], 'x', 0); + drawLine(tc->center, tc->mtx[1], 'y', 0); + drawLine(tc->center, tc->mtx[2], 'z', 0); } if (tc->mode & CON_AXIS0) { - drawLine(tc->center, tc->mtx[0], 255 - 'x'); + drawLine(tc->center, tc->mtx[0], 'x', DRAWLIGHT); } if (tc->mode & CON_AXIS1) { - drawLine(tc->center, tc->mtx[1], 255 - 'y'); + drawLine(tc->center, tc->mtx[1], 'y', DRAWLIGHT); } if (tc->mode & CON_AXIS2) { - drawLine(tc->center, tc->mtx[2], 255 - 'z'); + drawLine(tc->center, tc->mtx[2], 'z', DRAWLIGHT); } } } @@ -783,7 +771,7 @@ void setNearestAxis(TransInfo *t) } if (len[0] < len[1] && len[0] < len[2]) { - if (G.qual == LR_ALTKEY) { + if (G.qual & LR_SHIFTKEY) { t->con.mode |= (CON_AXIS1|CON_AXIS2); strcpy(t->con.text, " locking global X"); } @@ -793,7 +781,7 @@ void setNearestAxis(TransInfo *t) } } else if (len[1] < len[0] && len[1] < len[2]) { - if (G.qual == LR_ALTKEY) { + if (G.qual & LR_SHIFTKEY) { t->con.mode |= (CON_AXIS0|CON_AXIS2); strcpy(t->con.text, " locking global Y"); } @@ -803,7 +791,7 @@ void setNearestAxis(TransInfo *t) } } else if (len[2] < len[1] && len[2] < len[0]) { - if (G.qual == LR_ALTKEY) { + if (G.qual & LR_SHIFTKEY) { t->con.mode |= (CON_AXIS0|CON_AXIS1); strcpy(t->con.text, " locking global Z"); } diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index 5fe4c2ec09d..7c8e7ecc7ba 100755 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -289,21 +289,21 @@ void recalcData(TransInfo *t) void initTransModeFlags(TransInfo *t, int mode) { t->flag = 0; - t->num.flags = 0; + t->num.flag = 0; t->mode = mode; switch (mode) { case TFM_RESIZE: - t->num.flags |= NULLONE; - t->num.flags |= AFFECTALL; + t->num.flag |= NULLONE; + t->num.flag |= AFFECTALL; if (!G.obedit) { t->flag |= NOZERO; - t->num.flags |= NOZERO; + t->num.flag |= NOZERO; } break; case TFM_TOSPHERE: - t->num.flags |= NULLONE; - t->num.flags |= NONEGATIVE; + t->num.flag |= NULLONE; + t->num.flag |= NONEGATIVE; t->flag |= NOCONSTRAINT; break; case TFM_SHEAR: @@ -312,7 +312,7 @@ void initTransModeFlags(TransInfo *t, int mode) } } -void drawLine(float *center, float *dir, char axis) +void drawLine(float *center, float *dir, char axis, short options) { extern void make_axis_color(char *col, char *col2, char axis); // drawview.c float v1[3], v2[3], v3[3]; @@ -326,9 +326,8 @@ void drawLine(float *center, float *dir, char axis) VecSubf(v2, center, v3); VecAddf(v1, center, v3); - if (axis > 127) { - axis = -1 * (axis - 255); - col[0] = col[1] = col[2] = 200; + if (options & DRAWLIGHT) { + col[0] = col[1] = col[2] = 220; } else { BIF_GetThemeColor3ubv(TH_GRID, col); @@ -473,7 +472,9 @@ void restoreTransObjects(TransInfo *t) for (td = t->data; td < t->data + t->total; td++) { VECCOPY(td->loc, td->iloc); - + if (td->val) { + *td->val = td->ival; + } if (td->ext) { if (td->ext->rot) { VECCOPY(td->ext->rot, td->ext->irot); @@ -623,6 +624,12 @@ void calculateCenter(TransInfo *t) break; } + /* setting constraint center */ + VECCOPY(t->con.center, t->center); + if(t->flag & T_EDIT) { + Mat4MulVecfl(G.obedit->obmat, t->con.center); + } + /* voor panning from cameraview */ if(t->flag & T_OBJECT) { if( G.vd->camera==OBACT && G.vd->persp>1) { diff --git a/source/blender/src/transform_generics.h b/source/blender/src/transform_generics.h index a957bc3b059..54cbdfaa7f6 100755 --- a/source/blender/src/transform_generics.h +++ b/source/blender/src/transform_generics.h @@ -37,9 +37,12 @@ void recalcData(TransInfo *t); void initTransModeFlags(TransInfo *t, int mode); -void drawLine(float *center, float *dir, char axis); +void drawLine(float *center, float *dir, char axis, short options); -void postTrans (TransInfo *t); +/* DRAWLINE options flags */ +#define DRAWLIGHT 1 +#define DRAWDASHED 2 +#define DRAWBOLD 4 void apply_grid1(float *val, int max_index, float factor); void apply_grid2(float *val, int max_index, float factor, float factor2); @@ -49,6 +52,7 @@ void applyTransObjects(TransInfo *t); void restoreTransObjects(TransInfo *t); void initTrans(TransInfo *t); +void postTrans (TransInfo *t); void calculateCenterBound(TransInfo *t); void calculateCenterMedian(TransInfo *t); diff --git a/source/blender/src/transform_numinput.c b/source/blender/src/transform_numinput.c index c83955f46f7..dcf582b41e7 100755 --- a/source/blender/src/transform_numinput.c +++ b/source/blender/src/transform_numinput.c @@ -67,7 +67,7 @@ void outputNumInput(NumInput *n, char *str) for (j=0; j<=n->idx_max; j++) { /* if AFFECTALL and no number typed and cursor not on number, use first number */ - if (n->flags & AFFECTALL && n->idx != j && n->ctrl[j] == 0) + if (n->flag & AFFECTALL && n->idx != j && n->ctrl[j] == 0) i = 0; else i = j; @@ -125,15 +125,15 @@ void applyNumInput(NumInput *n, float *vec) if (hasNumInput(n)) { for (j=0; j<=n->idx_max; j++) { /* if AFFECTALL and no number typed and cursor not on number, use first number */ - if (n->flags & AFFECTALL && n->idx != j && n->ctrl[j] == 0) + if (n->flag & AFFECTALL && n->idx != j && n->ctrl[j] == 0) i = 0; else i = j; - if (n->ctrl[i] == 0 && n->flags & NULLONE) { + if (n->ctrl[i] == 0 && n->flag & NULLONE) { vec[j] = 1.0f; } - else if (n->val[i] == 0.0f && n->flags & NOZERO) { + else if (n->val[i] == 0.0f && n->flag & NOZERO) { vec[j] = 0.0001f; } else { @@ -165,7 +165,7 @@ char handleNumInput(NumInput *n, unsigned short event) break; case PERIODKEY: case PADPERIOD: - if (n->flags & NOFRACTION) + if (n->flag & NOFRACTION) break; switch (n->ctrl[idx]) @@ -179,7 +179,7 @@ char handleNumInput(NumInput *n, unsigned short event) } break; case MINUSKEY: - if (n->flags & NONEGATIVE) + if (n->flag & NONEGATIVE) break; if (n->ctrl[idx]) { diff --git a/source/blender/src/transform_numinput.h b/source/blender/src/transform_numinput.h index 61e99dd3ac2..36114c7cc71 100755 --- a/source/blender/src/transform_numinput.h +++ b/source/blender/src/transform_numinput.h @@ -36,7 +36,7 @@ typedef struct NumInput { short idx; short idx_max; - short flags; /* Different flags to indicate different behaviors */ + short flag; /* Different flags to indicate different behaviors */ float val[3]; /* Direct value of the input */ short ctrl[3]; /* Control to indicate what to do with the numbers that are typed */ } NumInput ;