How can I check if view axis is “top”, “bottom” etc?

For example, using this bpy.ops.view3d.view_axis(type='TOP') I can set view axis to “TOP”. But how can I get current view axis?

Something like this for example:

if bpy.ops.view3d.view_axis == 'TOP':
    # Do something...

Please note: the question is about finding view axis, but not about to know if the view is perpective or orthographic.

this one may be helps

1 Like