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:
authorMatt Ebb <matt@mke3.net>2008-02-13 16:26:46 +0300
committerMatt Ebb <matt@mke3.net>2008-02-13 16:26:46 +0300
commit08d54e71eaf7624dec3bb473dfa941faa04b85af (patch)
tree9d5732d9800a002931701704f8cef90199ffe694 /source/blender/src/editobject.c
parent78c3692b2e16c52dd31264c4804067ab792fd971 (diff)
* "Drag Immediately" transform user preference.
It's already supported within transform, was previously known as 'tweak mode' and for some odd reason was a compile time option. This brings it to a user preference (in 'Edit Methods' section). Basically it means that you don't need the extra click at the end to confirm a drag-move transform, if you're already dragged, you can just let go of the mouse rather than needing to click again. It's a lot more comfortable when you're used to using other applications as well as blender, and much more sensible for tablets. This started life as patch #7144 by Ed Britton, but this implementation has been changed considerably.
Diffstat (limited to 'source/blender/src/editobject.c')
-rw-r--r--source/blender/src/editobject.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 2040d8aedf6..e6edb472fc3 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -4063,6 +4063,7 @@ void std_rmouse_transform(void (*xf_func)(int, int))
short xo, yo;
short timer=0;
short mousebut;
+ short context = (U.flag & USER_DRAGIMMEDIATE)?CTX_TWEAK:CTX_NONE;
/* check for left mouse select/right mouse select */
@@ -4076,20 +4077,16 @@ void std_rmouse_transform(void (*xf_func)(int, int))
getmouseco_areawin(mval);
xo= mval[0];
yo= mval[1];
-
+
while(get_mbut() & mousebut) {
getmouseco_areawin(mval);
if(abs(mval[0]-xo)+abs(mval[1]-yo) > 10) {
if(curarea->spacetype==SPACE_VIEW3D) {
-#ifdef TWEAK_MODE
- initTransform(TFM_TRANSLATION, CTX_TWEAK);
-#else
- initTransform(TFM_TRANSLATION, CTX_NONE);
-#endif
+ initTransform(TFM_TRANSLATION, context);
Transform();
}
else if(curarea->spacetype==SPACE_IMAGE) {
- initTransform(TFM_TRANSLATION, CTX_NONE);
+ initTransform(TFM_TRANSLATION, context);
Transform();
}
else if(xf_func)