System Information
Operating system: Linux-4.15.0-175-generic-x86_64-with-glibc2.27 64 Bits
Graphics card: NVIDIA GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.103.01
Blender Version
Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: rBbcfdb14560e7
Worked: 3.1 and earlier
Short description of error
I have a very simple operator, that runs bpy.ops.view3d.view_axis(type='TOP', align_active=True), makes the view orthographic and sets context.space_data.region_3d.is_orthographic_side_view = True
The last seems to be required, so the PreferencesInput.use_auto_perspective navigation setting (in preferences) works. Meaning, once the view is rotated the view switches back to perspective from orthographic.
This used to work beautifully for a long time. Unfortunately it no longer does as of Blender 3.2.
The reason being, setting context.space_data.region_3d.is_orthographic_side_view = True will actually change the viewport to a side view now, thereby loosing the alignment to the active selection.
I can understand if this was an intentional change, but would like to hear suggestions, about whether/how the previous behavior of the operator could then be reproduced now.
Thanks!
Exact steps for others to reproduce the error
- open the blend file in 3.1 and 3.2
- ensure use_auto_perspective is enabled in your navigation preferences
- in each one run the script, then call the ViewSelectionFromTop() operator in the 3d view
- in 3.1 it will align an orthographic view to the face, and once the viewport is rotated switch back to a perspective view
- commenting out the last line, will lead to the perspective switch no longer working
- in 3.2 it will go into an orthographic side view, no longer aligned to the face selection
- commenting out the last line, will lead to the perspective switch also no longer working, but the view is now still aligned with the selection