The network editor pane can display any number of images in the background behind the nodes of the network. These background images are described using this class, and set in the network editor using the hou.NetworkEditor.setBackgroundImages method.
This code sets a single background image in the network editor:
editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) image = hou.NetworkImage() image.setPath('$HFS/houdini/pic/Mandril.pic') image.setRect(hou.BoundingRect(0, 0, 5, 5)) editor.setBackgroundImages([image])
The network editor pane provides a mode for creating and editing background images directly in the pane. The resulting image layout is saved into the user data for the current network so that the image arrangement is automatically saved and restored with the hip file.
Methods ¶
__init__(path, rect)
Construct a new image descriptor. The path
parameter is a string
containing the path to the image file. The rect
parameter is a
hou.BoundingRect that specifies the location and size for drawing
the image in the network.
path()
→ str
Return the path to the image file.
setPath(path)
Sets the path to the image file.
relativeToPath()
→ str
Images can be tied to network items such as nodes, network boxes, or sticky notes. This method returns the path to the network item to which this image is tied (or an empty string if its location is not relative to any network item).
setRelativeToPath(path)
Images can be tied to network items such as nodes, network boxes, or sticky notes. This method sets the path to the network item to which this image is tied. Passing in an empty string indicates the location is not relative to any network item.
rect()
→ hou.BoundingRect
Returns the bounding rectangle that defines the size and position of the
image within the network. If the relativeToPath()
value is set, then the
rectangle is translated by the position of the network item to which this
image is tied.
setRect(rect)
Sets the bounding rectangle that defines the size and position of the
image within the network. If the relativeToPath()
value is set, then the
rectangle will be translated by the position of the network item to which
this image is tied.
brightness()
→ float
Return the brightness adjustment for displaying this image in the network editor. This value should range from 0 to 1. Values less than 1 cause the image to be blended with the background of the network editor. An image with a brightness of 0 will appear as the background color, not black as is normally indicated by a brightness value of 0.
setBrightness(brightness)
Sets the brightness adjustment for displaying this image in the network editor. This value should range from 0 to 1. Values less than 1 cause the image to be blended with the background of the network editor. An image with a brightness of 0 will appear as the background color, not black as is normally indicated by a brightness value of 0.