I have tried to write a script to set the 3d view to the top view and also turn it in into an orthogonal projection
The closest I have got to the objective is based on this code found in this thread which can set the view to Top, however, it won't change the projection to an orthogonal one.
import bpy
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
override = bpy.context.copy()
override['area'] = area
bpy.ops.view3d.view_axis(override, type='TOP')
break
I have found that the following code is listed as the operation that flips perspective into ortogonal view, however I have been unable to implement it without raising errors.
bpy.ops.view3d.view_persportho()
view_matrix
directly. blender.stackexchange.com/questions/265693/… $\endgroup$