How to toggle the button of "orthobutton" via python

Operating system: windows
Slicer version: 4.11.0-2019-06-23 r28335
Expected behavior:
Actual behavior:

Hi all,
What’s the sub-function to control the orthobutton to toggle here?
image
Thanks a lot.
Aiden

To update the rendering mode associated with the first 3D viewer:

viewNode = slicer.util.getNode('vtkMRMLViewNode1')

# Switch to orthographic
viewNode.SetRenderMode(slicer.vtkMRMLViewNode.Orthographic)

# Switch to perspective
viewNode.SetRenderMode(slicer.vtkMRMLViewNode.Perspective)
1 Like

@jcfr Really appreciate your quick answer! Thanks you very much!

1 Like