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:
authorMartin Poirier <theeth@yahoo.com>2005-08-16 22:23:28 +0400
committerMartin Poirier <theeth@yahoo.com>2005-08-16 22:23:28 +0400
commit392e4b89f5392ab937b9c66340b9e3362a75e794 (patch)
treecd918edb71230868557629957169b8097b87b764
parentcf8e8201409408e95c2653fbf085d0669be88b0c (diff)
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)
-rwxr-xr-xsource/blender/include/BIF_transform.h1
-rw-r--r--source/blender/src/editobject.c8
-rwxr-xr-xsource/blender/src/transform.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/include/BIF_transform.h b/source/blender/include/BIF_transform.h
index 7c5acf2cce8..4a161181a5c 100755
--- a/source/blender/include/BIF_transform.h
+++ b/source/blender/include/BIF_transform.h
@@ -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);
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index aee687b1ca6..33c78f27f45 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -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)
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c
index bcfdf6e1b2b..624808aa85a 100755
--- a/source/blender/src/transform.c
+++ b/source/blender/src/transform.c
@@ -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: