Methods ¶
setImageFile(file_path)
Set the filename of the background image and set the background source to 'File'.
imageFile()
→ str
Query the filename of the background image.
setImageCOP(op_path)
Set the path to the Composite operator defining the background image and set the background source to 'COP'.
imageCOP()
→ str
Query the operation path of the background image.
sourceFromCOP(use_cop)
Fetch the background image from a composite operator instead of a disk file. If False, a disk file is used.
isCOPSource()
→ bool
Query if the background image is sourced from a composite operator.
isFileSource()
→ bool
Query if the background image is sourced from a disk file.
setImageSource(file_or_op_path)
Set the file or cop path, depending on the current background image source.
imageSource()
→ str
Query the file or cop path, depending on the current background image source.
setAutoPlace(enable)
Automatically fit the background image to the viewport. If False, use the manual offset and scale to position the image.
autoPlace()
→ bool
Query if the background image is automatically fit to the viewport.
setImageFitMode(mode)
Sets how the auto-placed background image is fit to the viewport.
imageFitMode()
→ hou.geometryViewportBackgroundImageFitMode
Queries how the auto-placed background image is fit to the viewport.
setEnvironmentMap(enable)
Draw the background image as a 360 degree environment map, or a regular 2D image if set to False.
isEnvironmentMap()
→ bool
Query if the background image is drawn as 360 degree environment map..
setImageOffset(offset)
Set the background image offset, which is a 2-tuple of float. The values should be in the 0-1 range, representing fractions of the viewport width and height.
imageOffset()
→ tuple of float
Query the background image offset.
setImageScale(scale)
Set the background image scale, which is a 2-tuple of float. The values should be in the 0-1 range, representing fractions of the viewport width and height.
imageScale()
→ tuple of float
Query the background image scale.
setOpacity(opacity)
Set the opacity of the background image. A value of 1 makes it fully opaque, and smaller values turn it more transparent.
opacity()
→ float
Query the opacity of the background image.
setBrightness(intensity)
Set the intensity multiplier of the background image. A value of 1 keeps it at its original intensity, and values less than that dim it.
brightness()
→ float
Query the intensity multiplier of the background image.