How to know if the 3d-view is in camera mode or not?

Hello, i didnt find any line of code that translate the camera view state to a boolean value, i only saw a toggle operator, nothing else.

so basically the only way to check if the context area is in a camera view state is with a try except code ?

See context.space_data.region_3d.view_perspective which returns a string from an emum of PERSP, ORTHO and CAMERA.

3 Likes

thanks a lot ! id never find out without you