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:
authorNicholas Rishel <rishel.nick@gmail.com>2021-06-19 06:38:34 +0300
committerNicholas Rishel <rishel.nick@gmail.com>2021-06-19 07:03:13 +0300
commit46221219d880c8148f783788d88b712ec3d19ae0 (patch)
treea3f0c5b62a259566d8c2931fa1741a96780ada21 /source/blender/editors/space_view3d/view3d_walk.c
parent1a484889466650a4d3532437d94b9dfcb6126520 (diff)
Fix T83930 and Fix T84659: Walk navigation tablet bugs.fix-tablet-walk
Fixes T83930, allowing walk navigation to continue without jumping back after repositiong pen. Fixes T84659, allow walk navigation to start (for Windows Ink) from keyboard shortcut when pen is in use.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_walk.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index ab4cf0c2135..d6686696eea 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -693,6 +693,9 @@ static void walkEvent(bContext *C, WalkInfo *walk, const wmEvent *event)
if ((walk->center_mval[0] == event->mval[0]) && (walk->center_mval[1] == event->mval[1])) {
walk->is_cursor_first = false;
}
+ else if (event->tablet.is_motion_absolute) {
+ walk->is_cursor_first = false;
+ }
else {
/* note, its possible the system isn't giving us the warp event
* ideally we shouldn't have to worry about this, see: T45361 */
@@ -704,13 +707,19 @@ static void walkEvent(bContext *C, WalkInfo *walk, const wmEvent *event)
return;
}
- if ((walk->is_cursor_absolute == false) && event->tablet.is_motion_absolute) {
+ if (!walk->is_cursor_absolute && event->tablet.is_motion_absolute) {
walk->is_cursor_absolute = true;
copy_v2_v2_int(walk->prev_mval, event->mval);
copy_v2_v2_int(walk->center_mval, event->mval);
/* Without this we can't turn 180d with the default speed of 1.0. */
walk->mouse_speed *= 4.0f;
}
+ else if (walk->is_cursor_absolute && !event->tablet.is_motion_absolute) {
+ walk->is_cursor_absolute = false;
+ walk->is_cursor_first = true;
+ /* Return walk speed to normal. */
+ walk->mouse_speed = U.walk_navigation.mouse_speed;
+ }
#endif /* USE_TABLET_SUPPORT */
walk->moffset[0] += event->mval[0] - walk->prev_mval[0];