Is there a python function that sets ortho view such that X and Y axes are visible - the equivalent of numpad 7?
Thanks in advance!
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 communityIs there a python function that sets ortho view such that X and Y axes are visible - the equivalent of numpad 7?
Thanks in advance!
You can override the context when calling view_axis() operator:
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