iprquery expression function
Queries numeric (floating point) data from an interactive render pane.
Replaced by: hou.IPRPane
See also: iprquerys
Usage
iprquery(query, pane, x, y)
Use iprquerys to query textual (string) information.
The query string argument specifies what type of information to retrieve (see below). The pane argument specifies the name of the pane you want to retrieve information for.
The x and y arguments are used by some query types to specify additional query parameters. For queries that do not require extra parameters, they are ignored.
The query string can be one of the following values:
|
cropx0, cropx1 cropy0, cropy1 |
Returns the left, right, top, or bottom values of the currently selected crop region. |
|
exist.plane_name |
Returns the index of the given plane if it exists in the rendered image, or -1 if it does not. |
|
ipr |
Returns 1 if the IPR button is on, or 0 if it is off. |
|
lock |
Returns 1 if the lock button is on (prevents automatic re-rendering), or 0 if it is off. |
|
nplanes |
Returns the number of deep raster planes in the current image. |
|
object.ptinstance |
Point number of the instance object (see “Object queries” below) that contributed the pixel at x,y. The x and y variables are coordinates in the rendered image. |
|
object.primitive |
Primitive number of the geometry object (see “Object queries” below) that contributed the pixel at x,y. The x and y variables are coordinates in the rendered image. |
|
pindex.name |
Returns the index of the deep raster plane named name. If there is no plane by that name, returns -1. |
|
plane.vsize |
Returns the vector size of the plane at the index specified by the x argument to this function. For example, to get the vector size of the third deep raster plane:
iprquery("plane.vsize", $PANE, 2, 0)
(The y argument, here set to 0, is ignored.)
|
|
plane.name[.r|g|b|a] |
Returns the value of the pixel component at x,y of the plane named name. For example:
iprquery("plane.C.g", $PANE, $IX, $IY)
If you don’t specify a component name (.r, .g, .b, or .a), returns the value of the first component.You can also use |
|
xres, yres |
horizontal or vertical resolution of the image in the interactive render viewer. |
Object queries
The queries beginning with object. give you information about the Houdini objects that produced the IPR image. These queries use two deep raster planes mantra creates automatically when rendering. These floating-point planes are named Op-Id and Prim-Id. Houdini maintains a table mapping the data Op-Id plane to information about the instance and geometry in the render. The numbers in the Op-Id plane are meaningless otherwise.