Methods

Return a new Vector3 from a sequence of floats. If this method is called
without parameters, the resulting vector contains the values (0.0, 0.0,
0.0).

You can also construct a Vector3 from a hou.Vector4. The result
contains the first 3 values in the Vector4.

Raises InvalidSize if values is not 3 elements long, or TypeError
if values is not a sequence of floats.

Return a new Vector3 from a sequence of floats.

__getitem__(index) → float

Return the float component at the specified index. This method makes
vectors behave as sequences (so you can, for example, use a for loop
on the elements of a vector, convert a vector to a tuple of floats, etc.)
and lets you use square brackets to index into a vector.

>>> v=hou.Vector3((1.0,2.0,3.0))>>> v[-1]3.0

Return the float component at the specified index.

__setitem__(index,value)

This method lets you use square brackets to set a value on a vector.

>>> v=hou.Vector3((1.5,2.5,3.5))>>> v[1]=0.5>>> printv[1.5, 0.5, 3.5]

This method lets you use square brackets to set a value on a vector.

setTo(sequence)

Set the contents of this vector to a sequence of floats.

Raises InvalidSize if values is not 3 elements long, or TypeError
if values is not a sequence of floats or ints.

Add two vectors, returning a new vector with each component equal to the
sum of the corresponding components in the two vectors. This method lets
you write v1 + v2, where v1 and v2 are Vector3 objects.

Subtract a vector from another, returning a new vector with each component
equal to the first vector’s corresponding component minus the second
vector’s. This method lets you write v1 - v2, where v1 and v2 are
Vector3 objects.

Multiply this vector with a scalar or with a matrix, returning a new
vector. This method lets you write v * s or v * m where v is a
vector, s is a float scalar, and m is a hou.Matrix4.

When the parameter is a float scalar s, this method is equivalent to
hou.Vector3(self[0] * s, self[1] * s, self[2] * s).

In order multiply the Vector3 by a Matrix4, the Vector3 is converted to
a Vector4 with the fourth component set to 1.0. The effect is that the
vector is treated as a position, so if the transformation matrix contains a
translation component, the return value will be translated. If you would
like to transform a vector (so translations are ignored but rotations, for
example, apply), you’ll need to transform a corresponding hou.Vector4
with the fourth component set to zero:

Interpret this vector as a direction and returns a transformed direction
that has been rotated and scaled (not translated) by the matrix4

Interpret this vector as a direction and returns a transformed direction
that has been rotated and scaled (not translated) by the matrix4

distanceTo(vector3) → float

Interpret this vector and the argument as 3D positions, and return the
distance between them. The return value is equivalent to
(self - vector3).length().

Interpret this vector and the argument as 3D positions, and return the
distance between them.

dot(vector3) → float

Return the dot product between this vector and the one in the parameter.
This value is equal to
self[0]*vector3[0] + self[1]*vector3[1] + self[2]*vector3[2], which is
also equal to self.length() * vector3.length() *
math.cos(hou.hmath.degToRad(self.angleTo(vector3)))

Return the cross product of this vector with another vector. The
return value is a vector that is perpendicular to both vectors, pointing
in the direction defined by the right-hand rule, with length
self.length() * vector3.length() * math.sin(hou.hmath.degToRad(self.angleTo(vector3))).

Return a matrix that rotates this vector onto vector3, rotating about the
axis perpendicular to the two vectors. If the two vectors have the same
direction, return the identity matrix.

Return a matrix that rotates this vector onto vector3, rotating about the
axis perpendicular to the two vectors.

isAlmostEqual(vector3,tolerance=0.00001) → bool

Return whether this vector is equal to another, within a tolerance.
Verifies that the difference between each component of this vector and the
corresponding component of the other vector is within the tolerance.

Evaluate an interpolation function for an animated parameter that
gives a smooth curve between the left keyframe’s outgoing value and the
right keyframe’s incoming value, using the left’s outgoing slope and
acceleration and the right’s incoming slope and acceleration.

Search the Houdini path for files with a particular extension,
returning a tuple of all the matches. A subdirectory can also be optionally
provided which is appended to each entry in the Houdini path before looking
for files.

Exits Houdini, returning the exit code to the operating system. If
suppress_save_prompt is false, this function asks the user if he/she
wants to save. If the user presses "Cancel", the exit will be canceled
and the next statement will execute.

A Face is a kind of geometry primitive (Prim object) that contains a
sequence of vertices (Vertex objects). How these vertices are used depends on
the type of face; polygons, for example, use the vertices to define the
edges of the polygon, while NURBS curves use them as control points.

Each Prim resides inside a Geometry object and stores some sort of 3D
geometric primitive, like a polygon, a NURBS curve, or a volume. Each
primitive usually contains a set of Vertex objects, each of which references a
Point object.

A Surface is a kind of geometry primitive (Prim object) that contains a
two dimensional grid of vertices (Vertex objects). How these vertices are
used depends on the type of surface: meshes, for example, use the vertices to
define a quadrilateral mesh, while NURBS surfaces use them as control
points.

Given a node’s session id and an input index, return a
NodeConnection object. Return None if the id does not correspond to a valid
node (e.g. if the node was deleted), or the specified input index is not
connected.

Given a node type category object and a name, or possibly just a node type
name that includes the category, return the corresponding NodeType object.
The exact name is assumed so node type aliases are not evaluated. To check aliases
use hou.preferredNodeType() instead.
Return None if there is no such type with that name.

Executes the given hscript command and returns a 2-tuple of strings where
the first string contains the regular output of the executed command and the
second string contains the error output. You can specify multiple
commands by using ';' or the newline character as the separator.

A Ramp represents a function that yields either floating point values or
colors. You can evaluate this function between 0.0 and 1.0, and the function’s
shape is determined by a sequence of values at key positions between 0.0 and
1.0.