Methods ¶
stash()
→ hou.GeometryViewportCamera
Create a copy of the camera settings which can be used to store the view, usually so it can be restored later. Stashed camera settings are not connected to a viewport, so modifying them will have no effect on the viewport until it is passed to the viewport via hou.GeometryViewport.setDefaultCamera()
.
setPerspective(perspective)
Set the camera view to perspective (True
) or orthographic (False
). Fixed orthographics views cannot be changed to perspective (Top, Bottom, Left, Right, Front, and Back).
isPerspective()
→ bool
Query if the camara view uses a perspective projection.
isOrthographic()
→ bool
Query if the camara view uses an orthographic projection.
setAperture(ap)
Set the aperture of the viewport camera. Throws an error if the viewport is looking though camera object and the view is not locked to that camera.
aperture()
→ float
Query the aperture of the viewport camera (or current camera).
setFocalLength(fl)
Set the focal length of the viewport camera. Throws an error if the viewport is looking though camera object and the view is not locked to that camera.
focalLength()
→ float
Query the focal length of the viewport camera (or current camera).
focalUnitScale()
→ float
Query the scale which needs to be applied to aperture and focal length due to the Focal Units parameter on the Camera object.
setAspectRatio(ar)
Set the view aspect ratio of the viewport camera (16:9 would be 1.777). Throws an error if the viewport is looking though camera object and the view is not locked to that camera.
aspectRatio()
→ float
setOrthoWidth(ow)
Set the orthographic width of the viewport camera. Throws an error if the viewport is looking though camera object and the view is not locked to that camera. This has no effect on perspective cameras.
orthoWidth()
→ float
setRotation(mat)
rotation()
→ hou.Matrix3
Query the rotation matrix of the viewport camera.
setTranslation(xyz)
translation()
→ 3-tuple of float
Query the translation (position) of the viewport camera.
setPivot(xyz)
pivot()
→ 3-tuple of float
Query the pivot of the viewport camera.
setClipPlanes(near_far)
clipPlanes()
→ 2-tuple of float
Query the clip planes of the viewport camera as (near,far).
setWindowOffset(xy)
windowOffset()
→ 2-tuple of float
Query the window offset of the viewport, in (0,1) space.
setWindowSize(size)
windowSize()
→ 2-tuple of float
Query the window size of the viewport, in (0,1) space.