Page MenuHome

3DView: Use "real" angle for viewport roll
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Sep 21 2021, 9:21 AM.

Details

Summary

Since its introduction in rB5c569d227b64: patch [#35928] View roll operator from Kevin Mackay (yakca), with my own…, the view roll was based on
horizontal movement only. Using a "real" angle not only feels more
natural but also has the benefit of getting more precission the further
away from the center you are (just like regular rotation, brush/stencil
rotation etc.). A similar thing has already been implemented in the
Grease Pencil Tools Addon, now make the blender standard roll the same.

Since this is not using the transform system, we are still lacking a
line in the viewport (this could be added but since this is always based
on the center of the view we dont necessarily need this), as well as the
additional Shift-extra-precission behavior.

This also adds the ability to cancel out of the roll using ESC or RMB
(which is not common for viewops -- but makes sense in the case of roll
I think). This resets the view as well as potential locked cameras to
the original orientations (but does not remove potential autokeys --
which no transform does on cancel btw.)

Fixes T89883

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Sep 21 2021, 9:21 AM
Philipp Oeser (lichtwerk) created this revision.

@Antonio Vazquez (antoniov): just letting you know since if this makes its way into master, the Grease Pencil Tools Addon might use this instead of its own implementation.

@Antonio Vazquez (antoniov): just letting you know since if this makes its way into master, the Grease Pencil Tools Addon might use this instead of its own implementation.

I think we need ask to @Samuel Bernou (Pullup) , He is the creator of the add-on.

Campbell Barton (campbellbarton) requested changes to this revision.EditedSep 24 2021, 6:27 AM

This change seems like the way to go, however calculating rotation this way isn't so reliable.

This patch can be updated to use BLI_dial_angle which handles accumulating rotation.

This revision now requires changes to proceed.Sep 24 2021, 6:27 AM
source/blender/editors/space_view3d/view3d_edit.c
4411–4417

This can be committed separately.

  • use BLI_dial_angle()
This revision is now accepted and ready to land.Sep 27 2021, 11:06 AM