WIP: Wacom twist support for GHOST #107729

Draft
YimingWu wants to merge 6 commits from ChengduLittleA/blender:ghost_twist into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 3 additions and 0 deletions
Showing only changes of commit 776e3a92c8 - Show all commits

View File

@ -639,6 +639,8 @@ typedef struct wmTabletData {
float x_tilt;
/** as above. */
float y_tilt;
/** range (-pi,pi), with stylus button to the left side being 0. */
float twist;
/** Interpret mouse motion as absolute as typical for tablets. */
char is_motion_absolute;
} wmTabletData;

View File

@ -5138,6 +5138,7 @@ void wm_tablet_data_from_ghost(const GHOST_TabletData *tablet_data, wmTabletData
wmtab->pressure = wm_pressure_curve(tablet_data->Pressure);
wmtab->x_tilt = tablet_data->Xtilt;
wmtab->y_tilt = tablet_data->Ytilt;
wmtab->twist = tablet_data->Twist;
/* We could have a preference to support relative tablet motion (we can't detect that). */
wmtab->is_motion_absolute = true;
// printf("%s: using tablet %.5f\n", __func__, wmtab->pressure);