# trace recorder and camera

**URL:** https://discourse.paraview.org/t/trace-recorder-and-camera/735
**Category:** ParaView Support
**Created:** [October 16, 2018, 1:00am UTC](https://discourse.paraview.org/t/trace-recorder-and-camera/735 "2018-10-16T01:00:49Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [October 16, 2018, 1:00am UTC](https://discourse.paraview.org/t/trace-recorder-and-camera/735/1 "2018-10-16T01:00:50Z")

</div>

The trace recorder does not record camera positions. Is this an oversight, or by design? How can a user find the camera position in a script?

Thanks,

Alan

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [October 16, 2018, 1:11am UTC](https://discourse.paraview.org/t/trace-recorder-and-camera/735/2 "2018-10-16T01:11:47Z")

</div>

We probably don’t record camera positions because even a moderate amount of interaction would spew many camera position changes and renders, and there wouldn’t be much point playing all of them back in a script. You can access the camera with

```auto
cam = GetActiveCamera()

```

and then query it’s position, focal plane, view up direction, etc.

```auto
position = cam.GetPosition()
focalPoint = cam.GetFocalPoint()
viewUp = cam.GetViewUp()

```

Use the equivalent setters to adjust these camera parameters in the script:

```auto
cam.SetPosition(position)
cam.SetFocalPoint(focalPoint)
cam.SetViewUp(viewUp)

```

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [October 16, 2018, 1:14am UTC](https://discourse.paraview.org/t/trace-recorder-and-camera/735/3 "2018-10-16T01:14:58Z")

</div>

Thanks, exactly what I needed.

I think I would prefer that we add the option to write the camera position into the trace, default off. Then, we would only save the camera position on a still render. Would that be doable?

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [October 16, 2018, 1:31am UTC](https://discourse.paraview.org/t/trace-recorder-and-camera/735/4 "2018-10-16T01:31:03Z")

</div>

I think that may be reasonable. It still may produced bloated traces, but since it would be off by default, it might not be too bad.

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [October 24, 2018, 5:39pm UTC](https://discourse.paraview.org/t/trace-recorder-and-camera/735/5 "2018-10-24T17:39:11Z")

</div>

Written up here. [https://gitlab.kitware.com/paraview/paraview/issues/18546](https://gitlab.kitware.com/paraview/paraview/issues/18546)

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [December 19, 2019, 11:48pm UTC](https://discourse.paraview.org/t/trace-recorder-and-camera/735/6 "2019-12-19T23:48:12Z")

</div>

I also want all explicit camera motions recorded. i wrote it up here: [https://gitlab.kitware.com/paraview/paraview/issues/19543](https://gitlab.kitware.com/paraview/paraview/issues/19543)

---

<div class="post-metadata">

### Author: ![Andrius](https://discourse.paraview.org/user_avatar/discourse.paraview.org/andrius/32/1837_2.png) [@Andrius](https://discourse.paraview.org/u/Andrius)
#### Post date: [August 6, 2020, 6:58am UTC](https://discourse.paraview.org/t/trace-recorder-and-camera/735/7 "2020-08-06T06:58:35Z")

</div>

Hi Cory and Everyone,

I want to set camera position in the script by checking the numbers (after changing camera angles in the view) but I could not access it in Python Shell.

```auto
cam = GetActiveCamera()
position = cam.GetPosition()
focalPoint = cam.GetFocalPoint()
viewUp = cam.GetViewUp()

```

How can I view the values after interacting with the view and running this script in Python Shell? Print() function is not available, and my pvpython is not working atm. In this case camera tracing would be great…

Thanks guys

---

<div class="post-metadata">

### Author: ![Andrius](https://discourse.paraview.org/user_avatar/discourse.paraview.org/andrius/32/1837_2.png) [@Andrius](https://discourse.paraview.org/u/Andrius)
#### Post date: [August 6, 2020, 7:31am UTC](https://discourse.paraview.org/t/trace-recorder-and-camera/735/8 "2020-08-06T07:31:00Z")

</div>

Actually I was able to get info on the camera by starting trace, moving the view and then stopping trace. The trace did not update just from moving the view, and rightfully so.

Here is the output:  
"# current camera placement for renderView1

renderView1.CameraPosition = [397.29119154962495, -98.19057934751415, 72.92565616277386]  
renderView1.CameraFocalPoint = [161.37200552532937, 99.19566278018993, -125.17297051758995]  
renderView1.CameraViewUp = [-0.3601033886339963, 0.41041040520919386, 0.8377880691382149]  
renderView1.CameraParallelScale = 94.69461918292063  
"
