Camera position ignored when using parallel projection
Hi,
I cannot find any information about setting the camera position through a script for a camera with parallel projection enabled. I tried to approach this through the tracing mechanism in paraview, but setting the camera position programatically keeps getting ignored when in parallel projection mode and I cannot track down futher why this happens or whether I do something wrong.
To reproduce I execute the following script in Paraview 5.8.0 (current release)
# trace generated using paraview version 5.8.0
#
# To ensure correct image size when batch processing, please search
# for and uncomment the line `# renderView*.ViewSize = [*,*]`
#### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()
# create a new 'Sphere'
sphere1 = Sphere()
# get active view
renderView1 = GetActiveViewOrCreate('RenderView')
# uncomment following to set a specific view size
# renderView1.ViewSize = [1372, 791]
# show data in view
sphere1Display = Show(sphere1, renderView1, 'GeometryRepresentation')
# trace defaults for the display properties.
sphere1Display.Representation = 'Surface'
# update the view to ensure updated data information
renderView1.Update()
# Properties modified on renderView1
renderView1.CameraParallelProjection = 1
#### saving camera placements for all active views
# current camera placement for renderView1
renderView1.CameraPosition = [0.0, 0.0, 1.0]
#### uncomment the following to render all views
# RenderAllViews()
SaveScreenshot("screenshot.png", renderView1)
gives me the following result.
Now, commenting renderView1.CameraParallelProjection = 1
allows me to freely move the camera by changing CameraPosition
.