Determine whether or not you are in perspective or orthographic view

I’ve been up and down through the Blender Python API but can only find an op for toggling between ortho and perspective but not just definitively set the 3D View as one or the other. Many thanks to ye who reply!

• How can I return whether I’m in ortho or perspective?
• How can I set the view specifically to ortho or perspective and not just toggle it.

area -> spaces -> region_3d

1 Like

Thanks. How would I write that down as a single line which could entered into the console and return ‘PERSP’, ‘ORTHO’ or ‘CAMERA’?

[ for area in bpy.context.screen.areas if area.type == 'VIEW_3D']

returns a list of the view perspectives of all visible 3d views

1 Like

This works. Thanks X.