Page MenuHome

Trackpad: support for 'stitch_modal' and 'minimize_stretch_modal'
Needs RevisionPublic

Authored by Yevgeny Makarov (jenkm) on Sep 5 2020, 2:57 PM.

Details

Reviewers
Brecht Van Lommel (brecht)
Group Reviewers
User Interface
Summary

Trackpad support in addition to the mouse wheel
for stitch_modal and minimize_stretch_modal.

It is assumed that the "Trackpad Natural" preference is set correctly,
for more information, see D8550.

Diff Detail

Repository
rB Blender

Event Timeline

Yevgeny Makarov (jenkm) requested review of this revision.Sep 5 2020, 2:57 PM
Yevgeny Makarov (jenkm) created this revision.
Yevgeny Makarov (jenkm) edited the summary of this revision. (Show Details)
Brecht Van Lommel (brecht) requested changes to this revision.Mon, Oct 12, 3:14 PM

There's some code duplication here in two ways:

  • The computation of delta is duplicated between these two operators and other patches. It would be good if that was abstracted away in a WM_ function.
  • Applying the delta can be deduplicated with the mousewheel code. I think the blend clamping to 0.05..0.95 should also be preserved.
This revision now requires changes to proceed.Mon, Oct 12, 3:14 PM

I think the blend clamping to 0.05..0.95 should also be preserved.

It is actually clamped to 0.0..1.0.
It has a step in 0.1, so more than 0.05 gives 0 (at 0.1 minus 0.1).

Ok, that code is a bit more clever than it needs to be then. Putting that code to compute the delta in a common WM function is still good I think, it's not great to have that natural tracked logic duplicated in many places.