Unintuitive cameraViewport

I think the Reset function of the cameraViewport function is weirdly defined. Why is a default transform of (0,0,5) hardcoded in there. I personally feel like the intuitive thing would be to load the Xform parameters on Reset as a transformation.
Also, one cannot set the orthographic width directly in the user interface?

Thanks for the feedback. The (0,0,5) position was just chosen because that’s the default position for a newly placed basic Camera OBJ in TouchDesigner. You can change that if you want to in the Reset function in the CameraExt DAT inside the cameraViewport.

The orthographic width is set on the ‘View’ page of the cameraViewport node. It’s set as read-only because it’s normally controlled by the viewport interaction, but you can also set it manually either via python or by turning off the read-only state.

Let me know if you have any other questions or suggestions. We do continue to make improvements and additions to the cameraViewport component, but the intention is also to make it accessible for users to customize to particular projects.

How about defining the resetPosition via an objectCOMP?

And resetFunction gets this:

def Reset(self) -> None:
		mat = ( self.ownerComp.par.Resetcamera.eval() or self.ownerComp.op("default_reset_cam") ).localTransform
		#mat = tdu.Matrix();
		#mat.translate(0,0,5);
1 Like