Feature request: make camera animation keyframing similar to other 3d programs
I ended up writing a macro to help make this easier for my own work, but there are issues with saving the keyframes I've created #21598 (closed) . That said, I think the macro is still worth looking at as a base for a simple improvement to the animation workflow.
Here's the community forum link that I started with that includes the macro code. https://discourse.paraview.org/t/animation-keytime-integer-error/10454
Here's the macro code for anyone interested.
from paraview.simple import *
kf = CameraKeyFrame()
anim = GetAnimationScene()
## change below by dividing by total
kf.KeyTime = anim.AnimationTime/anim.EndTime
print(kf.KeyTime)
rv = GetActiveViewOrCreate("RenderView")
print(rv)
campos = rv.CameraPosition
camfoc = rv.CameraFocalPoint
up = rv.CameraViewUp
kf.Position = campos
kf.FocalPoint = camfoc
kf.ViewUp =up
print(campos,camfoc)
pscale = rv.CameraParallelScale
# typically the camera will have been added after the default one
# todo figure out a better way to select by name Camera
cue = anim.Cues[1]
print(cue)
cue.KeyFrames.append(kf)
print("appended frame")