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:
authorChristopher Peerman <chris_82>2019-01-14 19:46:49 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-14 22:48:11 +0300
commit46932079184754ace63b25f854e3f273fbf6f0c5 (patch)
tree2d17a33cccbb5e873b090d319add3485528ace54 /source/blender/makesdna
parenteaf282b375598e63876465735519ab3190bd3214 (diff)
Windows: add support for Windows Ink.
Before this Blender always needed the Wintab driver. This adds support for the native pressure API in Windows 8+, making it possible to get pressure sensitivity on e.g. Microsoft Surface hardware without any extra drivers. By default Blender will automatically use Wintab if available, and if not use Windows Ink instead. There is also a new user preference to explicitly specify which API to use if automatic detection fails. Fixes T57869: no pressure sensitivity with Surface pen or laptop. Code by Christopher Peerman with some tweaks by Brecht Van Lommel. Differential Revision: https://developer.blender.org/D4165
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index a749fba5026..a653aaec671 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -694,13 +694,16 @@ typedef struct UserDef {
/** Seconds to zoom around current frame. */
float view_frame_seconds;
- char _pad1[4];
+ char _pad1[2];
/** Private, defaults to 20 for 72 DPI setting. */
short widget_unit;
short anisotropic_filter;
short use_16bit_textures, use_gpu_mipmap;
+ /** Tablet API to use (Windows only). */
+ short tablet_api;
+
/** Raw tablet pressure that maps to 100%. */
float pressure_threshold_max;
/** Curve non-linearity parameter. */
@@ -915,6 +918,13 @@ typedef enum eUserpref_UI_Flag2 {
USER_TRACKPAD_NATURAL = (1 << 2),
} eUserpref_UI_Flag2;
+/* UserDef.tablet_api */
+typedef enum eUserpref_TableAPI {
+ USER_TABLET_AUTOMATIC = 0,
+ USER_TABLET_NATIVE = 1,
+ USER_TABLET_WINTAB = 2,
+} eUserpref_TabletAPI;
+
/* UserDef.app_flag */
typedef enum eUserpref_APP_Flag {
USER_APP_LOCK_UI_LAYOUT = (1 << 0),