[SOLVED] Viewport orbit snap still does not work with Auto Perspective

I agree that auto-perspective should work when you snap the view using ALT while rotating. Would be sooo convenient!


Chiming in that when using the industry compatible keymap the current implementation of snapping view is very confusing, feels very much like it is picking the “wrong” view when I snap. The standard blender keymap seems to snap view appropriately but still has issue of not using auto-perspective.

Yea, I agree. The snapping does seem to be rather inconsistent and somewhat counter-intuitive.

In the case of a cube, such as @michaelknubben’s example, I would expect the face with the most visible surface area to be the one that snaps. Would be great to get a fix :slight_smile:

Actually I came across this thread via Google. I’m glad that others such as @LudvikKoutny had the exact same idea before me but it’s kinda disappointing that this feature didn’t get any attention.

However I found a solution to get the same functionality: just bind a key of your choice to view3d.view_axis, set view to Back and enable Relative.


This is not as convenient as hitting Alt while orbiting but still much better than going through some pie menu several times to find the right axis…

Hello! I’ve written some code and here’s the result:
Build with ortho axis snap
In this build with option Auto Perspective enabled view will turn to orthographic on snap (Alt key by default in Rotate View mode). Please have a look and give your feedback. In case everything is ok, I’ll make a pull request.

Known issues:

  • Snap to axis works not very good in top/bottom views because of view becomes parallel to reference axis value (0,0,1). Do not know how to overcome it
  • In case view snapping activated, then snap applied but not confirmed and snap key released, the view will remain orthographic, not perspective

Hey, this is amazing. Could you submit this as a patch request? It would be great if this made it into official Blender, as it would pretty much make concept of view switch menus/pies obsolete :slight_smile:

Hi everyone! I’m sorry for being absent :slight_smile:
Diff created and waiting to be approved/rejected.
I can share latest build with this feature if you need it.


Code was partially commited to master thanks to @ideasman42. Please have a check:

Now it’s time to fix exiting from User Orthographic view back to Perspective.


Hey, thanks so much for spending time on this! I’ve just tested and it indeed works, but as you said, exiting user ortho still does not restore perspective.

Also, user orthographic views do not display 2D Grid (Grid) but 3D grid (Floor) instead. 2D grid is a good indicator to let user know he’s in a 2D ortho mode. I know this is not completely related to this task, but I think it should be fixed alongside it.

Fix with exiting back to persp out of user ortho was just sent for review.

As for the issue with 2D Grid / 3D Floor. Can you please explain the desired behavior? I cannot see any problem: on snap apply, the view becomes ortho as before, no additional changes were done from my side.
Anyway, it looks like a separate request not related to this improvement.


@Skif The orthogrid has a finer/smaller gridsize.
You have to zoom in a bit in the start scene with a default cube,
the one grid still has subgrids, the other one not.

So Whenever in the Top Left corner Top Orthographic is displayed the grid itself differs from the cases where User Ortho is displayed.

Committed general support for axis views with axis aligned roll.

This means snapping to a view with roll is considered an axis-view by other operations such as auto-perspective switching.