0

I want to be able to change the current view port camera angle, as well as change to orthographic view mode. I couldn't find anything in the blender docs, so after searching it on the internet I found this stack overflow post from 2012

Though it appears to solve the problem, it's draw back is that it's almost a decade old. I was wondering if in that time, any changes have been made to bpy that allow better control over the viewport camera?

Specifically, like it's mentioned in the question I linked, I'd like to set the view port camera to the presets you get from typing the num keys, and I'd also like to switch between perspective and orthographic modes.

ORAS
  • 1
  • 1
  • 1
    In what way you would like to control the viewport camera? – brockmann Feb 11 '21 at 07:59
  • I updated the question to reflect this.@brockmann – ORAS Feb 12 '21 at 08:04
  • 1
    Easy, you can call bpy.ops.view3d.view_axis() operator, see: Set orthographic view using python?. If you'd like to switch between between 'ortho' and 'persp' just replace the operator with bpy.ops.view3d.view_persportho(override)... Re your Q (just trying to help): Please always try to ask a specific question here and ideally along with some code (showing some effort is part of the game), makes your question useful to future visitors too: https://blender.stackexchange.com/help/how-to-ask – brockmann Feb 12 '21 at 08:45
  • https://blender.stackexchange.com/questions/181110/what-is-the-python-command-to-check-if-current-view-is-in-orthographic-or-perspe https://blender.stackexchange.com/questions/91894/align-view-to-current-transform-orientation https://blender.stackexchange.com/questions/3426/access-view-orientation-from-python – batFINGER Feb 12 '21 at 14:36
  • 1
    Thanks @brockmann it worked! :D As for adding my code, none of it really worked, so I didn't think it'd be useful to the question... – ORAS Feb 12 '21 at 16:03
  • No problem @ORAS. If you need more, follow the links batFINGER posted, especially: https://blender.stackexchange.com/questions/3426/access-view-orientation-from-python – brockmann Feb 12 '21 at 16:07

0 Answers0