When I set the parallel projection parameter of the 3D view in the Python Console, the camera updates, but the parallel projection button in the 3D viewer does not. If it’s toggled off using the button and turned on programmatically, it reverts back to off after scene interaction.
I tried calling slicer.app.processEvents()
and triggering different events, but I don’t seem to be able to get this setting to update.
This can be replicated with the code below.
viewNode1 = slicer.mrmlScene.GetFirstNodeByName("View1")
camera1 = slicer.modules.cameras.logic().GetViewActiveCameraNode(viewNode1)
camera1.SetParallelProjection(0)
camera1.SetParallelProjection(1)