I want to set the view to the XY-plane by using python script, so I have this as a result:
How can I do this?
I want to set the view to the XY-plane by using python script, so I have this as a result:
How can I do this?
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
Found here: Set orthographic view using python?