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 eaa4537504 - Show all commits

View File

@ -975,6 +975,8 @@ GHOST_TSuccess GHOST_WindowWin32::getPointerInfo(
if (pointerPenInfo[i].penMask & PEN_MASK_ROTATION) {
/* POINTER_PEN_INFO specifies rotation range to be [0,359], convert to radiant here. */
outPointerInfo[i].tabletData.Twist = ((float)pointerPenInfo[i].rotation / 360.0f) * M_PI_2;
/* Debug only. */
printf("Twist (ink): %f\n", outPointerInfo[i].tabletData.Twist);
}
}

View File

@ -375,6 +375,7 @@ void GHOST_Wintab::getInput(std::vector<GHOST_WintabInfoWin32> &outWintabInfo)
}
if (m_maxTwist > 0) {
ORIENTATION ort = pkt.pkOrientation;
out.tabletData.Twist = float(float(ort.orTwist) / float(m_maxTwist) * M_PI);
}