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?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityimport 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?