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>2007-04-05 17:54:23 +0400
committerMatt Ebb <matt@mke3.net>2007-04-05 17:54:23 +0400
commita5e82ca3e99e80fd9b1607bb2c47dadc4874105b (patch)
tree40a4eaa5cf309aed52b71f91e4775c048eb73421 /source/blender/src/interface.c
parent6adecec7c197b20d397be94c63758de6fc17a68d (diff)
* Tablet pressure sensitivity in number field dragging (again!)
This time, it's temporarily hidden by default, but active with rt: set to 5. If anyone that was having probs with it before could test and let me know if things go without issues, that would be appreciated!
Diffstat (limited to 'source/blender/src/interface.c')
-rw-r--r--source/blender/src/interface.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index ddbea7dfe4c..40685e9a0e9 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -2101,7 +2101,7 @@ static int ui_act_as_text_but(uiBut *but)
static int ui_do_but_NUM(uiBut *but)
{
double value;
- float deler, fstart, f, tempf;
+ float deler, fstart, f, tempf, pressure;
int lvalue, temp, orig_x; /* , firsttime=1; */
short retval=0, qual, sx, mval[2], pos=0;
@@ -2136,6 +2136,7 @@ static int ui_do_but_NUM(uiBut *but)
while (get_mbut() & L_MOUSE) {
qual= get_qual();
+ pressure = get_pressure();
uiGetMouse(mywinget(), mval);
@@ -2150,7 +2151,9 @@ static int ui_do_but_NUM(uiBut *but)
if(qual & LR_ALTKEY) deler*= 20.0;
/* de-sensitise based on tablet pressure */
- /* if (G.rt == 0) deler /= pressure; */
+ if (G.rt == 5) {
+ if (ELEM(get_activedevice(), DEV_STYLUS, DEV_ERASER)) deler /= pressure;
+ }
if(mval[0] != sx) {
if( but->pointype==FLO && but->max-but->min > 11) {