Camera Transform

Hi,
I create a camera and set its transform using Xformable. I look at the properties of the camera and they are exactly what I set them as. Then I set my viewport to that camera. The properties I set are changed. Its almost like its calculating different decompositions. Why is that?

Also changing a cameras position with the gizmo, then using viewport.set_active_camera and viewport.set_camera_target resets the position of the camera from before the gizmo change.

@parrotdora

For issue 1, when a camera is initially created, its pre-filled with default values. When the camera is linked to a viewport, it recalculates verticalAperture attribute based on the resolution of the viewport. So, ratio of width and height will match ratio of horizontalAperture and verticalAperture

For issue 2, I can repro the behavior. It looks like you have to use set_camera_position to maintain the camera’s position before running set_camera_target