Tweak mode
RMB click drag to select and transform (grab). Release to confirm. (Cancel with esc) The difference with before is that it is a single motion, you don't have to click at the end of transform, you can just release the mouse button. (Some float constant warning too)
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#define CTX_TEXTURE 1
|
||||
#define CTX_EDGE 2
|
||||
#define CTX_NO_PET 4
|
||||
#define CTX_TWEAK 8
|
||||
|
||||
void initTransform(int mode, int context);
|
||||
void Transform(void);
|
||||
|
||||
@@ -300,7 +300,7 @@ static int return_editmesh_indexar(int **indexar, float *cent)
|
||||
nr++;
|
||||
}
|
||||
|
||||
VecMulf(cent, 1.0/(float)totvert);
|
||||
VecMulf(cent, 1.0f/(float)totvert);
|
||||
|
||||
return totvert;
|
||||
}
|
||||
@@ -354,7 +354,7 @@ static int return_editlattice_indexar(int **indexar, float *cent)
|
||||
nr++;
|
||||
}
|
||||
|
||||
VecMulf(cent, 1.0/(float)totvert);
|
||||
VecMulf(cent, 1.0f/(float)totvert);
|
||||
|
||||
return totvert;
|
||||
}
|
||||
@@ -448,7 +448,7 @@ static int return_editcurve_indexar(int **indexar, float *cent)
|
||||
}
|
||||
}
|
||||
|
||||
VecMulf(cent, 1.0/(float)totvert);
|
||||
VecMulf(cent, 1.0f/(float)totvert);
|
||||
|
||||
return totvert;
|
||||
}
|
||||
@@ -3424,7 +3424,7 @@ void std_rmouse_transform(void (*xf_func)(int, int))
|
||||
getmouseco_areawin(mval);
|
||||
if(abs(mval[0]-xo)+abs(mval[1]-yo) > 10) {
|
||||
if(curarea->spacetype==SPACE_VIEW3D) {
|
||||
initTransform(TFM_TRANSLATION, CTX_NONE);
|
||||
initTransform(TFM_TRANSLATION, CTX_TWEAK);
|
||||
Transform();
|
||||
}
|
||||
else if(xf_func)
|
||||
|
||||
@@ -519,8 +519,8 @@ static void transformEvent(unsigned short event, short val) {
|
||||
break;
|
||||
case LEFTMOUSE:
|
||||
case RIGHTMOUSE:
|
||||
/* commented out, doesn't work for actions started with menu */
|
||||
// Trans.state = TRANS_CONFIRM;
|
||||
if (Trans.context & CTX_TWEAK)
|
||||
Trans.state = TRANS_CONFIRM;
|
||||
break;
|
||||
case LEFTSHIFTKEY:
|
||||
case RIGHTSHIFTKEY:
|
||||
|
||||
Reference in New Issue
Block a user