Cameras store a position, a transform and camera related data like aperture, focal length,…
Note
Aperture represents the horizontal aperture. Shutter is zero centered.
Methods ¶
transform()
→ hou.Matrix3
Returns the camera’s transform.
position()
→ hou.Vector3
Returns the camera’s position.
aperture()
→ float
Returns the camera’s horizontal aperture.
pixelAspect()
→ float
Returns the camera’s pixel aspect.
focal()
→ float
Returns the camera’s focal length.
focusDistance()
→ float
Returns the camera’s focus distance.
imagingDistance()
→ float
Returns the camera’s imaging distance.
fstop()
→ float
Returns the camera’s fstop.
orthoZoom()
→ float
Returns the camera’s ortho zoom.
guideScale()
→ float
Returns the camera’s guide scale.
projection()
→ hou.EnumValue
Returns the camera’s projection as a hou.cameraProjection.
projectionToken()
→ str
Returns the camera’s projection as a string.
isOrthographic()
→ bool
Returns true if the camera’s projection is orthographic.
resolution()
→ tuple of int64
Returns the camera’s resolution as a tuple of 2 ints, eg. (1280, 720).
resolutionX()
→ int64
Returns the camera’s resolution in x.
resolutionY()
→ int64
Returns the camera’s resolution in y.
cropMin()
→ tuple of float
Returns the crop minimum as a tuple of 2 floats, minx and miny.
cropMax()
→ tuple of float
Returns the crop maximum as a tuple of 2 floats, maxx and maxy.
windowMin()
→ tuple of float
Returns the window minimum as a tuple of 2 floats, minx and miny.
windowMax()
→ tuple of float
Returns the window maximum as a tuple of 2 floats, maxx and maxy.
clippingPlanes()
→ tuple of float
Returns the clipping planes as a tuple of 2 floats, near and fear.
nearClippingPlane()
→ float
Returns the camera’s near clipping plane.
farClippingPlane()
→ float
Returns the camera’s far clipping plane.
shutter()
→ tuple of float
Returns the camera shutter time as a tuple of 2 floats, open and close.
shutterOpen()
→ float
Returns the camera’s shutter open.
shutterClose()
→ float
Returns the camera’s shutter close.
metadata()
→ dict
Returns the camera’s metadata
parms()
→ dict
Returns a dictionary of the camera parameters.
setTransform(transform: hou.Matrix3)
Sets the camera’s transform.
setPosition(position: hou.Vector3)
Sets the camera’s position.
setAperture(aperture: float)
Sets the camera’s aperture.
setPixelAspect(aspect: float)
Sets the camera’s pixel aspect.
setFocal(focal: float)
Sets the camera’s focal length.
setFocusDistance(focusdist: float)
Sets the camera’s focus distance.
setImagingDistance(imagingdist: float)
Sets the camera’s imaging distance.
setFstop(fstop: float)
Sets the camera’s fstop.
setOrthoZoom(zoom: float)
Sets the camera’s ortho zoom.
setGuideScale(scale: float)
Sets the camera’s guide scale.
setProjection(projection: hou.cameraProjection)
Sets the camera’s projection.
setResolution(res: tuple[int, int])
Sets the camera’s resolution.
setResolutionX(resx: int)
Sets the camera’s resolution in x
setResolutionY(resy: int)
Sets the camera’s resolution in y
setCropMin(min: tuple[float, float])
Sets the camera’s crop minimum.
setCropMax(max: tuple[float, float])
Sets the camera’s crop maximum.
setWindowMin(min: tuple[float, float])
Sets the camera’s window minimum.
setWindowMax(max: tuple[float, float])
Sets the camera’s window maximum.
setClippingPlanes(planes: tuple[float, float])
Sets the camera’s near and far clipping planes.
setNearClippingPlane(near: float)
Sets the camera’s near clipping plane.
setFarClippingPlane(far: float)
Sets the camera’s far clipping plane.
setShutter(shutter: tuple[float, float])
Sets the camera’s shutter time. Expects a tuple of 2 floats: (open, close). These should be zero centered, eg. (-0.25, 0.25).
setShutterOpen(sopen: float)
Sets the camera’s shutter open.
setShutterClose(sclose: float)
Sets the camera’s shutter close.
setMetadata(metadata: dict)
Sets the camera’s metadata.
setParms(parms: dict)
Sets the camera’s parameters from a dictionary. The dictionary should be formatted as such :
"aperture":41.4214,
"clipfar":10000,
"clipnear":0.01,
"cropmax":[1,1],
"cropmin":[0,0],
"focal":50,
"focusdistance":5,
"fstop":5.6,
"guidescale":1,
"imagingdistance":1,
"metadata":{
"myCoolMetadata" : 67
},
"orthozoom":1,
"pixelaspect":1,
"projection":"perspective",
"resolutionx":1280,
"resolutiony":720,
"shutterclose":0.25,
"shutteropen":-0.25,
"windowmax":[1,1],
"windowmin":[0,0]