Home Reference 

Expression functions

The old expression language is still available in Houdini for compatibility with older files and scripts. For new animations, we recommend you use the new HOM scripting architecture instead.

Functions

Categories: Guide, attributes, channels, character, chops, color, dynamics, files, geometry, images, interface, math, matrices, nodes, objects, obsolete, parameters, particles, random, rendering, segments, strings, utility, vectors, volumes

Guide

attributes

Returns the value of a detail attribute.
Returns the number of components in a detail attribute.
Returns the string value of a detail attribute.
Returns a string from a list of strings in a detail attribute.
Returns the number of unique stings bound to a detail attribute.
Returns 1 if a specified detail attribute exists.
Returns 1 if a specified point attribute exists.
Returns 1 if a specified primtive attribute exists.
Returns 1 if a specified vertex attribute exists.
Returns the value of a point attribute.
Returns the number of components in a point attribute.
Returns the number of components in a primitive attribute.
Returns the number of components in a vertex attribute.

channels

Returns 1 if the specified channel exists, 0 if it doesn’t.
return a string containing all of the channels contained in a group.
Evaluates a channel within a CHOP at a given time.
Evaluates a channel within a CHOP at a specified sample point.

character

Returns the angle at the joint between two bone objects.
Returns the current global kinematic override setting for bone objects.

chops

Evaluates a channel within a CHOP at the current time.
Evaluates a channel within a CHOP at a specified time.
Returns the end index of the channels in a CHOP.
Evaluates a channel within a CHOP with at a given frame.
Evaluates a channel within a CHOP at a given sample point.
Returns the length of the channels in a CHOP, in samples.
Returns the number of data channels within a CHOP.
Returns the sample rate of a CHOP.
Returns the start index of a CHOP.
Returns the string value of a channel within a CHOP at the current time.
Returns the value of a channel within a CHOP at a specified time.
Evaluates a CHOP’s input channel at a specific index.
Returns the end index of a CHOP’s input.
Returns the length of a CHOP’s input, in samples.
Evaluates a CHOP’s input channel’s maximum value.
Evaluates a CHOP’s input channel’s minimum value.
Returns the number of channels in a CHOP’s input.
Returns the sample rate of a CHOP’s input.
Returns the start index of a CHOP’s input.
Returns the value of a CHOP’s output at a specific sample index.

color

Converts RGB values to HSV components.
Converts HSV values to RGB components.

dynamics

Returns a space separated list of all the field names that can be passed to the dopfield function.
Returns the value of a field as a float.
Returns the name of a DOP field.
Returns the value of a DOP field as a string.
Returns the type of a DOP field.
Returns the current frame of the simulation.
Returns the simulation time equivalent of a simulation frame.
Returns 1 if a specified DOP group contains a specified object.
Returns 1 if a specified DOP group is mutually affecting.
returns a string containing a list of all object groups for the current time in a specified DOP Network.
Returns 1 if a specified DOP field exists.
Returns 1 if a dynamics object has the specified subdata.
Returns the list of objects processed by a DOP in the latest timestep.
Returns the number of fields in a DOP record type.
returns the number of objects in a simulation.
Returns the number of records of a given type in a piece of dynamics data.
Returns the number of types of record in a piece of dynamics data.
Returns the number of subdata items attached to an object or data.
Returns all objects matching the an object specification.
Tests whether a set of objects has an affector relationship with another object.
Returns the value of a DOP field as a float.
Returns the value of a DOP field as a string.
Returns the name of a record in DOPs data given its index.
Script solver support function.
Script solver support function.
Script solver support function.
Script solver support function.
returns the simulation frame of a given simulation time.
Returns the global time of a given simulation time.
Returns the name of a subdata of a given DOP object.
Returns the current time of a simulation.
Returns a transformation matrix associated with a piece of data.
Returns the simulation time equivalent to a given global time.
Returns the velocity that a point at a location in simulation space would have if it were attached to a DOP object.
Lists all seam points in a surface node.

files

Searches the Houdini path for a file.
Searches the Houdini path for a file or directory.

geometry

Returns bounding box information for a surface node.
Returns centroid information for a surface node.
Returns the curvature of the surface at the given UV coordinates.
Returns the degree a specified face or hull.
Returns the distance between two 3D points.
Returns 1 if a specified point is in a specified group.
Returns 1 if a specified primitive is in a specified group.
Returns 1 if a primitive is closed.
Returns 1 if a specified point has collided with something.
Returns 1 if a specified primitive is a NURBs or Bezier curve or surface.
Returns 1 if a specified point is a stuck particle.
Returns 1 if a specified primitive is wrapped in U.
Returns 1 if a specified primitive is wrapped in V.
Returns the weight of a metaball at a specific location.
Finds the smallest distance between a point and a primitive.
Finds the point in a geometry nearest to specific 3D coordinates.
Returns the components of the surface normal specific UV coordinates.
Returns the number of points in a geometry.
Returns the number of primitives in a surface node.
Returns the average of an attribute across all points in a geometry.
Returns the distance between a point and a primitive.
Returns the list of point groups in a surface node.
Returns the list of point groups matching a pattern in a surface node.
Returns a list of all points in a point group.
Lists points that share a minimum number of primitives with a specified point.
Returns a list of points that match a specified pattern.
Returns the string value of a point attribute.
Returns a string from a list of strings in a point attribute.
Returns the number of unique strings bound to a point attribute.
Returns the value of a primitive attribute.
Returns the minimum distance and closest points between two primitives.
Returns the partial derivatives of a primitive attribute.
Returns the list of primitive groups in a surface node.
Returns the list of groups matching a pattern in a surface node.
Returns a list of all primtives in a surface node.
Lists primitives that share a minimum number of points with a specified primitive.
Returns the string value of a primitive attribute.
Returns a string from a list of strings in a primitive attribute.
Returns the number of unique strings bound to a primitive attribute.
Returns the value of a primitive attribute at a certain UV location.
Converts unit UV to real UV.
Returns a knot value on a spline curve or surface.
Returns the length of the 3D curve between two points on a surface.
Converts real UV to unit UV.
Returns the distance between parameteric locations on two primitives.
Returns the value of a vertex attribute.
Returns the string value of a vertex attribute.
Returns a string from a list of strings in a vertex attribute.
Returns the number of unique strings bound to a point attribute.
Returns the distance between a 3D coordinate and a primitive.

images

Returns the color of a pixel in a compositing node.
Returns the non-interpolated color of a pixel in a compositing node.
Returns the natural resolution of the image in a compositing node.
Returns 1 if a specified compositing node has an animated sequence.
Returns the end frame of a compositing node’s image sequence.
Returns the number of frames in a compositing node’s image sequence.
Returns the start frame of a compositing node’s image sequence.
Returns the interpolated color of a point on an on-disk texture map.
Returns the non-interpolated color of a point on an on-disk texture map.

interface

Returns the full name of the pane currently under the mouse pointer.
Returns the node path of the pane currently under the mouse pointer.
Takes a viewer name and a viewport number and returns the viewport’s name.

math

Returns the absolute value of the argument.
Returns the arc-cosine of the argument.
Returns the arc length of a curve between two U positions.
Returns the arc-sine of the argument.
Returns the arc-tangent of the argument.
Returns the arc-tangent of y/x.
Returns the smallest integer not less than the value passed in.
Returns a value clamped between a minimum and maximum.
Returns the cosine of the argument.
Returns the hyperbolic cosine of the argument.
Converts from radians to degrees.
Returns the logarithmic exponentiation of the argument.
Fits a value from one range to another.
Fits a value to the 0-1 range.
Fits a number in the 0-1 range.
Fits a number to the -1 to 1 range.
Returns the largest integer not greater than a number.
Returns the fractional part of a floating-point number.
Converts a number to an integer by truncating any fractional part.
Returns the natural logarithm of the argument.
Returns the base 10 logarithm of the argument.
Returns the larger of two values.
Returns the smaller of two values.
Blends the two modular values.
Raises a number to an exponent.
Converts from degrees to radians.
Rounds to the nearest integer.
Rounds a number to the nearest integer.
Returns -1, 0, or 1 depending on the sign of the argument.
Returns the sine of the argument.
Returns the hyperbolic sine of the argument.
Taks a value and range and returns a smooth interpolation between 0 and 1.
Returns the square root of the argument.
Returns the tangent of the argument.
Returns the hyperbolic tangent of the argument.
Converts a number to an integer by truncating any fractional part, rounding towards 0.
Wraps a value between a minimum and maximum.

matrices

Returns the determinant of a matrix.
Computes the dihedral matrix between vectors v0 and v1.
Explodes a 3×3 or 4×4 matrix into the euler rotations required to rebuild it.
Explodes a 3×3 or 4×4 matrix into the euler rotations required to rebuild it.
Creates an identity matrix.
Inverts a matrix.
Converts a string specification into a matrix.
Converts a rotation matrix to a quaternion.
Returns the number of columns in a matrix.
Computes the transformation matrix of a lookat from one vector to another.
Computes the transformation matrix of a lookat from one vector to another, with an up vector.
Computes the transformation matrix of a lookat from one object to another.
Computes the transformation matrix to orient along specific Z and Y axes.
Returns the number of rows in a matrix.
Returns a matrix with all values set to 0.
Converts quaternion to a 3×3 rotation matrix.
Returns a 4×4 rotation matrix from an axis and angle.
Returns a 4×4 rotation matrix from an angle and a vector.
Takes three scaling values and returns a scale matrix.
Takes X, Y, and Z translation values and returns a translation matrix.
Transposes a matrix.

nodes

Returns the numeric suffix of a node name.
Returns 1 if the specified node, group, or bundle exists.
Returns a list nodes with a particular flag set.
Returns the full path of a node.
Returns the path of a node relative to another node.
Returns the unique ID of a node.
Returns the name of the node connected to a given input.
Returns the full path of the node connected to a given input.
Returns 1 if Houdini is currently loading a scene file.
Returns the name of a node given its path.
Returns the number of nodes inside a container node.
Returns the maximum number of connected inputs.
Returns the number of nodes connected to a node’s output.
Returns the name of a node connected a given node’s output.
Returns the full path of a node connected a given node’s output.
Returns the relative path from one node to another.
Returns a list of the selected nodes.
Returns a recursive list of the selected nodes.
Returns the full path of a node including any containing subnets.
Returns the type of a node.
Returns type information about a node.

objects

Returns a list of lights matching an object’s light mask.
Computes the rotation vector of a lookat from one object to another.
Returns an object’s pre-transform matrix.
Returns the full paths of all operators in a bundle.
Returns a list of lights matching an object’s light mask.
Returns the transformation matrix of an object at the current time.
Returns components of an object’s transforms.
Returns components of an object’s offset transforms.

obsolete

Deprecated: current working container for custom panels.
Deprecated: data type of a gadget, for custom panels.
Deprecated: adds a menu entry on a custom panel.
Deprecated: returns a value from a custom panel.
Deprecated: Returns the type of a gadget on a custom panel.
Deprecated: replaced by opinput.
Deprecated: use stamp instead.

parameters

Returns the value of a parameter.
Evaluates a parameter at a given frame.
Evaluates the string value of a parameter at the current time.
Evaluates the parameter at the current time as a node path string.
Returns the raw expression value of a parameter as a string.
Returns the value of a parameter at a specified time.
Returns 1 if a specified parameter is a string.
Returns a copy stamping floating point value.
Returns a copy stamping string value.

particles

Returns the full path to a particle network context geometry.
Returns 1 if a particle event is occurring.
Returns the time of a particle event.
Returns the value of a particle attribute, by particle number.
Returns the value of a particle attribute, by particle ID.
Returns the point number of the particle with the specified ID.

random

Generates 3D noise.
Returns a pseudo-random number between 0 and 1.
Returns a pseudo-random number from 0 to 1.
Generates sparse convolution 3D noise.
Generates spatially coherent 3D noise based on sparse convolution.
Generates spatially coherent 3D noise.

rendering

Queries numeric (floating point) data from an interactive render pane.
Queries textual (string) data from an interactive render pane.
Returns the shader string generated by a shader.

segments

Channel segment function: Bezier interpoloation spline
Channel segment function: constant value.
Channel segment function: cubic spline.
Channel segment function: repeats the animation between frames f1 and f2.
Channel segment function: repeats the animation between times t1 and t2.
Channel segment function: ease-in and -out.
Channel segment function: ease-in.
Channel segment function: ease-in with configurable acceleration.
Channel segment function: ease-out
Channel segment function: ease-out with configurable acceleration.
Channel segment function: ease-in and -out with configurable acceleration.
Channel segment function: linear interpolation.
Channel segment function: matches the incoming and outgoing slopes.
Channel segment function: matches the incoming slope.
Channel segment function: matches the outgoing slope.
Channel segment function: uses quaternions to interpolate.
Channel segment function: smoothly interpolates slopes and accelerations.
Channel segment function.
Channel segment function: repeats animation from previous frames.
Channel segment function: repeats animation from previous frames.
Channel segment