You are on page 1of 880

Houdini Object Model - Houdini online help

Houdini
10

Search

Houdini Object Model

Overview

The Houdini Object Model (HOM) is an

application

programming interface (API)

that lets you get information from and control Houdini using the Python scripting

language. HOM replaces the functionality of Houdini’s previous scripting solutions, the

expression language and HScript.

In Python, the package is the top of a hierarchy of modules, functions, and classes

that define the HOM. The hou module is automatically imported when you are writing

expressions in the parameter editor and in the hython command-line shell.

Subtopics

Text Clear

http://www.sidefx.com/docs/houdini10.0/hom/ (1 of 4) [12/7/2009 4:27:36 PM]


Houdini Object Model - Houdini online help

Getting started

Learning Python

HOM introduction

Exploring the hou module

Next steps

HOM Cookbook

Storing Python Scripts in digital assets

The hou.session module

Session independent scripts

http://www.sidefx.com/docs/houdini10.0/hom/ (2 of 4) [12/7/2009 4:27:36 PM]


Houdini Object Model - Houdini online help

Python scripting errors

Guru level

Migrating from HScript

Command-Line Scripting

rpc

Reference

Python parameter expressions

hou

Module containing all the sub-modules, classes, and functions to access Houdini.

http://www.sidefx.com/docs/houdini10.0/hom/ (3 of 4) [12/7/2009 4:27:36 PM]


Houdini Object Model - Houdini online help

http://www.sidefx.com/docs/houdini10.0/hom/ (4 of 4) [12/7/2009 4:27:36 PM]


http://www.sidefx.com/docs/houdini10.0/hom/learningpython

= Learning Python =

Before learning Houdini's Python API, it's necessary to understand at least


a little of the Python language. Fortunately, Python is one of the easiest
and most pleasant languages to learn. Teaching you the Python language itself
is beyond the scope of the Houdini online help. Luckily, there are many
excellent resources available online and in book form.

- [Python.org|http://www.python.org/] includes a fantastic


[tutorial|http://docs.python.org/tut/] that assumes no previous programming
experience. If you read this tutorial, you should have no problem learning
how to script Houdini.

- Python.org also includes the


[standard library reference|http://docs.python.org/lib/]. Python has a large
set of libraries, or _modules_, letting you perform a large variety of tasks
in Python. This reference is invaluable even after you've learned the
core Python language.

- Python.org also contains [links to other learning resources|http://wiki.python.org/moin/BeginnersGuide].

- Mark Pilgrim's [Dive into Python|http://diveintopython.org]


book is available in print and free online. This is a very
well-written and candid introduction to the language with
many small projects to dive into. However, it may be slightly
out-of-date with the latest versions of Python.

- Many other introductory books are available for Python, such as


[O'Reilly's Learning Python|http://www.oreilly.com/catalog/lpython2/].

http://www.sidefx.com/docs/houdini10.0/hom/learningpython [12/7/2009 4:27:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/intro

= HOM |> introduction =

== Quick start ==

Here's a quick example of how to use HOM to accomplish a simple


task in Houdini. Don't worry if you don't understand the details
of this example -- it will give you a favor of what scripting
Houdini is like.

Choose __Windows > Python Shell__ to open an interactive


Python Shell window.

{{{
#!pycon

# Print out a tree of all the nodes in the scene:


>>> def print_tree(node, indent=0):
... for child in node.children():
... print " " * indent + child.name()
... print_tree(child, indent + 3)
... # Press Enter to finish the definition

>>> print_tree(hou.node('/'))
obj
cam1
file1
properties
standard
out
part
ch
shop
img
img1
vex
}}}

== Getting Started ==

When you open Houdini's Python shell, you'll notice it greets you with
the `>>>` prompt and waits for you to enter Python expressions or
statements. Even if you don't plan on writing large Python scripts, the

http://www.sidefx.com/docs/houdini10.0/hom/intro (1 of 6) [12/7/2009 4:27:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/intro

Python shell is invaluable as a handy calculator:

{{{
#!pycon
>>> 2 + 2
4
>>> 0.03 * 25.1
0.753
>>> min(hou.frame(), 7) * 3
3.0
}}}

What is hou.frame(), you might ask? Houdini's Python API is implemented in


a module named `hou`, short for Houdini. Just like `os.getcwd` is a function
in the `os` module, `hou.frame` is a function in the `hou` module, and it
returns the current frame number. Note that you don't need to write `import
hou` to use the hou module, since Houdini automatically imports the hou module
when it starts up.

Press Ctrl+D to close a floating Python shell window. See the main menu
for the shortcut to open the floating Python shell window.

Python shells can be inside panes if you don't want to use a floating
window.

In the Python shell, Home and Ctrl+A will move to the beginning of the
line, End and Ctrl+E will move to the end, and up and down will navigate
through the history.

You can't use Ctrl+C to copy from the Python shell, since Ctrl+C will
send a KeyboardInterrupt exception. To copy text from a Python shell,
right-click and select Copy.

== Loading Hip Files ==

Use the [Hom:hou.hipFile] submodule to save/load the current session to/from


hip files. Note that [Hom:hou.hipFile.load] will throw a [Hom:hou.LoadWarning]
exception if there were warnings, even though the file was loaded successfully.
The following code will print out warnings and continue the rest of the
script.

{{{
#!python

http://www.sidefx.com/docs/houdini10.0/hom/intro (2 of 6) [12/7/2009 4:27:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/intro

# Print out load warnings, but continue on a successful load.


try:
hou.hipFile.load("myfile.hip")
except hou.LoadWarning, e:
print e
}}}

== Accessing Nodes ==

Because Houdini is designed around nodes (e.g. SOPs, DOPs, Object nodes, etc.),
you're likely to manipulate them in scripts. Here's a brief primer to get
started.

The [Hom:hou.node] function takes a path to a node and returns a [Hom:hou.Node]


object, or None if the path is invalid.
{{{
#!pycon
# Empty out the current session.
>>> hou.hipFile.clear()

>>> hou.node('/obj')
<hou.Node at /obj>
>>> # hou.node returned a hou.Node object corresponding to the /obj node

>>> n = hou.node('/asdfasdf')
>>> # The node path was invalid, so n will be the None object.
>>> print n
None

>>> g = hou.node('/obj').createNode('geo')
>>> g
<hou.ObjNode of type geo at /obj/geo1>
>>> # g is hou.Node object corresponding to the newly created /obj/geo1 node.
>>> # Note that g is actually a hou.ObjNode instance, which is a subclass of
>>> # hou.Node.

>>> # The parm method on hou.Node objects returns a hou.Parm object (or None
>>> # if the parameter name is invalid).
>>> tx = g.parm('tx')
>>> tx
<hou.Parm tx in /obj/geo1>

>>> # Evaluate the parameter and change its value.

http://www.sidefx.com/docs/houdini10.0/hom/intro (3 of 6) [12/7/2009 4:27:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/intro

>>> tx.eval()
0.0
>>> tx.set(3.5)
>>> tx.eval()
3.5

>>> hou.node('/obj/geo1').parm('tx').eval()
3.5
>>> # hou.parm is a shortcut to access a parm directly.
>>> hou.parm('/obj/geo1/tx').eval()
3.5
>>> # hou.evalParm is a shortcut to evaluate a parameter.
>>> hou.evalParm('/obj/geo1/tx')
3.5
>>> # hou.ch is exactly the same as hou.evalParm.
>>> hou.ch('/obj/geo1/tx')
3.5

>>> # hou.Parm.name returns the name of the parameter, and hou.Node.parms


>>> # Returns a tuple of all the Node's parameters.
>>> [p.name() for p in g.parms()]
['stdswitcher1', 'stdswitcher2', 'stdswitcher3', 'stdswitcher4', 'keeppos',
'pre_xform', 'xOrd', 'rOrd', 'tx', 'ty', 'tz', 'rx', 'ry', 'rz', 'sx', 'sy',
'sz', 'px', 'py', 'pz', 'scale', 'lookatpath', 'lookup', 'pathobjpath',
'roll', 'pos', 'uparmtype', 'pathorient', 'upx', 'upy', 'upz', 'bank',
'shop_materialpath', 'shop_materialopts', 'tdisplay', 'display',
'use_dcolor', 'dcolorr', 'dcolorg', 'dcolorb', 'picking', 'pickscript',
'caching', 'vport_shadeopen', 'vport_displayassubdiv', 'vm_phantom',
'vm_renderable', 'folder01', 'folder02', 'folder03', 'folder04',
'categories', 'reflectmask', 'lightmask', 'geo_velocityblur',
'vm_shadingquality', 'vm_rayshadingquality', 'vm_rmbackface',
'shop_geometrypath', 'vm_rendersubd', 'vm_renderpoints', 'vm_metavolume',
'vm_coving', 'vm_computeN']

>>> # hou.Parm tuples correspond to parameter groupings:


>>> t = g.parmTuple('t')
>>> t
<hou.ParmTuple t in /obj/geo1>
>>> tuple(t)
(<hou.Parm tx in /obj/geo1>, <hou.Parm ty in /obj/geo1>, <hou.Parm tz in /obj/geo1>)
>>> t.eval()
(3.5, 0.0, 0.0)
>>> t.set((1.0, 2.0, 3.0))

http://www.sidefx.com/docs/houdini10.0/hom/intro (4 of 6) [12/7/2009 4:27:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/intro

>>> t.eval()
(1.0, 2.0, 3.0)

>>> # Build a simple sop network.


>>> hou.hipFile.clear()
>>> geo = hou.node('/obj').createNode('geo')
>>> box = geo.createNode('box')
>>> subd = geo.createNode('subdivide')
>>> subd.parm('iterations').set(3)
>>> subd.setFirstInput(box)
>>> subd.moveToGoodPosition() # Move the node tiles to avoid overlaps.
>>> subd.setDisplayFlag(True)
>>> subd.setRenderFlag(True)
>>> subd.setCurrent(True, clear_all_selected=True)
}}}

== Working with Animated Parameters and Keyframes ==

When you hear the term "animated parameter", you typically think of keyframed
values and bezier curves and the animation graph editor. Recall from earlier,
though, that parameters with expressions are also considered animated
parameters. All animated parameters have at least one keyframe, and each
keyframe has an expression. Typical parameters with expressions simply have
one keyframe whose expression is something like `sin($F)` or `cos(time())`,
while typical animation curves have multiple keyframes whose expressions are
something like `bezier()`.

So how does a function like `bezier()` evaluate to different values at


different times? Clearly there are no parameters passed to bezier that
vary from time to time, and there are no keyframe or slope values passed
in. The answer is that keyframes store more than just an expression.
A keyframe stores those values, slopes, and accelerations, and certain
functions, like bezier, access those values for the current keyframe and
the next one. For keyframes with expressions like `sin($F)`, those
extra values are not set and are not used.

Each keyframe has an associated time. Using that time and the number of
frames per second, you can derive the keyframe's frame. You can think of
the expression as being active _between_ keyframes: Houdini evaluates the
expression between its keyframe and the _next_ keyframe. If there is no
next keyframe, most animation functions (e.g. [bezier|Hom:hou.bezier],
[cubic|Hom:hou.cubic], etc.) simply evaluate to their keyframe's value. For
the times before the first keyframe, the parameter evaluates to the value

http://www.sidefx.com/docs/houdini10.0/hom/intro (5 of 6) [12/7/2009 4:27:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/intro

at the first keyframe's time.

[Hom:hou.Parm#keyframes]
values, slopes, and accelerations

- If you set the in value and the (out) value is not set, it will be
set to the same value. Setting the in value breaks the tie between
the values. If neither of the in or (out) values are set, they
are considered tied.

- for example, to set a keyframe with the current value and slope, do not
set the value or slope in the keyframe
- or, to automatically determine the slopes, set a keyframe with the slope not
set
- times and expressions
- in and out/values
- tied values
- asCode()
- same syntax between Hscript expressions and Python

== Working with Objects and Transformations ==

- worldTransform(), setWorldTransform()
- matrices, exploding
- column vectors for transforms (p * T1 * T2), not (T2 * T1 * p)
- see the object_xform cookbook example

== Tips ==

- Drag a node from the network editor into the Python shell to paste a
hou.node expression. You may find this easier if the Python shell is
inside a pane.

- Use variables to store hou.Node, hou.Parm, and hou.ParmTuple objects


instead of calling hou.node and hou.parm over and over again.

- Use the output from [Hom:hou.Node#asCode] to help learn the parts of


the HOM API that create nodes and set parameters and keyframes.

http://www.sidefx.com/docs/houdini10.0/hom/intro (6 of 6) [12/7/2009 4:27:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/exploring

= Exploring the hou module =

Python makes it easy to explore and search the HOM API. If you type `hou.`
into Houdini's Python shell, it will pop up a list of possible attribute
completions (e.g. functions, classes, constants, etc.). Popup completion
will work for any Python variable. For example, if `n` is a variable
referring to a [Hom:hou.Node] object, typing `n.ch` will pop up a list of
method completions (e.g. changeNodeType, children, childTypeCategory).

Press tab in Houdini's Python shell to automatically complete what you're


typing. Press Ctrl+tab in a Python source editor for completion.

The Python popup help will also display the reference documentation for
a function or method after you type an opening parenthesis (`(`) after a
function or method name. For example, typing `hou.node` will list attributes
of the hou module starting with "node", but typing `hou.node(` will display the
help for the [Hom:hou.node] function.

Popup help and tab completion will not work on results of functions.
For example, you will get popup help for...

{{{
#!pycon
>>> n = hou.node('/obj');
>>> n.parm(
}}}

...but you won't get it for...

{{{
>>> hou.node('/obj').parm(
}}}

The reason is that


the latter needs to evaluate hou.node('/obj') to determine what type
of object it is, and that evaluation could have unintended side effects.
For example, automatically evaluating `file('~/.bashrc', 'w').` to list
possible completions for the file object could have unintended effects.

Depending on the method or function, Houdini's Python shell may also list
possible argument completions. For example, if you type `hou.node('/obj/`,
you'll get a list of the objects inside /obj.

http://www.sidefx.com/docs/houdini10.0/hom/exploring (1 of 2) [12/7/2009 4:27:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/exploring

The standard Python `dir()` and `help()` functions can also be very helpful to
explore the hou module, and will work in a shell without popup completion.
type `dir(hou.ObjNode)`, for example, to list all the attributes of the
[Hom:hou.ObjNode] class. Or, type `dir(hou.node("/obj/geo1").type())` to
list the attributes of the [Hom:hou.NodeType] class. To learn more about a
particular attribute, use the help() function. For example,
`help(hou.ObjNode.worldTransform)` will print the
[Hom:hou.ObjNode.worldTransform] method's help in the shell.

You can also explore the hou module's [reference documentation|hou] with
the help browser.

NOTE:
The [HOM reference documentation|hou] also lists functions, methods,
classes, and submodules that are not implemented in this version of
Houdini but can be expected in future versions of Houdini.

The hou module uses these naming conventions:

- hou functions and class methods use _lowerCamelCase_.


- Classes start use _UpperCamelCase_.
- hou submodules use _lowerCamelCase_. There are two types of hou submodules:
- Submodules that contain enumeration values.
- Submodules that contain a collection of related functions.
- Parameter names use _lower\_case\_with\_underscores_.
- Methods and functions used internally by Houdini start with a single
underscore.

http://www.sidefx.com/docs/houdini10.0/hom/exploring (2 of 2) [12/7/2009 4:27:40 PM]


HOM Cookbook - Houdini online help

Houdini Houdini Object HOM


10 Model Cookbook

Search

HOM HOM Cookbook


The Houdini Object Model (HOM) is an application

programming interface (API) that lets

you get information from and control Houdini using the Python scripting language.

The HOM cookbook provides short examples using the hou module. The files used by the

cookbook are located in $HFS/houdini/help/hom/cookbook, and can also be found in

cookbook_files.tar.gz.

For other information about HOM, see the overview documentation.

Subtopics

Text Clear

Object Transform Example: A Simple Example

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/ (1 of 3) [12/7/2009 4:27:45 PM]


HOM Cookbook - Houdini online help

Feed Example: Combining Python’s Powerful Module Library with Houdini

Print Hip Stats Example: Load a .hip File and Inspect it

Particle Cache Example: Writing Particle Data to a Custom Format

Compositing Example: Building a Composite Network from a Compositing Expression

Python Object Example: Transforms from Disk

Python SOP Example: Color Falloff

Python SOP Example: Surface Wires

Bundles Example: Extending the hou Module by Wrapping Hscript

Paths Example: Dynamically Creating Object Nodes

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/ (2 of 3) [12/7/2009 4:27:45 PM]


HOM Cookbook - Houdini online help

PyQt Example: Writing Custom GUIs inside Houdini

wxPython Example: Writing Custom GUIs inside Houdini

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/ (3 of 3) [12/7/2009 4:27:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/assetscripts

= Storing Python Scripts in digital assets =

== Python Module per Digital Asset ==

Each Houdini Digital Asset (HDA) may have its own Python module. This module
corresponds to the asset type, and is independent of the number of instances
of the asset. Typically, one would use this module to store functions,
classes, constants, etc. to do with the HDA.

The HDA's Python module is stored in the PythonModule section. To create


this module, create a "Python Module" event handler in the Scripts page of
the Operator Type Properties dialog.

Because the module is associated with the HDA's node type, you can access
the Python module object via [Hom:hou.NodeType#hdaModule]. For example,
you could write
`hou.nodeType(hou.objNodeTypeCategory(), 'hdaname').hdaModule()` to access
the module for the `hdaname` HDA. Most of the time, however, you're dealing
with [Hom:hou.Node] objects, so you can use the convenience method
[Hom:hou.Node#hdaModule]. If `n` is a Node object, calling `n.hdaModule()`
is equivalent to calling `n.type().hdaModule()`.

The return value of hdaModule() behaves like a Python module. So, if the
PythonModule section contains:
{{{
#!python
def foo():
print "hello"
}}}
and /obj/hda1 is an instance of that HDA, you could write
`hou.node('/obj/hda1').hdaModule().foo()`.

== Python Event Handlers == (python_event_handlers)

HDA event handlers can be written in Hscript or Python. Simply change the
"Edit as" menu to tell Houdini which language the code is in.

Parameters to Python event handlers are passed in via a global dictionary


variable named `kwargs`, similar to how they're passed into shelf tool scripts.
For example, in an Hscript OnCreated event handler you would use `$arg1` to
get the path to the new instance of the HDA. In a Python OnCreated handler,
you would use `kwargs['node']` to get the [Hom:hou.Node] for the new HDA

http://www.sidefx.com/docs/houdini10.0/hom/assetscripts (1 of 7) [12/7/2009 4:27:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/assetscripts

instance.

The following table lists the contents of the `kwargs` dictionary for the
various event handler types:

table>>
tr>>
th>>
Key name
th>>
Value
th>>
Event Handlers
tr>>
td>>
`node`
td>>
The [Hom:hou.Node] instance for the digital asset.
td>>
OnCreated, OnUpdated, OnInputChanged, OnNameChanged, OnDeleted
tr>>
td>>
`type`
td>>
The [Hom:hou.NodeType] defined by the digital asset.
td>>
OnLoaded, PreFirstCreate, OnCreated, OnUpdated, OnInputChanged,
OnNameChanged, OnDeleted, PostLastDelete, PythonModule
tr>>
td>>
`old_name`
td>>
A string containing the the old name of the HDA instance.
td>>
OnNameChanged
tr>>
td>>
`input_index`
td>>
The index of the input that was connected/disconnected.
td>>
OnInputChanged

http://www.sidefx.com/docs/houdini10.0/hom/assetscripts (2 of 7) [12/7/2009 4:27:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/assetscripts

NOTE:
Note that `kwargs['type']` is also available in the PythonModule section.

== Accessing the Python Module == (accessing_python_module)

There are a number of places where you will commonly call functions in the
PythonModule, including Python and Hscript event handlers, parameters in
nodes inside the HDA, HDA button callbacks, and menu generation scripts.

To call a function in PythonModule from a Python event handler, simply use


`kwargs['node']` to access the node and from the node you can access the
module. For example, if you had the following function in the PythonModule
section:
{{{
#!python
def onCreated(node):
hou.ui.displayMessage("You created " + node.path())
}}}
you could call it from the OnCreated Python event handler with:
{{{
#!python
kwargs['node'].hdaModule().onCreated(kwargs['node'])
}}}
You could also call this method from an Hscript version of the OnCreated
section using the python Hscript command:
{{{
#!hscript
python -c "hou.node('$arg1').hdaModule().onCreated(hou.node('$arg1'))"
}}}

== Parameter Callback Scripts == (parameter_callback_scripts)

When Houdini runs a Python parameter callback script, it also passes its
arguments via a `kwargs` dictionary. The most useful values in this
dictionary are `kwargs['node']` and `kwargs['parm']`, containing the
[Hom:hou.Node] and [Hom:hou.Parm] objects corresponding to the parameter.
So, you could write
{{{
#!python
kwargs['node'].hdaModule().onButtonPress()
}}}
to call the onButtonPress() function in the PythonModule section.

http://www.sidefx.com/docs/houdini10.0/hom/assetscripts (3 of 7) [12/7/2009 4:27:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/assetscripts

NOTE:
You might see the above code written as
`hou.pwd().hdaModule().onButtonPress()`. Using [Hom:hou.pwd], or
`hou.node('.')`, is also a valid way to access the PythonModule section,
since Houdini changes the current node to the HDA instance when it
invokes a parameter callback.

The keys in the `kwargs` dictionary have the same names as the variables
available to Hscript callback scripts, except that it contains the extra keys
`node` and `parm`. This dictionary contains the following entries:

parm:
The [Hom:hou.Parm] object whose callback script was invoked.
node:
The [Hom:hou.Node] object containing the parameter.
parm_name:
The name of the [Hom:hou.Parm]. This value is the same as
`kwargs['parm'].name()`.
script_parm:
The name of the [Hom:hou.ParmTuple] containing the parameter. This value
is the same as `kwargs['parm'].tuple().name()`. This key is called
`script_parm` instead of something more meaningful like `parm_tuple_name`
for backwards compatibility with Hscript.
script_value:
The value of the parameter. This entry is the same as
`kwargs['parm'].eval()`.
script_value0, script_value1, ...:
The values of the parameter tuple. These entries are the same as
`[p.eval() for p in kwargs['parm'].tuple()]`.
script_multiparm_index:
The number of the multiparm, if the parameter is an instance of a
multiparm. Note that the "First Instance" parameter on the multiparm's
folder block list determines where to start numbering multiparms.
Typically, the first multiparm is numbered 1, the second 2, and so on.

If this parameter is not an instance of a multiparm, this value is -1.


script_multiparm_nesting:
If this parameter is not an instance of a multiparm, this value is 0.
If it is a multiparm instance but the instance is not contained inside
other multiparm instances, the value is 1. Otherwise, if the multiparm
instance is nested inside one level of multiparm instances it returns
the number of nesting levels.
script_multiparm_index2, ..., script_multiparm_indexN:

http://www.sidefx.com/docs/houdini10.0/hom/assetscripts (4 of 7) [12/7/2009 4:27:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/assetscripts

These values are only available if `script_multiparm_nesting` is 2 or


higher. These values correspond to the multiparm instance numbers of the
outer multiparm instances. For example, if multiparm instance 3 is nested
inside instance 5 which is inside instance 4, `script_multiparm_index` will
be 3, `script_multiparm_index2` will be 5, and `script_multiparm_index3`
will be 4.

== Parameter Expressions == (parameter_expressions)

Python expressions in nodes inside the HDA can easily access the PythonModule
via relative references. For example, if "/obj/hda1" is an instance of the
HDA and "/obj/hda1/geo1" is a node inside it, a Python expression on one
of geo1's parameters could contain, for example,
`hou.node('..').hdaModule().bar()` to call the bar() function in PythonModule.

== Parameter Menu Scripts == (parameter_menu_scripts)

Menu parameters whose contents are generated via a script can also use
PythonModule functions to generate the menu. You can write these menu
scripts using either Python or Hscript. In Hscript, these scripts output
a whitespace-separated list of strings, with two strings per menu entry.
Each pair of strings contains the internal name for the menu entry
in the first part of the pair and the label in the second part. In Python
you write code that evaluates to a sequence of strings. For example,
`['one', 'Apples', 'two', 'Cream Pie']` would correspond to two menu entries
with internal names "one" and "two" and labels "Apples" and "Cream Pie".

If a Python menu script contains only one line, Houdini evaluates it as a


Python expression. If it contains multiple lines, Houdini evaluates it as
a function body. This behavior is the same for Python expressions in
parameters.

The following code illustrates how to use Python to generate a menu of


Object-level digital asset names:
{{{
#!python
result = []
for tool in hou.shelves.tools().values():
node_type_name = tool.toolMenuOpType(hou.paneTabType.NetworkEditor)
if (node_type_name.startswith("Object/") and
'Digital Assets' in tool.toolMenuLocations()):
result.append(tool.name())
result.append(tool.label())

http://www.sidefx.com/docs/houdini10.0/hom/assetscripts (5 of 7) [12/7/2009 4:27:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/assetscripts

return result
}}}

Note that you can also put the code that generates the menu into a function
in the PythonModule section (e.g. a `generateMenu` function). You would then
call that function with `hou.pwd().hdaModule().generateMenu()`.

== Node Initialization Scripts == (node_initialization_scripts)

Houdini supports both Hscript and Python versions of node initialization


scripts. Hscript initialization scripts have always been supported. For
example, when you put down a geometry object, Houdini searches `$HOUDINI_PATH`
for Hscript script files named `scripts/obj/geo.cmd` and runs the first
one it finds.

These initialization scripts may also be written in Python, and Houdini will
also search for `scripts/obj/geo.py` and run it if it finds it. If Houdini
finds both an Hscript (`.cmd`) version and a Python (`.py`) version of a node
initialization script, it will run the Python version.

Python node initialization scripts can use the `kwargs` dictionary. It


contains one entry: `kwargs['node']` contains the [Hom:hou.Node] object that
was just created.

== Multiple Python Modules in a Digital Asset == (multiple_python_modules)

If you want to break up your Python code into multiple modules, you can
use other HDA sections to store those modules. For example, suppose you want
to create a (sub)module named bar. You could put the following code in
an HDA section named "bar_PythonModule":
{{{
#!python
def foo():
print "This is bar.foo()!"
}}}

Then, in the PythonModule section, you would write:


{{{
#!python
import toolutils
bar = toolutils.createModuleFromSection(
'bar', kwargs['type'], 'bar_PythonModule')
}}}

http://www.sidefx.com/docs/houdini10.0/hom/assetscripts (6 of 7) [12/7/2009 4:27:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/assetscripts

`bar` now appears as a submodule of `hdaModule()`. So, for example, you


could write the following in a button callback to call the `foo` function:
{{{
#!python
hou.pwd().hdaModule().bar.foo()
}}}

http://www.sidefx.com/docs/houdini10.0/hom/assetscripts (7 of 7) [12/7/2009 4:27:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/session

= The hou.session module =

The interactive Python shell is a great way to test and experiment with
snippets of scripts. When you want to run the same sequence of statements
multiple times, though, it's tedious to enter those statements into the
shell, especially if you need to iteratively modify a function definition.
Instead of writing code in the interactive shell, a nicer solution is use
an editor to write a Python function and call that function from the shell.

Houdini uses a special module named hou.session to store Python code that's
saved with the hip file. You can write functions in this module and access
them from anywhere in Houdini.

Choose __Windows > Python Source Editor__ to edit the contents of the
hou.session module. For example, suppose you want to change all the
parameter values starting with `"/home/bob"` to start with `"$HIP"`. You can
write some functions in the hou.session module and then modify and tweak
them.

{{{
#!python
def fixFilePrefixes(node, from_prefix, to_prefix, node=None):
"""For a node and all its children and grandchildren, change all
non-animated file name parameters starting with `from_prefix` so they
instead start with `to_prefix`. If the node is not specified,
the root node (/) will be used."""
if node is None:
node = hou.node('/')

for parm in node.parms():


template = parm.parmTemplate()
if (template.type() == hou.parmTemplateType.String and
template.stringType() == hou.stringParmType.FileReference and
len(parm.keyframes()) == 0 and
parm.unexpandedString().startswith(from_prefix)):
print "Fixing:", parm.path()
parm.set(to_prefix + parm.unexpandedString()[len(from_prefix):])

for child in node.children():


fixFilePrefix(from_prefix, to_prefix, child)
}}}

http://www.sidefx.com/docs/houdini10.0/hom/session (1 of 2) [12/7/2009 4:27:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/session

Then, from the Python shell you would write:


{{{
#!pycon
>>> hou.session.fixFilePrefixes("/home/bob", "$HIP")
Fixing: /obj/geo1/file1/file
}}}

Don't forget that the contents of hou.session change depending on which


hip file is loaded. Don't use hou.session for functions that need to
be available for all sessions or that are for use by a digital asset.
See below for other ways to create functions and classes.

http://www.sidefx.com/docs/houdini10.0/hom/session (2 of 2) [12/7/2009 4:27:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/independent

= Session independent scripts =

You can create a Python file that is always invoked whenever Houdini starts
up. You might use this file to define helpful Python functions; create
aliases for hou module classes, functions, and methods; or otherwise
customize Houdini. Houdini will search in `$HOUDINI_SCRIPT_PATH` for files
named `python/pythonrc.py` or `python/.pythonrc.py`. For example, if you
want to create such a file that is customed for you, you would put it in
`$HOME/houdini/scripts/python/pythonrc.py`. Similarly, you could put the
file in $HSITE to have a site or project-wide configuration script.

Note that you can use pythonrc.py to add code to the hou.session module
with [Hom:hou.appendSessionModuleSource]. Do not assign directly to
hou.session (for example, don't write hou.session.x = ...), because attributes
you assign directly to hou.session will not be saved with the hip file.

Houdini also supports Python versions of 123.cmd and 456.cmd, named 123.py
and 456.py, respectively. Like 123.cmd, 123.py is invoked only when Houdini
is started without a hip file. 456.py is invoked using the same rules
as 456.cmd: Houdini runs it each time a file is loaded or the session is
cleared.

Note that Houdini will run all the pythonrc.py files it finds in the path,
but it will only run the first 123.py file in the path. Also, if 123.cmd
and 123.py both exist, Houdini will only run 123.py.

You can run Python files in `$HOUDINI_PATH` with


`execfile(hou.findFile("yourfile.py"))`. If you want to run code that's
in an opdef: path, you can use
`eval(compile(hou.readFile("opdef:Object/myobject?section")))`.

A good way of running your Python code is to import it as a module.


Houdini will automatically append all the directories in
`$HOUDINI_SCRIPT_PATH` named `scripts/python` to sys.path. So,
if the module is in `$HOME/houdini9.0/scripts/python/yourmodule.py`,
you can run `import yourmodule`. If the path to the file is not
already in sys.path, you'll need to add it there manually or set
`$PYTHONPATH` before you import it.

To access Python variables in the global scope from hou.session,


import __main__. For example, if x is a variable in the global scope,
you can access it via __main__.x. You can use this approach to access

http://www.sidefx.com/docs/houdini10.0/hom/independent (1 of 2) [12/7/2009 4:27:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/independent

Python global variables from parameter expressions, HDA Python modules,


Python button callbacks, shelf scripts, etc.

http://www.sidefx.com/docs/houdini10.0/hom/independent (2 of 2) [12/7/2009 4:27:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/errormessages

= Python scripting errors =

== Where to find error messages ==

- For the shelf/tab menu: in the details section of the popup window.
- For HDA callbacks: in the console.
- For `123.py`/`456.py`: in the console.
- For parameters: ((MMB)) on node.
- For Python-based nodes: ((MMB)) on node.

== Interpreting Python error messages ==

When Python code generates an unhandled exception, it will display a traceback


of the call stack where the exception was raised. By looking at the last
entry in the traceback, you can find the line of code that raised the
exception.

For example, if there was spelling error in the implementation of


`fixFilePrefixes`, you might see the following traceback.

{{{
#!pycon
>>> hou.session.fixFilePrefix(hou.node('/'), '/home/luke/project', '$HIP')
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "hou.session", line 12, in fixFilePrefix
NameError: global name 'to_prefix' is not defined
}}}

The last line of the traceback displays the string representation of the
exception. The most common exceptions the hou module is likely to raise
are [Hom:hou.OperationFailed], [Hom:hou.PermissionError],
[Hom:hou.LoadWarning], and [Hom:hou.ObjectWasDeleted]. A list of all exception
types defined in the hou module can be found in the
[reference documentation|hou].

TIP:
The Python source editor, multi-line expression editor, shelf script
editor, and HDA script editors show the line number in the bottom-right
corner, helping to locate the line that raised an exception.

http://www.sidefx.com/docs/houdini10.0/hom/errormessages [12/7/2009 4:27:49 PM]


http://www.sidefx.com/docs/houdini10.0/hom/migrating

= Migrating from HScript =

The following tips may be helpful when moving from Hscript to Python:

- See the "replaced by" sections in the Hscript command and expression help
to find the equivalent functionality in the `hou` module.

- If a desired `hou` module function or method is not yet implemented, you can
find the Hscript equivalent in the "replaces" section of the `hou` module
help. You can call Hscript commands with [Hom:hou.hscript], run
expressions with [Hom:hou.hscriptExpression], and evaluate Houdini variables
with [Hom:hscriptExpandString].

- Take advantage of the language features that Python has over Hscript.
Instead of cd'ing around like you would in Hscript, use variables to store
[Hom:hou.Node] objects and and operate on those nodes. Write Python
functions to reduce the amount of code you write.

- If the `hou` module functions, methods, or classes are too verbose, create
your own aliases. For example, you could write the following:

{{{
#!pycon
>>> n = hou.node
>>> hou.Node.p = hou.Node.parm
>>> n("/obj/geo1")
<hou.ObjNode of type geo at /obj/geo1>
>>> n("/obj/geo1").p("tx")
<hou.Parm tx in /obj/geo1>
}}}

http://www.sidefx.com/docs/houdini10.0/hom/migrating [12/7/2009 4:27:49 PM]


http://www.sidefx.com/docs/houdini10.0/hom/commandline

= Command-Line Scripting =

== Accessing `hou` from a Regular Python Shell ==

By simply importing the `hou` module into a regular Python shell, you can
easily integrate Houdini into your existing Python-based scripts. The first
time you import `hou`, Python will load in all of Houdini's libraries and
initialize an empty Houdini session. The `hou` module effectively stores a
Houdini session, and you can load into that session from a hip file, inspect
that file from your script, and input and output information to and from nodes
in that sesssion.

In order to import the `hou` module, you need to tell Python to search in
`$HFS/houdini/scripts/python` for Python modules. One way to accomplish this
is to append this to the PYTHONPATH environment variable before starting
Python, and another is to append the path to the `sys.path` from within Python.
The following Python snippet will import the `hou` module into a standard
Python shell, assuming that you sourced houdini_setup to set $HFS.

{{{
#!python
#!/usr/bin/python2.5
def enableHouModule():
'''Set up the environment so that "import hou" works.'''
import sys, os

# Importing hou will load in Houdini's libraries and initialize Houdini.


# In turn, Houdini will load any HDK extensions written in C++. These
# extensions need to link against Houdini's libraries, so we need to
# make sure that the symbols from Houdini's libraries are visible to
# other libraries that Houdini loads. So, we adjust Python's dlopen
# flags before importing hou.
if hasattr(sys, "setdlopenflags"):
old_dlopen_flags = sys.getdlopenflags()
import DLFCN
sys.setdlopenflags(old_dlopen_flags | DLFCN.RTLD_GLOBAL)

try:
import hou
except ImportError:
# Add $HFS/houdini/scripts/python to sys.path so Python can find the
# hou module.

http://www.sidefx.com/docs/houdini10.0/hom/commandline (1 of 3) [12/7/2009 4:27:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/commandline

sys.path.append(os.environ['HFS'] + "/houdini/scripts/python")
import hou
finally:
if hasattr(sys, "setdlopenflags"):
sys.setdlopenflags(old_dlopen_flags)

enableHouModule()
import hou
}}}

When you import the `hou` module, Python will check out a license. By
default, it will use a Houdini Batch license, and use a Houdini Master
license if no batch license could be found. If you want it to use a
Houdini Escape license, you can set the HOUDINI_SCRIPT_LICENSE variable
to "hescape" before importing the hou module. You can also set this
variable from within your Python script with
`os.environ['HOUDINI_SCRIPT_LICENSE'] = 'hescape'`.

By default, the `hou` module will not return the Houdini license until the
Python interpreter exits. However, if you have a long running Python
script and want to quickly acquire and release a license, you can call
[Hom:hou.releaseLicense] when you are done with the `hou` module. Subsequent
calls into the `hou` module will reacquire the license. Note that Houdini's
session data and libraries will not be unloaded from memory until Python exits.

The `hou` module, when imported by Python or Houdini, will loop through the
directories in $HOUDINI_SCRIPT_PATH, and for each directory found, append
that directory plus "/python" to sys.path. Also note that
$HOUDINI_SCRIPT_PATH defaults to the directories in $HOUDINI_PATH with
an additional "/scripts" suffix. For example, if you use the default
$HOUDINI_PATH, importing `hou` will append
`$HOME/houdiniX.Y/scripts/python` to Python sys.path.

=== hython ===

Hython is a Python shell that ships with Houdini that is slightly


different from the standard Python shell in the following ways:
- It automatically adds `$HFS/houdini/scripts/python` to sys.path and
imports the hou module when it starts up.
- You can pass .hip files on the command line and it will load them.
- It supports tab completion, and you can press tab twice to list possible
completions.
- It can receive and handle Houdini openport commands while waiting for console

http://www.sidefx.com/docs/houdini10.0/hom/commandline (2 of 3) [12/7/2009 4:27:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/commandline

input.

http://www.sidefx.com/docs/houdini10.0/hom/commandline (3 of 3) [12/7/2009 4:27:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/rpc

=== Houdini RPC port ===

You can control Houdini remotely by accessing HOM through an


XML-RPC (remote procedure call) interface over the network.
Python provides a built-in XML-RPC client, so you can control
a remote copy of Houdini from a Python script.

To start Houdini's RPC server, type the following in


Houdini's Python shell.

{{{
#!python
import houxmlrpc
houxmlrpc.run(port=8888)
}}}

The RPC server will run in a separate thread, waiting for RPC calls from
other processes.

Now you can remotely control Houdini from another process (or on
another computer). For example, in Python, to access the `hou` module
of a copy of Houdini running locally on port `8888`:

{{{
#!python
rpc_server = houxmlrpc.ServerProxy('http://localhost:8888')
hou = rpc_server.hou
}}}

http://www.sidefx.com/docs/houdini10.0/hom/rpc [12/7/2009 4:27:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/expressions

= Python parameter expressions =

== Setting the Expression Language ==

Parameter expressions may be written using either the Hscript expression


language or the Python expression language. You can mix and match the
languages, so some parameters in a node may use Hscript expressions while
other parameters in the same node use Python expressions.

In HOM terminology, a parameter can be in one of two states: animated or


not animated. An animated parameter has a set of keyframes. Each
keyframe contains a time and an expression (as well as other information
discussed later). A keyframe is active from its time up to the next
keyframe, or until the end of the time range if there is no next keyframe.
When Houdini evaluates a parameter at a particular time, it looks up the
keyframe corresponding to that time and evaluates the expression. So,
when someone says a parameter has an expression, he or she typically means
that it has a single keyframe at time=0, and they're referring that that
keyframe's expression. The convenience functions
[Hom:hou.Parm#expression] and [Hom:hou.Parm#setExpression] provide easy
access to that expression.

There are two ways to control a parameter's language, depending on whether


or not the parameter is already animated. If it is not animated
and you write an expression in it, Houdini uses the node's expression
language. The parameter dialog displays the node's language as either
an H (for Hscript expressions) or the Python logo (for Python expressions).
Changing the node's language does not affect parameters that already have
expressions; it simply determines the language for new expressions you write.
If a parameter's language is different from the node's language, Houdini will
highlight that parameter in pink to make you aware of that difference.

You can control the default expression language for newly created nodes
with a preference in Houdini's main preference dialog.

If the parameter is already animated, you can change its language


by right-clicking on it and selecting "Expression -> Change Language to Python"
or "Change Lanuage to Hscript Expressions". For most expressions, changing
the language will generate an error because of syntactical and API differences
between Hscript expressions and Python. However, certain functions, like
[ch|Hom:hou.ch] and the animation functions ([cubic|Hom:hou.cubic],
[bezier|Hom:hou.cubic], etc.) have been carefully designed to use the

http://www.sidefx.com/docs/houdini10.0/hom/expressions (1 of 4) [12/7/2009 4:27:52 PM]


http://www.sidefx.com/docs/houdini10.0/hom/expressions

same syntax in both Hscript expressions and Python. For those expressions,
you change change the language without generating errors or changing the
output of those parameters.

== Single and Multi Line Python Expressions ==

With Python parameter expressions, there is one simple rule you need to
know: single lines are evaluated as standard expressions, and multiple
lines are evaluated as function bodies. For example, `2+2` and `ch("ty") + 2`
are valid Python expressions, but `x=3` and `x=3; x` are not. However, if you
press Alt+e to bring up the multi-line editor, you can enter the following
Python function body:

{{{
#!python
if ch("ty") == 0:
return 0
if ch("ty") < 0:
return ch("tx")
return ch("tz")
}}}
From a Python function body you can run arbitrary Python statements, giving
you full access to Python's standard library. Beware that Houdini may
evaluate the parameter more often than you expect.

== Python Expression Namespaces ==

Python expressions run in a different namespace than the global namespace


provided by the Python shell. This way, you don't have to worry about
Python global variables created in the shell affecting the output of
parameter expressions, and vice versa. Also, to reduce the length of
your Python parameter expressions, Houdini implicitly runs
`from hou import *` and from `hou.session import *` in the Python expression
namespaces. This means you can drop the `hou.` prefix in your Python
expressions, and you can call hou.session functions as though they were
defined locally. For example, in a Python expression you can write
`ch("ty")` instead of `hou.ch("ty")`. Similarly, Houdini imports the
following functions from Python's math module: acos, asin, atan, atan2, ceil,
cos, cosh, degrees, exp, fabs, floor, log, log10, pow, radians, sin, sinh,
sqrt, tan, tanh Because the expression operates in a different namespace,
Houdini's global Python namespace is not polluted by these imports.

TIP:

http://www.sidefx.com/docs/houdini10.0/hom/expressions (2 of 4) [12/7/2009 4:27:52 PM]


http://www.sidefx.com/docs/houdini10.0/hom/expressions

If you really want to access a global variable from a Python expression,


you can run `import __main__` to get access to Houdini's global
Python namespace. For example, if `foo` is a function defined in
your pythonrc.py file, you can access `foo` from a Python expression via
`__main__.foo`.

TIP:
You can also access the Python expression namespace from the global
namespace with [Hom:hou.expressionGlobals].

== String Parameter Expressions ==

Note that when Houdini evaluates string parameters without expressions,


it will do string expansion on the result. So, if the unanimated string
parameter contains `image$F.pic`, Houdini will expand $F, regardless of whether
or not the node's language is set to Hscript expressions. However, if you
animate the string parameter, using the Hscript expression language,
the expression needs to be `"image$F.pic"`, because `image$F.pic` is not a
valid Hscript expression evaluating to a string. (To convince yourself
of this, run `echo \`image$F.pic\`` and `echo \`"image$F.pic"\`` in a
textport.) Houdini's UI goes through great pains to automatically
convert between unexpanded strings and Hscript expressions for you, and
the UI often tries to hide the actual expression. (To see the expression,
you can inspect the [hou.Keyframe] with [hou.Parm#keyframes].) For
Python string expressions, you also need to write a valid Python expression,
such as `"image %d" % frame()`. Thankfully, Houdini will let you see and edit
those expressions, and it does not second-guess your intentions and
automatically modify those expressions for you.

== Local Variables ==

You can access Hscript expression local variables from Python with
[Hom:hou.lvar]. For example, you can write the Hscript expression `$TX`
in Python as `lvar('TX')`. Note that [Hom:hou.lvar] cannot access hscript
global variables; for evaluate them, use [Hom:hou.expandString].

Many local variables in Houdini correspond to a SOP or POP that iterates


over a number of points or primitives, evaluating the nodes parameters
for each iteration. Each time the parameters are evaluated, Houdini uses
a different value for the local variable, corresponding to the current
point or primitive. The hou module provides [Hom:hou.SopNode#curPoint],
[Hom:hou.SopNode#curPrim], and [Hom:hou.PopNode#curPoint], giving you
access to a [Hom:hou.Point] or [Hom:hou.Prim] object. So, for example,

http://www.sidefx.com/docs/houdini10.0/hom/expressions (3 of 4) [12/7/2009 4:27:52 PM]


http://www.sidefx.com/docs/houdini10.0/hom/expressions

`lvar('Cr')` in a Point SOP could also be written as


`curPoint().attribValue('C')[0]`. While this approach is more verbose
and has additional overhead, it is more generic, giving you access to
information in points and primitives that may not be available through
local variables.

== Interrupting Expression Evaluation ==

If you call Python code that takes a long to evaluate, or it goes into
an infinite loop, you can press Escape to interrupt expression evaluation.

http://www.sidefx.com/docs/houdini10.0/hom/expressions (4 of 4) [12/7/2009 4:27:52 PM]


hou - Houdini online help

Houdini Houdini Object


10 Model

Search

HOM hou
Module containing all the sub-modules, classes, and functions to
access Houdini.

Subtopics

Text type All category All Clear

Assets

hou.HDADefinition

Represents the definition of a houdini digital asset (HDA).

hou.HDAModule

User-defined Python module containing functions, classes, and constants that are stored with

and accessed from a digital asset.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (1 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.HDAOptions

Stores miscellaneous options about a houdini digital asset (HDA).

hou.HDASection

Represents a “section” of data stored along with a digital asset.

hou.hda

Module containing functions related to Houdini Digital Assets.

hou.hdaLicenseType

Enumeration of digital asset license permission levels.

Channels

hou.ChannelDopesheet

hou.ChannelEditorPane

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (2 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.ChannelGraphEditor

hou.ChannelList

hou.ChannelListPane

hou.ChopNode

Class representing a CHOP node.

hou.ChopViewerPane

hou.Track

hou.bezier

Evaluate a Bezier interpolation spline for an animated parameter using the left keyframe’s

outgoing value, tangent, and acceleration and the right keyframe’s incoming value, tangent,

and acceleration.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (3 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.commitPendingKeyframes

hou.constant

Evaluate an animation function for an animated parameter. The return value is always the

left keyframe’s outgoing value.

hou.cubic

Smooth curve between the left keyframe’s outgoing slope and the right’s incoming slope.

hou.cycle

Repeats the motion between two frames, lining up the first repeated value with the left

keyframe’s value.

hou.cyclet

Repeats the motion between two times, lining up the repeated values with the left

keyframe’s value.

hou.ease

Interpolates between the left keyframe’s outgoing value and the right keyframe’s incoming

value.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (4 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.easein

Interpolates between the left keyframe’s outgoing value and the right keyframe’s incoming

value.

hou.easeinp

Interpolates between the values of two keyframes.

hou.easeout

Interpolates between the left keyframe’s outgoing value and the right keyframe’s incoming

value.

hou.easeoutp

Interpolates between the values of two keyframes.

hou.easep

Interpolates between the values of two keyframes.

hou.linear

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (5 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

Linearly interpolates between the left keyframe’s outgoing value and the right keyframe’s

incoming value.

hou.match

Creates a smooth curve between the left keyframe’s incoming slope and the right keyframe’s

outgoing slope.

hou.matchin

Creates a straight line from the left keyframe’s incoming value, matching the left keyframe’s

incoming slope.

hou.matchout

Creates a straight line from the right keyframe’s outgoing value, matching the right

keyframe’s outgoing slope.

hou.qlinear

Linearly interpolates between keyframes using quaternions.

hou.quintic

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (6 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help
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.

hou.repeat

Repeats the motion between two times.

hou.repeatt

Repeats the motion between two times.

hou.spline

Fits a spline through consecutive keyframe values.

hou.vmatch

Matches the incoming and outgoing values and slopes.

hou.vmatchin

Matches the left keyframe’s incoming slope.

hou.vmatchout

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (7 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

Matches the right keyframe’s outgoing slope.

Cooking

hou.performance

hou.recookNodesIfReferencedFilesChanged

hou.setHighlightNodesWhenCooking

hou.showCookStatisticsInNodeInfo

Dynamics

hou.DopData

A piece of data stored inside a DOP network’s simulation.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (8 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.DopDataType

Describes the type of data in a DOP object.

hou.DopNetNode

Represents a dynamics (DOP) network node.

hou.DopNode

Represents a dynamics node.

hou.DopObject

A type of DOP data that contains an object in the simulation.

hou.DopObjectGroup

hou.DopRecord

A table of values stored inside a DopData.

hou.DopRelationship

A type of DOP data that stores which DOP objects affect one another.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (9 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.DopSimulation

A dynamics simulation contained inside a DOP network node.

hou.currentDopNet

hou.dop

DOP related functions.

hou.dopDataTypes

hou.fieldType

Enumeration of field types.

hou.setCurrentDopNet

hou.setSimulationEnabled

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (10 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.simulationEnabled

Exceptions

hou.Error

Base class for all exceptions in the hou module.

hou.GeometryPermissionError

Exception that is raised when you try to modify geometry from outside of a Python SOP.

hou.InitScriptFailed

hou.InvalidInput

Exception that is raised when you try to set a node’s input to something invalid.

hou.InvalidNodeType

Exception that is raised when you try to call a method on a Node that isn’t supported by that

type of node.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (11 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.InvalidSize

Exception that is raised when you pass a sequence of the wrong length to a function.

hou.KeyframeValueNotSet

hou.LoadWarning

Exception class for when loading a hip file in Houdini generates warnings.

hou.MatchDefinitionError

hou.NotAvailable

Exception class for when an operation attempted to use a feature that is not available. This

class is a subclass of .

hou.ObjectWasDeleted

Exception class for when you use a stale variable to attempt to access something that was

deleted in Houdini. This class is a subclass of .

hou.OperationFailed

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (12 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.OperationInterrupted

hou.PermissionError

hou.SystemExit

hou.TypeError

hou.ValueError

General

hou.EnumValue

This class is the base class for an enumeration value. It cannot be instanced and is not

meant to be used directly by the user.

hou.Preference

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (13 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.Value

hou.Variable

The variable() function returns a variable by name. The Variable class represents Houdini

variables.

hou._isExiting

Returns whether Houdini is in the process of exiting. This function is called internally by the

interactive Houdini Python shell.

hou.almostEqual

Compares two numbers and returns True if they are almost equal in terms of how far apart

they are when represented as floating point numbers.

hou.appendSessionModuleSource

Appends the given source code to the hou.session module. The appended code is made

available immediately. You do not have to re-import hou.session.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (14 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.applicationCompilationDate

Returns the application’s compilation date.

hou.applicationName

Returns the application name.

hou.applicationVersion

Returns the application’s version number as a tuple of integers – (major_version,

minor_version, build_version).

hou.applicationVersionString

Returns the application’s version number as a string.

hou.audio

Functions related to playing audio using Houdini’s playbar.

hou.cache

hou.convertToNewKinematics

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (15 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.createVariable

hou.exit

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.

hou.hipFile

hou.hmath

Houdini and 3D related math functions.

hou.isApprentice

Returns True if the application is an apprentice (non-commercial) version. Returns False

otherwise.

hou.operatingSystem

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (16 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.releaseLicense

Release the currently held Houdini license.

hou.session

This module is used to define custom classes, functions and variables that can be called from

within the current Houdini session. The contents of this module are saved into the .hip file.

hou.sessionModuleSource

Returns the contents of the hou.session module.

hou.setSessionModuleSource

Sets the contents of the hou.session module. The new contents is made available

immediately. You do not have to re-import hou.session.

hou.variable

hou.variables

Geometry

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (17 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

attribData

Enumeration of attribute data types.

hou.Attrib

This class stores information about a Geometry attribute.

hou.Curve

hou.Face

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.

hou.Geometry

A Geometry object contains the points and primitives that define a 3D geometric shape. For

example, each SOP node in Houdini generates a single Geometry object.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (18 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.Metaball

hou.Point

Each Point object resides inside a Geometry object and stores a 3D position. Points may be

shared between primitives (such as polygons), and the set of points and primitives describes

a 3D shape.

hou.PointGroup

hou.Polygon

A Polygon is a kind of Face whose vertices are connected via straight lines.

hou.Prim

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.

hou.PrimGroup

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (19 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.Quadric

A Quadric is a kind of geometry primitive (Prim object) that represents a 3-dimensional

surface defined by a quadratic polynomial equation (e.g. a sphere or tube).

hou.SopCacheWatermark

hou.SopNode

Represents a surface node.

hou.Surface

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.

hou.Vertex

Existing inside a Geometry object, a Vertex object is contained in exactly one Prim, and

references exactly one Point.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (20 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help
hou.Volume

A Volume is a kind geometry primitive (Prim object) storing a three dimensional array of

voxels.

hou.attribType

Enumeration of geometry attribute types.

hou.geometryType

Enumeration of geometry component types.

hou.primType

IO

hou.FileType

hou.fileReferences

hou.findDirectories

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (21 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

Search the houdini path for the specified directory, returning a tuple of all the matches. The

directory name specified should be relative to the houdini directory.

hou.findDirectory

Search the houdini path for a specified directory, returning the first match found. The

directory name specified should be relative to the houdini directory.

hou.findFile

Search the houdini path for a specified file, returning the first match found. The filename

specified should be relative to the houdini directory.

hou.findFiles

Search the houdini path for the specified file, returning a tuple of all the matches. The

filename specified should be relative to the houdini directory.

hou.homeHoudiniDirectory

Return the path to the Houdini directory in your $HOME directory.

hou.houdiniPath

Return the contents of the Houdini path as a tuple of strings.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (22 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.knownFileTypes

hou.readFile

Read a file, returning the contents in a string. Supports regular files, opdef: and oplib: paths,

and http URLs.

Images

hou.CompositorViewer

hou.CopNode

Represents a compositing node.

hou.HistogramViewer

hou.ImageTimelineViewer

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (23 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.ImageViewer

hou.ModalImageViewer

hou.Mplay

hou.pixelColorInFileByUV

Keyframes

hou.BaseKeyframe

Abstract base class for all keyframe class.

hou.Keyframe

Class representing the default keyframe type, a numerical keyframe.

hou.StringKeyframe

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (24 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.infoAboutParmKeyframeFile

hou.loadParmKeyframes

hou.saveParmKeyframes

hou.setDefaultSegmentFunction

Materials

hou.Gallery

hou.GalleryEntry

hou.ShopNode

The base class for all SHOP nodes in Houdini. An instance of this class corresponds to exactly

one instance of a node in Houdini.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (25 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.galleries

hou.shaderType

Enumeration of SHOP shader types.

Node Organization

hou.NetworkBox

Represents a network box.

hou.NodeBundle

A named set of nodes whose contents can be from different networks. A bundle’s contents

may be fixed or may be determined from a pattern, and the contents may be filtered by

node type.

hou.NodeGroup

Represents a node group.

hou.addNodeBundle

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (26 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

Create a new node bundle with the specified name.

hou.nodeBundle

Given a node bundle name, return the corresponding NodeBundle object, or None if there is

not one with that name.

hou.nodeBundles

Return a tuple containing all the node bundles in the current session.

hou.nodeTypeFilter

Enumeration of available node type filters.

hou.selectedNodeBundles

Return a tuple containing all the node bundles that are selected in the bundle list pane.

Node type categories

hou.NodeTypeCategory

Represents a category of node types, such as surface nodes (SOPs) or particle nodes (POPs).

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (27 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.ShopNodeTypeCategory

hou.chopNetNodeTypeCategory

Return the NodeTypeCategory instance for Houdini channel container (chopnet) nodes.

hou.chopNodeTypeCategory

Return the NodeTypeCategory instance for Houdini channel (chop) nodes.

hou.cop2NetNodeTypeCategory

Return the NodeTypeCategory instance for Houdini composite container (copnet) nodes.

hou.cop2NodeTypeCategory

Return the NodeTypeCategory instance for Houdini composite (cop) nodes.

hou.dopNodeTypeCategory

Return the NodeTypeCategory instance for Houdini dynamic (dop) nodes.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (28 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.managerNodeTypeCategory

Return the NodeTypeCategory instance for Houdini manager nodes. The manager nodes are /

obj, /out, /part, /ch, /shop, /img, and /vex.

hou.nodeTypeCategories

Return a dictionary where the keys are the category names (e.g. “Object”, “Sop”) and the

values are hou.NodeTypeCategory objects.

hou.objNodeTypeCategory

Return the NodeTypeCategory instance for Houdini object nodes. For example, if /obj/model

is an object then hou.node(“/obj/model”).type().category() is hou.objectNodeTypeCategory

().

hou.popNetNodeTypeCategory

Return the NodeTypeCategory instance for Houdini particle container (popnet) nodes.

hou.popNodeTypeCategory

Return the NodeTypeCategory instance for Houdini particle (pop) nodes.

hou.rootNodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (29 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

Return the NodeTypeCategory instance for Houdini root (/) node. There is only one instance

of the root node, and it has its own node type category.

hou.ropNodeTypeCategory

Return the NodeTypeCategory instance for Houdini output (rop) nodes.

hou.shopNodeTypeCategory

Return the NodeTypeCategory object corresponding to shader (SHOP) nodes.

hou.sopNodeTypeCategory

Return the NodeTypeCategory instance for Houdini geometry (sop) nodes.

hou.vopNetNodeTypeCategory

Return the NodeTypeCategory instance for Houdini vex builder container (vopnet) nodes.

hou.vopNodeTypeCategory

Return the NodeTypeCategory instance for Houdini vex builder (vop) nodes.

Nodes

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (30 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.Node

The base class for all nodes in Houdini (objects, SOPs, COPs, etc.) An instance of this class

corresponds to exactly one instance of a node in Houdini.

hou.NodeConnection

Represents a connection (wire) between two Nodes.

hou.NodeType

A NodeType specifies the information common to all instances of a type of node, such as the

parameter set, algorithm, minimum number of inputs, etc. For example, the geometry object

and subdivide SOP are node types. /obj/geo1 and /obj/geo2, on the other hand, are Nodes

that are instances of the geometry object node type.

hou.PopNetNode

hou.PopNode

Represents a particle node.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (31 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.SopNodeType

This kind of NodeType contains extra attributes specific to SOP nodes.

hou.SubnetIndirectInput

A node-like square that appears inside subnets and corresponds to the node wired into the

subnet.

hou.VopNetNode

hou.cd

Change the current node. Houdini has one current node, analogous to a current directory in

a file system. If a relative path is given, it is relative to the node returned by hou.pwd().

hou.copyNodesTo

Copy all given nodes to a new place in node hierarchy.

hou.copyNodesToClipboard

hou.currentSimulation

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (32 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.filterNodesByType

hou.layoutNodes

hou.moveNodesTo

Move all given nodes to a new place in node hierarchy.

hou.node

Given a path string, return a Node object. Return None if the path does not refer to a node.

hou.nodeType

Given a node type category object and a name, return the corresponding NodeType object.

Return None if there is no such type with that name.

hou.nodeTypeSource

Enumeration of node type sources.

hou.pasteNodesFromClipboard

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (33 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.perms

Enumeration of permission flag combinations.

hou.pwd

If called from an evaluating parm, return the node containing the parm. Otherwise, return

Houdini’s global current node. You can change this current node with hou.cd

hou.root

Return the root node (i.e. /).

hou.selectedNodes

Return a list of all selected nodes.

hou.setCurrentSimulation

hou.setPwd

Make the given node Houdini’s current node. This function is equivalent to hou.cd(node.path

()).

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (34 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

Objects

hou.AmbientLightObjNode

hou.BoneObjNode

hou.GeometryObjNode

hou.LightObjNode

hou.ObjNode

An instance of this class corresponds to exactly one instance of an object node in Houdini.

Parameter templates

hou.ButtonParmTemplate

Describes a button parameter.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (35 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.FloatParmTemplate

hou.FolderSetParmTemplate

Describes a set of folders.

hou.IntParmTemplate

hou.LabelParmTemplate

Describes a label parameter.

hou.MenuParmTemplate

Describes a menu parameter.

hou.MultiParmTemplate

hou.ParmTemplate

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (36 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.RampParmTemplate

Parameter template for a ramp parameter.

hou.SeparatorParmTemplate

Template for a separator parameter. Separators are just lines between parameters.

hou.StringParmTemplate

hou.ToggleParmTemplate

hou.parmData

Enumeration of parameter data types.

hou.parmLook

Enumeration of available looks for a parameter

hou.parmNamingScheme

Enumeration of available naming schemes for a parameter.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (37 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.parmTemplateType

Enumeration of parameter template types.

hou.stringParmType

Enumeration of string parameter types.

Parameters

hou.Parm

A parameter in a node. Each parameter has a unique name within its node and exists inside

a parameter tuple.

hou.ParmGroup

hou.ParmTuple

A tuple of one or more node parameters. Each parameter tuple has a unique name within its

node.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (38 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.ch

The same as evalParm(). Provided for backward compatibility.

hou.chsop

Evaluate a parameter that references a node, and return the absolute path to the node.

hou.evalParm

Evaluate a parameter, given either an absolute or a relative path to it. Relative path searches

are done from the node returned by . This function is a shortcut for hou.parm(path).eval().

hou.evalParmTuple

Evaluate a parameter, given either an absolute or a relative path to it. Relative path searches

are done from the node returned by . This function is a shortcut for hou.parmTuple(path).

eval().

hou.exprLanguage

Enumeration of available expression languages.

hou.fileType

Enumeration of file types.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (39 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.loadParmSamples

hou.lvar

Return the value of a node’s local variable. Call this function from expressions inside node

parameters.

hou.parm

Given a path string, return a Parm object. Return None if the path does not refer to a

parameter.

hou.parmTuple

Given a path string, return a ParmTuple object. Return None if the path does not refer to a

parameter tuple.

hou.saveParmSamples

hou.scope

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (40 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.scriptLanguage

Enumeration of available script languages.

hou.topLevelParmGroup

hou.updateMode

Enumeration of interface update modes.

Rendering

hou.ActiveRender

hou.RenderMachineVariable

hou.RopNode

Represents a render output node.

hou.activeRenders

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (41 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.renderMachineVariables

hou.renderMethod

Enumeration of dependency rendering methods.

Scripting

hou.ShellIO

hou.Textport

hou.TextportPane

hou._addPreloadIcon

Used internally by Houdini to preload icons for speed.

hou._getArgumentAutoComplete

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (42 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

This function is used internally by the Houdini Python shell for argument auto-completion on

functions of the hou module.

hou.endListeningOnPort

hou.exitScript

hou.expandString

Evaluates the given string expression and returns the result.

hou.expandStringAtFrame

Evaluates the given string expression at a certain frame and returns the result.

hou.expressionGlobals

Return the globals dictionary used by the parameter expression evaluation namespace.

hou.hscript

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

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (43 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

error output. You can specify multiple commands by using ';' or the newline character as the

separator.

hou.hscriptCommandHelp

Return the text help of an hscript command. This function is used to help re-implement

hscript commands in Python.

hou.hscriptExpandString

Deprecated: Use expandString.

hou.hscriptExpression

Evaluate an Hscript expression.

hou.hscriptFloatExpression

Evaluate an Hscript expression as a float.

hou.hscriptMatrixExpression

Evaluate an Hscript expression as a vector.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (44 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.hscriptStringExpression

Evaluate an Hscript expression as a float.

hou.hscriptVectorExpression

Evaluate an Hscript expression as a vector.

hou.listenOnPortAndBlockUntilClosed

hou.runJava

hou.runTcl

hou.runTclTk

hou.startListeningOnPort

hou.stopNonDaemonJavaProcesses

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (45 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.tempVarStack

hou.unusedPort

Shelf

hou.Shelf

hou.ShelfDock

Represents the shelf area at the top of the screen, within which shelf sets and shelf tabs

exist.

hou.ShelfElement

hou.ShelfSet

hou.Tool

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (46 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.shelves

Takes

hou.Take

hou.takes

Timeline

hou.TimeGroup

hou.addTimeGroup

hou.decrementFrame

hou.findTimeGroup

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (47 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.fps

Return the number of frames per second.

hou.frame

Return the playbar’s current frame. Note that Houdini can be on a fractional frame if

fractional frames are enabled.

hou.frameToTime

Convert from a given frame value to a time value.

hou.frameToTimecode

hou.globalFrameRange()

hou.goToFirstFrame

hou.goToLastFrame

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (48 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.goToNextKeyframe

hou.goToPreviousKeyframe

hou.incrementFrame

hou.intFrame

Return the playbar’s current frame, rounded to the nearest integer.

hou.playbar

hou.setFps

Set the number of frames per second.

hou.setFrame

Set the playbar’s current frame. Note that the frame may be a fractional value.

hou.setGlobalFrameRange

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (49 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.setPlaybackFrameRange

hou.setTime

Set the playbar’s time.

hou.time

Return the playbar’s current time, in seconds of playback.

hou.timeGroups

hou.timeToFrame

Convert from a given time value to a frame value, rounding the result to a integer if it is

close to an integer.

hou.timecodeToFrame

UI

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (50 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help
hou.BundleListPane

hou.Desktop

Class representing a Houdini desktop (a pane layout).

hou.FloatingPanel

A floating window that contains one or more panes.

hou.HandleListPane

hou.HelpBrowser

Class representing a help browser pane tab. Provides methods for controlling the help

browser.

hou.IPRViewer

An interactive preview render (IPR) window.

hou.LightLinkerPane

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (51 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.NetworkEditor

hou.NetworkGraph

hou.NetworkList

hou.Pane

A rectangular area of the desktop that contains one or more pane tabs.

hou.PaneTab

One of the tabs inside a desktop pane.

hou.ParmPane

hou.ParmSpreadsheetPane

hou.PathBasedPaneTab

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (52 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.TakeListPane

hou.fileChooserMode

Enumeration of possible read/write modes for the file chooser.

hou.isUIAvailable

Return whether or not the hou.ui module is available.

hou.paneLinkType

Enumeration of possible pane link values.

hou.paneTabType

Enumeration of pane tab types.

hou.reloadChannelGroupMenuFile

hou.reloadNodeMenuFile

hou.reloadParmMenuFile

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (53 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.severityType

Enumeration of dialog message severities.

hou.ui

Module containing user interface related functions.

Utility

hou.BoundingBox

An axis-aligned 3D rectangular region.

hou.Color

hou.Matrix3

A 3×3 matrix of floating point values.

hou.Matrix4

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (54 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

A 4×4 matrix of floating point values.

hou.Quaternion

hou.Ramp

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.

hou.ShopNodeType

This kind of NodeType contains extra attributes specific to SHOP nodes.

hou.Vector2

A sequence of 2 floating point values, with associated mathematical operations.

hou.Vector3

A sequence of 3 floating point values, with associated mathematical operations.

hou.Vector4

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (55 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

A sequence of 4 floating point values, with associated mathematical operations.

hou.colorType

Enumeration of color types.

hou.rampBasis

Enumeration of ramp interpolation types.

hou.rampParmType

Enumeration of ramp types.

VEX

hou.VexContext

hou.endVexProfiling

hou.reloadAllScriptAndVexNodeTypes

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (56 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.startVexProfiling

hou.vexContextForNodeTypeCategory

hou.vexContextForShaderType

hou.vexContexts

Viewer

hou.ComponentSelection

hou.ConstructionPlane

hou.ContextViewer

A class representing a context viewer pane tab.

hou.GeometryDisplayToggles

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (57 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.GeometrySelection

hou.GeometryViewport

hou.GeometryViewportSettings

hou.HandleBinding

hou.HandleNodeTypeParmBinding

hou.HandleType

hou.ParticleSelection

hou.ParticleViewer

hou.PersistentHandle

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (58 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.PersistentHandleParmBinding

hou.SceneViewer

hou.Selector

Describes how Houdini should prompt the user to choose geometry in the viewport when

creating a new SOP node instance.

hou.ViewerState

hou.componentType

Enumeration of component types.

hou.connectivityType

Enumeration of connectivity types.

hou.forceViewportUpdate

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (59 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

hou.geometryViewportType

Enumeration of scene viewer viewport types.

hou.handleBindings

hou.persistentHandles

hou.positionType

Enumeration of spaces.

hou.selectorBindings

hou.setViewportUpdateMode

hou.shadingMode

Enumeration of viewer shading modes.

hou.viewportUpdateMode

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (60 of 61) [12/7/2009 4:28:06 PM]


hou - Houdini online help

snappingMode

Enumeration of snapping modes.

hou.PersistentHandleGroup

http://www.sidefx.com/docs/houdini10.0/hom/hou/ (61 of 61) [12/7/2009 4:28:06 PM]


Object Transform Example: A Simple Example - Houdini online help

Houdini Houdini Object HOM Object Transform Example: A Simple


10 Model Cookbook Example

Search

HOM Object Transform Example: A


Simple Example

Overview

This example illustrates how to retrieve and set transformations on object nodes.

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/object_xform, also found in

the cookbook/object_xform directory of cookbook_files.tar.gz.

Getting Started

Load obj_xform.hip and you’ll see a series of boxes chained together in a transformation hierarchy. Translate

and rotate a box object in the middle of the chain to see that the outputs of that box inherit the transformations.

Open up a Python shell window in Houdini and observe the effects on box_object4 in both the viewport and

network editor as you enter the following:

# Store the hou.ObjNode for /obj/box_object4 into a Python variable.


>>> box_object4 = hou.node("/obj/box_object4")
>>> box_object4
<hou.ObjNode of type geo at /obj/box_object4>

# Ask for box_object4's world transformation. This transformation matrix


# includes the parm transformation (determined from the translate, rotate,
# scale, etc. parameters on the object), pretransformations, parent
# transformations, transformations on the containing object, etc.

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/object_xform/ (1 of 4) [12/7/2009 4:28:13 PM]


Object Transform Example: A Simple Example - Houdini online help

>>> xform = box_object4.worldTransform()


>>> xform
<hou.Matrix4 [[0.942106, -0.147233, -0.301261, 0],
[0.134676, 0.988938, -0.062158, 0],
[0.3070 8, 0.017987, 0.951514, 0],
[-5.04816, -0.769449, -9.42593, 1]]>

# Disconnect box_object4's input. box_object4 will move, since it no longer


# inherits its input's transformations. If we print out its new transformation
# matrix, we see that it's different.
>>> box_object4.inputs()
(<hou.ObjNode of type geo at /obj/box_object3>,)
>>> box_object4.setFirstInput(None)
>>> box_object4.inputs()
()
>>> box_object4.worldTranform()
<hou.Matrix4 [[0.966956, 0, 0.254942, 0],
[0, 1, 0, 0],
[-0.254942, 0, 0.966956, 0],
[0.885497 , 0, -3.01977, 1]]>

# Restore box_object4's transformation to its previous value. We'll leave


# its input disconnected, so we'll have unparented it but kept its position.
# setWorldTransform will adjust the objects parameters to achieve the
# desired end result, accounting for inputs, pretransforms, etc.
>>> box_object4.setWorldTransform(xform)

Writing a Function to Unparent

Next, let’s package up the logic to unparent a node and keep its position into a function, and we’ll call that

function on box_object4 from a shelf tool.

Reload obj_xform.hip so that box_object4 is parented again, and add the following code to a new shelf tool.

Right-click on an empty area of the shelf, select New Tool, create a tool named “Unparent”, and add the

following in the Script tab:

def unparentAndKeepPos(obj_node):
"""Unparent an object node, but keep it in the same position as it was
when it was parented.
"""
xform = obj_node.worldTransform()
obj_node.setFirstInput(None)
obj_node.setWorldTransform(xform)

unparentAndKeepPos(hou.node("/obj/box_object4"))

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/object_xform/ (2 of 4) [12/7/2009 4:28:13 PM]


Object Transform Example: A Simple Example - Houdini online help

Unparenting the Selected Node

Let’s generalize the shelf tool to work with the viewport’s selected node instead of box_object4. To do that, we

can use hou.SceneViewer.selectObjects to return the currently selected object. Here is the new shelf tool:

# The toolutils module ships with Houdini and is used to perform common
# shelf tool operations. It can be found in $HFS/houdini/scripts/python.
import toolutils

def unparentAndKeepPos(obj_node):
"""Unparent an object node, but keep it in the same position as it was
when it was parented.
"""
xform = obj_node.worldTransform()
obj_node.setFirstInput(None)
obj_node.setWorldTransform(xform)

# If an object is already selected, we'll use it. If nothing is selected,


# we'll prompt the user to select something. If multiple objects are selected,
# we'll use the last one, since that should correspond to the parameter pane
# contents.
viewer = toolutils.sceneViewer()
obj_node = viewer.selectObjects(quick_select=True)[-1]
unparentAndKeepPos(obj_node)

Reparenting the Selected Node

Next, let’s write another shelf tool that will reparent the selected node. It will prompt the user for the new

parent node.

# The toolutils module ships with Houdini and is used to perform common
# shelf tool operations. It can be found in $HFS/houdini/scripts/python.
import toolutils

def parentAndKeepPos(obj_node, new_parent):


"""Parent an object node, but keep it in the same position as it was
when it was unparented.
"""
xform = obj_node.worldTransform()
obj_node.setFirstInput(new_parent)
obj_node.setWorldTransform(xform)

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/object_xform/ (3 of 4) [12/7/2009 4:28:13 PM]


Object Transform Example: A Simple Example - Houdini online help

# We'll select the object to reparent in the same way the unparent tool works.
# We'll prompt the user to select the new parent in the viewer.
viewer = toolutils.sceneViewer()
node_to_reparent = viewer.selectObjects(quick_select=True)[-1]
new_parent = viewer.selectObjects(use_existing_selection=False,
quick_select=True,
prompt="Select new parent node")[-1]
parentAndKeepPos(node_to_reparent, new_parent)

See also ● hou.ObjNode.worldTransform

● hou.ObjNode.setWorldTransform

● hou.Node.setFirstInput

● hou.SceneViewer.selectObjects

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/object_xform/ (4 of 4) [12/7/2009 4:28:13 PM]


Feed Example: Combining Python’s Powerful Module Library with Houdini - Houdini online help

Houdini Houdini Object HOM Feed Example: Combining Python’s Powerful Module
10 Model Cookbook Library with Houdini

Search

HOM Feed Example: Combining


Python’s Powerful Module Library with
Houdini

Overview

This example loads in information from an RSS news feed, creating geometry objects

containing the feed title text. When you click on the titles in the viewport, Houdini

runs a Python script that starts up the help browser with the URL for the feed.

This example shows how you can easily access Python’s extensive library of

supporting modules from within Houdini. It uses the feedparser module from

feedparser.org to load and parse an RSS news feed. This module internally uses a

number of Python modules to retrieve data from a web site and parse XML.

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/

feed, also found in the cookbook/feed directory of cookbook_files.tar.gz.

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/feed/ (1 of 3) [12/7/2009 4:28:18 PM]


Feed Example: Combining Python’s Powerful Module Library with Houdini - Houdini online help

Running the Example

1. Change to the cookbook/feed/part3 directory before launching Houdini so that

Houdini can import the Python modules in that directory.

2. Launch part3/feed.hip.

3. Start a Python shell and type hou.session.createObjects().

4. Enter the selection tool in the viewer, and click on the text to launch the browser

with the corresponding article.

Exploring the Implementation

This example is split into three parts. In Part 1, you’ll build a shelf tool that reads a

news feed and creates different objects displaying the text of the titles of the news

items. Part 2 saves the news feed information into a Python global variable, and

provides an example of connecting nodes together. Part 3 attaches pick scripts to the

objects and opens a URL in the help browser when you click on the text.

Subtopics

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/feed/ (2 of 3) [12/7/2009 4:28:18 PM]


Feed Example: Combining Python’s Powerful Module Library with Houdini - Houdini online help

Text Clear

Feed Example: Part 1 Implementation

Feed Example: Part 2 Implementation

Feed Example: Part 3 Implementation

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/feed/ (3 of 3) [12/7/2009 4:28:18 PM]


Print Hip Stats Example: Load a .hip File and Inspect it - Houdini online help

Houdini Houdini Object HOM Print Hip Stats Example: Load a .hip File and Inspect
10 Model Cookbook it

Search

HOM Print Hip Stats Example: Load a .hip File


and Inspect it

Overview

This example shows how to load a hip file from a standard Python shell and inspect its contents. This

particular example loops through all the object in /obj and prints out the positions of each of the points in

the object.

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/print_hip_stats,

also found in the cookbook/print_hip_stats directory of cookbook_files.tar.gz.

Running the Example

Run python2.5 print_stats.py to print out the contents of file_to_load.hip.

#!/usr/bin/python2.5
import sys, os

# Adjust sys.path so it contains $HFS/houdini/scripts/python. Then we can


# safely import the hou module. Importing this module will bring a Houdini
# session into the Python interpreter.
sys.path.append(os.environ['HFS']+"/houdini/scripts/python")
import hou

hou.hipFile.load("file_to_load.hip")

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/print_hip_stats/ (1 of 2) [12/7/2009 4:28:23 PM]


Print Hip Stats Example: Load a .hip File and Inspect it - Houdini online help

for object in hou.node("/obj").children():


print "Points in", object.path()
for point in object.displayNode().geometry().points():
print point.position()
print

# Release the Houdini Batch license. If we wanted to, this script could
# continue running, but it would no longer consume a license. When this
# script accesses the hou module again it will reacquire the license
# automatically. (Note that only later versions of Houdini implement
# hou.releaseLicense()).
if hasattr(hou, "releaseLicense"):
hou.releaseLicense()

See also ● hou.hipFile.load

● hou.node

● hou.Node.children

● hou.ObjNode.displayNode

● hou.SopNode.geometry

● hou.Geometry.points

● hou.Point.position

● hou.releaseLicense

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/print_hip_stats/ (2 of 2) [12/7/2009 4:28:23 PM]


Particle Cache Example: Writing Particle Data to a Custom Format - Houdini online help

Houdini Houdini Object HOM Particle Cache Example: Writing Particle Data to a Custom
10 Model Cookbook Format

Search

HOM Particle Cache Example: Writing


Particle Data to a Custom Format

Overview

This example illustrates how to write out a particle simulation output to a custom file format.

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/particle_cache, also

found in the cookbook/particle_cache directory of cookbook_files.tar.gz.

Getting Started

Load particle_cache.hip, start up a Python shell, and run hou.session.writeFireworks() to save the particles in a

POP network to a file named fireworks.txt.

particle_cache’s hou.session module contains the following code:

def writeParticlesAsGeo(popnet, file_name):


popnet.geometry().saveToFile(file_name)

def writeParticlesInCustomFormat(popnet, file_name):


"""Write the particle data in the geometry geometry to a custom file
format."""
geo = popnet.geometry()
f = file(file_name, "w")

# Write out the number of particle attributes, followed by the particle


# attribute information.

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/particle_cache/ (1 of 3) [12/7/2009 4:28:28 PM]


Particle Cache Example: Writing Particle Data to a Custom Format - Houdini online help

f.write("%d attributes:\n" % len(geo.pointAttribs()))


for attrib in geo.pointAttribs():
f.write("%s %s %d\n" %
(attrib.name(), attrib.dataType(), attrib.size()))
f.write("\n")

# Write the number of particles, followed by the particle attribute values.


f.write("%d points:\n" % len(geo.points()))
for point in geo.points():
for attrib in geo.pointAttribs():
f.write("%s = %s\n" % (attrib.name(), point.attribValue(attrib)))
f.write("\n")

f.close()

def writeFireworks():
writeParticlesInCustomFormat(
hou.node("/obj/particle_object1/popnet1"), "fireworks.txt")

Sample output:

8
P attribData.Float 4
v attribData.Float 3
accel attribData.Float 3
life attribData.Float 2
pstate attribData.Int 1
id attribData.Int 1
parent attribData.Int 1
Cd attribData.Float 3
2
Float 3

2 points:
P = (0.0, 0.0, 0.0, 1.0)
v = (0.44430351257324219, 1.0430929660797119, 0.008625030517578125)
accel = (0.0, -0.36000001430511475, 0.0)
life = (0.0, 3.3668022155761719)
pstate = 0
id = 1
parent = 0
Cd = (1.0, 1.0, 1.0)

P = (0.0, 0.0, 0.0, 1.0)


v = (0.018614673987030983, 0.05000000074505806, -0.12590165436267853)
accel = (-0.026060543954372406, -0.43000000715255737, 0.17626231908798218)
life = (0.0, 1.3654334545135498)
pstate = 0
id = 2
parent = 1
Cd = (1.0, 0.90333300828933716, 0.0)

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/particle_cache/ (2 of 3) [12/7/2009 4:28:28 PM]


Particle Cache Example: Writing Particle Data to a Custom Format - Houdini online help

See also ● hou.SopNode.geometry

● hou.Geometry

● hou.Geometry.pointAttribs

● hou.Attrib

● hou.Attrib.name

● hou.Attrib.dataType

● hou.Attrib.size

● hou.Geometry.points

● hou.Point.attribValue

● hou.node

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/particle_cache/ (3 of 3) [12/7/2009 4:28:28 PM]


Compositing Example: Building a Composite Network from a Compositing Expression - Houdini online help

Houdini Houdini Object HOM Compositing Example: Building a Composite Network from a Compositing
10 Model Cookbook Expression

Search

HOM Compositing Example: Building


a Composite Network from a
Compositing Expression

Overview

This module lets you create and evaluate a compositing network simply by writing an expression describing the

compositing operations to perform. As the expressions evaluate, they create COP nodes, set parameters on

them, and wire those nodes together. With some simple extensions to this example, you can create a Pythonic

equivalent of Houdini’s icomposite program.

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/composite, also found in the

cookbook/composite directory of cookbook_files.tar.gz.

Sample Usage

You can build very short Python scripts that import the comp module and evalute compositing expressions.

To interactively explore the output, you can run the following from hython or Houdini’s Python shell. Start hython/

Houdini in the directory containing the comp.py script so Houdini can import the comp module.

>>> import comp

# Load in $HFS/houdini/pic/default.pic and convert it to a jpeg, writing the


# output to the current directory.

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/composite/ (1 of 5) [12/7/2009 4:28:34 PM]


Compositing Example: Building a Composite Network from a Compositing Expression - Houdini online help

>>> comp.readFile("default.pic").writeFile("default.jpg")

# Load in a sequence of images (from $HFS/houdini/pic), brighten them,


# and convert them to jpegs.
>>> comp.readFile("butterfly$F.pic").bright(1.8).writeFile("butterfly$F.jpg")

# Load in default.pic, brighten it, composite it over a gray background,


# and write it to out.pic.
>>> comp.readFile("default.pic").bright(1.2).over(
... comp.constant(0.3, 0.3, 0.3)).writeFile("out.pic")
...

Module Implementation

import hou

"""
This module lets you create and evaluate a compositing network simply
by writing an expression describing the compositing operations to perform.
With some simple extensions to this example, you can create a Pythonic
equivalent of Houdini's icomposite program.

For example, you can write:

import comp
comp.readFile("default.pic").bright(1.2).over(comp.constant(0.3, 0.3, 0.3)
).writeFile("out.pic")

and Houdini will build a composite network that loads the default.pic image,
brightens it, composites it over a constant, and writes out the result to
out.pic.

Note that this module supports compositing over a sequence of images: simply
use a time-dependent expression (like $F) in the input and output image names.

If you use this module from a graphical Houdini session, you can inspect
the compositing networks it creates.
"""

def test():
"""This function creates a simple test case that evaluates the following:
comp.readFile("default.pic").bright(1.2).over(
comp.constant(0.3, 0.3, 0.3)).writeFile("out.pic")
"""
readFile("default.pic").bright(1.2).over(constant(0.3, 0.3, 0.3)
).writeFile("out.pic")

class _Image:

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/composite/ (2 of 5) [12/7/2009 4:28:34 PM]


Compositing Example: Building a Composite Network from a Compositing Expression - Houdini online help

"""This image class wraps a COP node and exposes image operations via
methods that simply create COP nodes and return a new image wrapping
that node.
"""
def __init__(self, node):
# The node parameter is a COP node. The user of this module will
# create images with the readFile and constant methods, and construct
# _Image objects directly.
self.node = node

def __createNode(self, type):


# Create and return a COP node of the specified type in the current
# network.
return self.node.parent().createNode(type)

def bright(self, amount):


"""Brighten the image, returning a new image."""
n = self.__createNode("bright")
n.setFirstInput(self.node)
n.parm("bright").set(amount)
return _Image(n)

def over(self, image):


"""Composite this image over the specified one, returning a new
image."""
n = self.__createNode("over")
n.setFirstInput(self.node)
n.setInput(1, image.node)
return _Image(n)

def writeFile(self, file_name):


"""Write this image to a file or file sequence."""
n = self.__createNode("rop_comp")
n.setFirstInput(self.node)
n.parm("copoutput").set(file_name)
self.node.parent().layoutChildren()

# If we're called from a standard Python shell or hython, actually


# write out the file.
if hou.applicationName() == 'hbatch':
n.render()

def __network():
# This internal function just returns the COP network. For this example,
# it simply hard-codes a particular network.
return hou.node("/img/comp1") or hou.node("/img").createNode("img", "comp1")

def __nodeResolution(node):
"""Use the hscript res() expression to return the a composite node's
image resolution."""
return (hou.hscriptExpression('res("%s", D_XRES)' % node.path()),
hou.hscriptExpression('res("%s", D_YRES)' % node.path()))

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/composite/ (3 of 5) [12/7/2009 4:28:34 PM]


Compositing Example: Building a Composite Network from a Compositing Expression - Houdini online help

_lastResolution = None

def readFile(file_name):
"""Return an image object corresponding to a file or file sequence."""
n = __network().createNode("file")
n.parm("filename1").set(file_name)

# Remember the image resolution. If we later create a constant color,


# we'll use this resolution.
global _lastResolution
_lastResolution = __nodeResolution(n)

return _Image(n)

def constant(r, g, b, a=1.0):


"""Return an image that's a constant color. The size of the image will
be the same as the size of the last file read in."""
n = __network().createNode("color")
n.parmTuple("color").set((r, g, b, a))

if _lastResolution is not None:


n.parm("overridesize").set(True)
n.parmTuple("size").set(_lastResolution)
return _Image(n)

See also ● hou.node

● hou.CopNode

● hou.Node.createNode

● hou.Node.setFirstInput

● hou.Node.setInput

● hou.Node.parm

● hou.Parm.set

● hou.Node.parmTuple

● hou.ParmTuple.set

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/composite/ (4 of 5) [12/7/2009 4:28:34 PM]


Compositing Example: Building a Composite Network from a Compositing Expression - Houdini online help

● hou.applicationName

● hou.RopNode.render

● hou.hscriptExpression

● res

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/composite/ (5 of 5) [12/7/2009 4:28:34 PM]


Python Object Example: Transforms from Disk - Houdini online help

Houdini Houdini Object HOM Python Object Example: Transforms from


10 Model Cookbook Disk

Search

HOM Python Object Example: Transforms from


Disk

Overview

This example contains an object written in Python that gets its transformation information from a file on disk.

First, it loads in a list of transformation matrices. When it cooks, it looks up the transformation matrix

corresponding to the current time, and sets its transform to that matrix.

This example illustrates how you can get raw transformation information, such as that generated from another

software package or from a hardware device, into Houdini using Python.

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/xforms_from_disk, also

found in the cookbook/xforms_from_disk directory of cookbook_files.tar.gz.

Viewing the Object’s Output

● Load xforms_from_disk.hip and press play. The xforms_from_disk1 object is a Python object that loads its

contents from the motion.dat file.

● The reference object is animated and was used to generate motion.dat.

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/xforms_from_disk/ (1 of 4) [12/7/2009 4:28:40 PM]


Python Object Example: Transforms from Disk - Houdini online help

Exploring the Object’s Implementation

Right-click on /obj/xforms_from_disk1 and bring up it’s type properties. You’ll see that it contains two visible

parameters: the file containing the transformation data, and a reload button to reload that file’s contents.

If you click on the code tab, you’ll see the Python code Houdini runs when the object needs to compute its

transformation. The code determines which sequence of 16 float transformation values to use, builds a hou.

Matrix4 object from them, and calls hou.ObjNode.setCookTransform.

Code for Python Object:

# This code is called when instances of this object cook.

obj_node = hou.pwd()

# Load in the transformation matrices from the file, with 1 per frame.
# Multiple calls won't read the file each time, but will instead read from
# cache.
transforms = obj_node.hdaModule().loadTransformsFromFile(obj_node)

# If there are no transformations in the file, make sure we have at least one.
if len(transforms) == 0:
transforms = [hou.hmath.identityTransform()]

# Determine the index into the sequence based on the current frame.
transform_index = max(int(round(hou.frame())), 1) - 1

# If the current frame is after the frames in the file, hold the last frame.
if transform_index >= len(transforms):
transform_index = len(transforms) - 1

# Construct a matrix out of the sequence of 16 floats, and set this node's
# transform to that matrix.
obj_node.setCookTransform(hou.Matrix4(transforms[transform_index]))

The cook tab code also calls a function in the PythonModule section, where the cached transformation data is

stored. If you look at the sample motion.dat file, you’ll see it just contains a Python expression that builds a

list of tuples of 16 float values. The loadTransformsFromFile function evalutes that Python expression

with Python’s built-in eval function.

Also note that the PythonModule section contains a function to generate files like motion.dat from an existing

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/xforms_from_disk/ (2 of 4) [12/7/2009 4:28:40 PM]


Python Object Example: Transforms from Disk - Houdini online help

object’s transformations.

PythonModule section:

# We cache the transform files we've read in. The cache is a Python dict,
# mapping from file names to sequences of sequences of 16 floats.
__cache = {}

def loadTransformsFromFile(obj_node):
"""Load the transformations from the node's data file and return them."""
file_name = obj_node.evalParm("file")

# See if the file is in the cache.


if file_name in __cache:
return __cache[file_name]

# Use the Python eval() function to get the sequence of transformations


# from a string containing the corresponding Python code.
f = file(file_name, "r")
transforms = eval(f.read())
f.close()

# Add the file contents to the cache and return them.


__cache[file_name] = transforms
return transforms

def reloadFile(obj_node):
"""Clear the cache contents for the currently loaded file. The file
will be reread from disk when the node cooks. This function is called
from the reload button."""
file_name = obj_node.evalParm("file")
if file_name in __cache:
del __cache[file_name]

def saveTransformsForNode(obj_node, file_name, frame_range=(1, 240)):


"""Save the transformations on a node into a data file. This function
can be used to quickly generate data files for testing."""
# Remember the current frame.
orig_frame = hou.frame()

# Evaluate the object's world transformation for the different frames.


result = []
for frame in range(frame_range[0], frame_range[1]):
hou.setFrame(frame)
result.append(obj_node.worldTransform().asTuple())

# Restore the frame.


hou.setFrame(orig_frame)

# Write the transformation matrix values into the file.


f = file(file_name, "w")

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/xforms_from_disk/ (3 of 4) [12/7/2009 4:28:40 PM]


Python Object Example: Transforms from Disk - Houdini online help

f.write(repr(result))
f.close()

Finally, the reload button callback contains the following Python code:

Reload button callback:

hou.pwd().hdaModule().reloadFile(hou.pwd())

Creating a new Python Object

Note that if you want to create your own Python Object, you can do so by selecting File → New Operator Type

and picking “Python Type” as the operator style and “Object Operator” as the network type.

See also ● hou.pwd

● hou.Node.evalParm

● hou.Node.hdaModule

● hou.hmath.identityTransform

● hou.frame

● hou.setFrame

● hou.Matrix4

● hou.ObjNode.worldTransform

● hou.ObjNode.setCookTransform

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/xforms_from_disk/ (4 of 4) [12/7/2009 4:28:40 PM]


Python SOP Example: Color Falloff - Houdini online help

Houdini Houdini Object HOM Python SOP Example: Color


10 Model Cookbook Falloff

Search

HOM Python SOP Example: Color Falloff

Overview

This example defines a Python SOP that copies its input, creates a Cd (diffuse color) point attribute, and assigns

each point a color based on the distance to a position.

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/color_falloff, also found

in the cookbook/color_falloff directory of cookbook_files.tar.gz.

Viewing the SOPs Output

● Load color_falloff.hip.

● Press enter in the viewer to enter the handle tool, enabling the SOP’s translate handle.

● Move the handle around to change the position parameter and change the falloff parameter, and how it

affects the SOP’s output.

Exploring the SOPs Implementation

● The color falloff Python SOP is stored in . Right-click on the color_falloff1 SOP and bring up the Type

Properties dialog.

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/color_falloff/ (1 of 3) [12/7/2009 4:28:46 PM]


Python SOP Example: Color Falloff - Houdini online help

● Click on the Parameters tab to see the pos and falloff parameters. These parameters were created

exactly the same way you would for a normal digital asset.

● Click on the Handles tab and you’ll see that a translate handle is bound to the posx, posy, and posz

parameters.

● Click on the Code tab to see the Python code that Houdini runs when the SOP cooks.

# When an instance of this Python SOP cooks, Houdini will have set hou.pwd()
# to the Python SOP instance. Access the hou.Geometry object for this SOP.
# Since we're calling from hou.SopNode.geometry from a Python SOP
# implementation, we'll have write access to the geometry.
geo = hou.pwd().geometry()

# Create the "Cd" point attribute value, giving it a default value of white
# (1, 1, 1), and store the returned hou.Attrib object.
cd = geo.addAttrib(hou.attribType.Point, "Cd", (1.0, 1.0, 1.0))

# Evaluate the pos parm tuple, and create a hou.Vector3 out of it so we can
# later do vector subtraction. Also evaluate the falloff value.
pos = hou.Vector3(hou.parmTuple("pos").eval())
falloff = max(hou.ch("falloff"), 0.0001)

for point in geo.points():


# Compute the distance from this point to the position parameter, divide
# the distance by the falloff value, and clamp it to be between 0 and 1.
distance = (point.position() - pos).length()
value = min(distance / falloff, 1.0)

# Create a color object, and set the hue and value of the color based on
# the normalized distance.
color = hou.Color()
color.setHSV((value * 256, 1.0, value))

# Extract the RGB values from the color object and store them in this
# point's Cd attribute value.
point.setAttribValue(cd, color.rgb())

Creating a new Python SOP

Note that if you want to create your own Python SOP, you can do so by selecting File → New Operator Type

and picking “Python Type” as the operator style and “Geometry Operator” as the network type.

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/color_falloff/ (2 of 3) [12/7/2009 4:28:46 PM]


Python SOP Example: Color Falloff - Houdini online help

See also ● hou.pwd

● hou.SopNode.geometry

● hou.Geometry.addAttrib

● hou.attribType

● hou.parmTuple

● hou.ParmTuple.eval

● hou.Vector3

● hou.Geometry.points

● hou.Point.position

● hou.Vector3.__sub__

● hou.Vector3.length

● hou.Color

● hou.Color.setHSV

● hou.Color.rgb

● hou.Point.setAttribValue

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/color_falloff/ (3 of 3) [12/7/2009 4:28:46 PM]


Python SOP Example: Surface Wires - Houdini online help

Houdini Houdini Object HOM Python SOP Example: Surface


10 Model Cookbook Wires

Search

HOM Python SOP Example: Surface Wires

Overview

This example defines a Python SOP that copies its input, assigns a rainbow of colors to the input surface, and

creates wires coming out of the surface that are uniformly distributed along it.

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/surface_wires, also found

in the cookbook/surface_wires directory of cookbook_files.tar.gz.

Viewing the SOPs Output

● Load surface_wires.hip.

● Select the /obj/grid_object1/surface_wires1 node.

● Play with the U and V divisions and wire length parameters.

Exploring the SOPs Implementation

● The Surface Wires Python SOP is stored in . Right-click on the surface_wires1 SOP and bring up the

Type Properties dialog.

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/surface_wires/ (1 of 4) [12/7/2009 4:28:52 PM]


Python SOP Example: Surface Wires - Houdini online help

● Click on the Parameters tab to see the u_divisions, v_divisions, and wire_length parameters.

These parameters were created exactly the same way you would for a normal digital asset.

● Click on the Code tab to see the Python code that Houdini runs when the SOP cooks.

# When an instance of this Python SOP cooks, Houdini will have set hou.pwd()
# to the Python SOP instance. Access the hou.Geometry object for this SOP.
# Since we're calling from hou.SopNode.geometry from a Python SOP
# implementation, we'll have write access to the geometry.
geo = hou.pwd().geometry()

# Create a Cd (color) point attribute.


color_attrib = geo.addAttrib(hou.attribType.Point, "Cd", (1.0, 1.0, 1.0))

# Assign each point a unique hue value, with constant saturation and value.
num_points = len(geo.iterPoints())
color = hou.Color()
for point in geo.points():
fraction = float(point.number()) / num_points
color.setHSV(((fraction * 255), 1, 1))
# The attribute stores RGB values, so ask for the color in RGB format.
point.setAttribValue(color_attrib, color.rgb())

# This sop requires that the first primitive is a surface.


surf = None
if len(geo.iterPrims()) != 0:
surf = geo.iterPrims()[0]
if not isinstance(surf, hou.Surface):
raise hou.Error("The first primitive must be a surface")

# Evaluate the surface at uniformly distributed positions. For each


# point we evaluate, create a line facing outwards from the surface,
# and give it the color at the surface.
u_divisions = hou.evalParm("u_divisions")
v_divisions = hou.evalParm("v_divisions")
wire_length = hou.evalParm("wire_length")
for u_index in range(u_divisions + 1):
u = float(u_index) / u_divisions
for v_index in range(v_divisions + 1):
v = float(v_index) / v_divisions

# Compute the position of the surface, and add the normal


# vector (scaled by 2) to define the two points of the line.
pos0 = hou.Vector3(surf.positionAt(u, v))
pos1 = pos0 + surf.normalAt(u, v) * wire_length

# Compute the color of the polygon and create it. It will


# be open, since it's a line.
color = surf.attribValueAt(color_attrib, u, v)
poly = geo.createPolygon()
poly.setIsClosed(False)

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/surface_wires/ (2 of 4) [12/7/2009 4:28:52 PM]


Python SOP Example: Surface Wires - Houdini online help

# Create the points, set their position and color, and


# add them to the polygon.
for pos in pos0, pos1:
point = geo.createPoint()
point.setPosition(pos)
point.setAttribValue(color_attrib, color)
poly.addVertex(point)

Creating a new Python SOP

Note that if you want to create your own Python SOP, you can do so by selecting File → New Operator Type

and picking “Python Type” as the operator style.

See also ● hou.pwd

● hou.SopNode.geometry

● hou.Geometry.addAttrib

● hou.Geometry.points

● hou.Geometry.iterPoints

● hou.Color

● hou.Geometry.prims

● hou.Geometry.iterPrims

● hou.evalParm

● hou.Surface.positionAt

● hou.Vector3

● hou.Surface.normalAt

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/surface_wires/ (3 of 4) [12/7/2009 4:28:52 PM]


Python SOP Example: Surface Wires - Houdini online help

● hou.Surface.attribValueAt

● hou.Geometry.createPoint

● hou.Point.setPosition

● hou.Point.setAttributeValue

● hou.Geometry.createPolygon

● hou.Geometry.addVertex

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/surface_wires/ (4 of 4) [12/7/2009 4:28:52 PM]


Bundles Example: Extending the hou Module by Wrapping Hscript - Houdini online help

Houdini Houdini Object HOM Bundles Example: Extending the hou Module by Wrapping
10 Model Cookbook Hscript

Search

HOM Bundles Example: Extending the


hou Module by Wrapping Hscript

Overview

This example illustrates how to extend the hou module, using Python, by calling hscript commands and

functions. This particular example shows how to add node bundle support to the hou module. It

also monkeypatches the hou module, adding 3 new functions to the module.

Note

Node bundles are already implemented in the hou module. See hou.NodeBundle for more information.

The example is split into two parts. Part 1 contains a simpler, minimalistic implementation that is easier to read

but doesn’t contain all the functionality or handle all the error cases. Part 2 contains a full implementation.

To use this example, start up Houdini from the cookbook/bundles/part2 directory. Then, from the Python shell,

run “import hou_bundles” to install the extensions to the hou module. Then you can use the

hou.myAddNodeBundle, hou.myNodeBundles, and hou.myNodeBundle functions. For example:

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/bundles, also found in

the cookbook/bundles directory of cookbook_files.tar.gz.

Sample Usage

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/bundles/ (1 of 3) [12/7/2009 4:28:57 PM]


Bundles Example: Extending the hou Module by Wrapping Hscript - Houdini online help

Create a sphere and torus from the shelf. Houdini will create /obj/sphere_object1 and /obj/torus_object1

nodes. Now open a Python shell and run the following:

# Importing hou_bundles will add bundle-related functionality to the hou


# module.
>>> import hou_bundles

# Create a new bundle and display information about it.


>>> b = hou.addNodeBundle("mybundle")
>>> b
<hou.NodeBundle mybundle>
>>> b.name()
'mybundle'
>>> b.nodes()
()

# Add the sphere object and sphere sop to the bundle.


>>> sphere_obj = hou.node("/obj/sphere_object1")
>>> b.addNode(sphere_obj)
>>> b.addNode(sphere_obj.node("sphere1"))
>>> b.nodes()
(<hou.ObjNode of type geo at /obj/sphere_object1>, <hou.SopNode of type sphere
at /obj/sphere_object1/sphere1>)

# Ask if particular nodes are in the bundle.


>>> b.containsNode(sphere_obj)
True
>>> b.containsNode(hou.node("/obj/torus_object1"))
False

# Change the name of the bundle.


>>> b.setName("mybundle2")
>>> b.name()
'mybundle2'

# Change the filter on the bundle.


>>> b.filter()
hou.nodeTypeFilter.NoFilter
>>> b.setFilter(hou.nodeTypeFilter.Object)
>>> b.filter()
hou.nodeTypeFilter.Object
>>> b.nodes()
(<hou.ObjNode of type geo at /obj/sphere_object1>)

Module Implementation

This example is split into two parts. Part 1 provides a simpler, easier to understand, but less

complete implementation. Part 2 provides a full implementation, with support for filtering and error handling.

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/bundles/ (2 of 3) [12/7/2009 4:28:57 PM]


Bundles Example: Extending the hou Module by Wrapping Hscript - Houdini online help

Subtopics

Text Clear

Bundles Example: Part 1 Implementation

Bundles Example: Part 2 Implementation

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/bundles/ (3 of 3) [12/7/2009 4:28:57 PM]


Paths Example: Dynamically Creating Object Nodes - Houdini online help

Houdini Houdini Object HOM Paths Example: Dynamically Creating Object


10 Model Cookbook Nodes

Search

HOM Paths Example: Dynamically Creating


Object Nodes

Overview

This example takes an arbitrary piece of text and builds a set of letters that get moved from random starting

positions to target end positions. The starting positions are randomly chosen from points on an object (/obj/

start_locations) and the end positions are distributed along a curve (/obj/target_path). The example creates

a path between the start and end locations, creates one object per letter, and makes the letter objects follow

the path at offset time interfaces. Finally, another object (/obj/shuttle) follows the whole path, giving the

appearance of shuttling the letters to their destinations.

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/paths, also found in the

cookbook/paths directory of cookbook_files.tar.gz.

Running the Example

Load paths.hip and hit play. Examine the nodes inside /obj/net. Then, run hou.session.build

("PythonRocks") in a Python shell, hit play again, and look at the new contents of /obj/net.

Exploring the Code

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/paths/ (1 of 4) [12/7/2009 4:29:03 PM]


Paths Example: Dynamically Creating Object Nodes - Houdini online help

hou.session contents:

import random

def randomStartLocation():
"""Return a random start location for a letter. Note that, because a
random seed isn't specified, this function will return a different
value each time it runs."""
geo = hou.node("/obj/start_locations").displayNode().geometry()
point_num = random.randint(0, len(geo.iterPoints())-1)
return geo.iterPoints()[point_num].position()

def targetPathLocation(u):
"""Given a normalized parametric value, return the corresponding position
along the target path.
"""
target_path = hou.node("/obj/target_path").displayNode()
return hou.Vector3(
[hou.hscriptExpression('primuv("%s", 0, "P", %d, %f, 0)' %
(target_path.path(), i, u))
for i in range(3)])

def addPositionToCurve(curve, position):


"""Given a curve sop and a position, add the position to the sop's list
of points.
"""
position_str = ",".join(str(x) for x in position)
coords = curve.parm("coords")
coords.set(coords.eval() + " " + position_str)

def build(text):
"""Build the path for some arbitrary text."""
# If /obj/net already exists, destroy it and recreate a new subnet.
net = hou.node("/obj/net")
if net is not None:
net.destroy()
net = hou.node("/obj").createNode("subnet", "net")
net.moveToGoodPosition()

# Create an object for the path, and put a curve SOP inside it.
curve_geo = net.createNode("geo", "path_curve")
curve_geo.setDisplayFlag(False)
curve = curve_geo.createNode("curve")
curve.setDisplayFlag(True)

# Create objects for each letter in the text.


for index in range(len(text)):
# Compute the parametric positions along the curve where the letters
# will start and stop moving.
u_start = float(index) / len(text)

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/paths/ (2 of 4) [12/7/2009 4:29:03 PM]


Paths Example: Dynamically Creating Object Nodes - Houdini online help

u_end = (index + 0.5) / len(text)

# Find the start and end positions of this letter, and add those
# positions to the path.
start_pos = randomStartLocation()
end_pos = targetPathLocation(float(index) / (len(text)-1))
addPositionToCurve(curve, start_pos)
addPositionToCurve(curve, end_pos)

# Create a geometry object for the letter, and put a font SOP inside
# it. Append a transform axis sop to rotate the letter.
letter = net.createNode("geo")
font = letter.createNode("font")
font.parm("text").set(text[index])
font.parm("fontsize").set(3)
xform_axis = letter.createNode("xformaxis")
xform_axis.parm("rot").set(90)
xform_axis.setFirstInput(font)
xform_axis.setDisplayFlag(True)
letter.layoutChildren()

# Set the letter object to follow the path at the right times.
letter.parm("pathobjpath").set(curve_geo.path())
letter.parm("pos").setExpression(
"clamp($F/500, %f, %f)" % (u_start, u_end))
letter.parm("pathorient").set(0)

# Add a final location for the shuttle to go to.


addPositionToCurve(curve, randomStartLocation())

net.layoutChildren()

See also ● hou.node

● hou.ObjNode.displayNode

● hou.SopNode.geometry

● hou.Geometry.iterPoints

● hou.Point.position

● hou.Vector3

● hou.hscriptExpression

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/paths/ (3 of 4) [12/7/2009 4:29:03 PM]


Paths Example: Dynamically Creating Object Nodes - Houdini online help

● primuv

● hou.Node.parm

● hou.Parm.eval

● hou.Node.createNode

● hou.Node.moveToGoodPosition

● hou.SopNode.setDisplayFlag

● hou.Node.setFirstInput

● hou.Node.layoutChildren

● hou.Parm.setExpression

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/paths/ (4 of 4) [12/7/2009 4:29:03 PM]


PyQt Example: Writing Custom GUIs inside Houdini - Houdini online help

Houdini Houdini Object HOM PyQt Example: Writing Custom GUIs inside
10 Model Cookbook Houdini

Search

HOM PyQt Example: Writing Custom


GUIs inside Houdini

Overview

This example illustrates how to use the PyQt user interface widget toolkit to create a

custom user interface window inside Houdini. Houdini does not distribute PyQt4, so if

it is not installed you need to install it to your Python distribution. On Windows, install

to $HFS/python.

Note that if you use PyQt for commercial purposes, you must buy a commercial

license. See http://www.riverbankcomputing.co.uk/software/pyqt/license for more

information.

This example is split into two parts. Part 1 illustrates how to integrate PyQt into

Houdini’s event loop, and shows the recommended approach for how to use PyQt.

Part 2 shows how you can run PyQt in its own dedicated thread. The apprach in Part

1 is recommended over that in Part 2 because of additional complexity, and Part 2 is

provided for reference purposes.

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/pyqt/ (1 of 2) [12/7/2009 4:29:08 PM]


PyQt Example: Writing Custom GUIs inside Houdini - Houdini online help

● Part 1: Running PyQt inside Houdini’s event loop (recommended)

● Part 2: Running PyQt inside a separate thread (provided for reference purposes)

Subtopics

Text Clear

PyQt Example: Writing Custom GUIs inside Houdini

PyQt Example: Writing Custom GUIs inside Houdini

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/pyqt/ (2 of 2) [12/7/2009 4:29:08 PM]


wxPython Example: Writing Custom GUIs inside Houdini - Houdini online help

Houdini Houdini Object HOM wxPython Example: Writing Custom GUIs inside
10 Model Cookbook Houdini

Search

HOM wxPython Example: Writing Custom


GUIs inside Houdini

Overview

This example illustrates how to use the wxPython user interface widget toolkit to create a custom user interface

inside Houdini by invoking wxPython’s event loop from Houdini’s event loop. Houdini does not distribute

wxPython, so if it is not installed you need to install it to your Python distribution. On Windows, install to $HFS/

python.

Location

Supporting files for this example are in $HFS/houdini/help/hom/cookbook/wxPython, also found in the

cookbook/wxPython directory of cookbook_files.tar.gz.

Running the Example

Create a shelf tool containing the following and launch it. It will pop up a window with a button and some text.

Clicking on the button will display a font chooser dialog that controls the font for the text.

wx_path = "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode"
import sys
if wx_path not in sys.path:
sys.path.append(wx_path)

import wx

class MainWindow(wx.Frame):

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/wxPython/ (1 of 3) [12/7/2009 4:29:14 PM]


wxPython Example: Writing Custom GUIs inside Houdini - Houdini online help

def __init__(self, parent, title):


wx.Frame.__init__(self, parent, wx.ID_ANY, title, size=(400, 100))

# Add a panel to the window.


main_panel = wx.Panel(self, wx.NewId())
main_panel.SetSizer(wx.BoxSizer(wx.VERTICAL))

# Add a subsizer to lay out controls from left-to-right. Set


# proportion to 1 so that the subsizer stretches out vertically and set
# flag to wx.ALIGN_CENTER so that all the controls added to the
# subsizer are centered horizontally.
horiz_sizer = wx.BoxSizer(wx.HORIZONTAL)
main_panel.GetSizer().AddSizer(
horiz_sizer, proportion=1, flag=wx.ALIGN_CENTER)

# Add a button to the panel. When clicked, it will open wxPython's


# default font chooser dialog.
font_button = wx.Button(main_panel, wx.NewId(), "Change Font...")
horiz_sizer.Add(font_button, flag=wx.ALIGN_CENTER_VERTICAL)

# Add some horizontal spacing between the controls.


horiz_sizer.AddSpacer((10, 1))

# Add a label to the panel.


self.myLabel = wx.StaticText(
main_panel, wx.NewId(), "This is some Sample Text.")
horiz_sizer.Add(self.myLabel, flag=wx.ALIGN_CENTER_VERTICAL)

# Create a font chooser dialog that's hidden by default but will open
# when the user clicks "Change Font...".
self.fontChooserDialog = wx.FontDialog(self, wx.FontData())

# Register the button-click event handler and open this window.


wx.EVT_BUTTON(self, font_button.GetId(), self.onButtonClicked)
self.Show(True)

def onButtonClicked(self, event):


result = self.fontChooserDialog.ShowModal()

# If the user clicked on the "OK" button then change the label's font
# to the one selected in the dialog.
if result == wx.ID_OK:
font_data = self.fontChooserDialog.GetFontData()
font = font_data.GetChosenFont()
self.myLabel.SetFont(font)

def runWxApp(app, window):


"""Call this function with the application and the toplevel window instead
of calling app.MainLoop. Note that this function returns right away.
Also note that this function is independent of this example, and you
could factor it out into its own module."""
def processWxEvents():
"""Houdini runs this callback to from its event loop to process wx

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/wxPython/ (2 of 3) [12/7/2009 4:29:14 PM]


wxPython Example: Writing Custom GUIs inside Houdini - Houdini online help

events."""
while event_loop.Pending():
event_loop.Dispatch()
app.ProcessPendingEvents()

def onClose(event):
"""We bind this callback to the window's close event to destroy the
window and stop the wx event loop."""
window.Show(False)
window.Destroy()
processWxEvents()
hou.ui.removeEventLoopCallback(processWxEvents)
window.Bind(wx.EVT_CLOSE, onClose)

event_loop = wx.EventLoop()
wx.EventLoop.SetActive(event_loop)
hou.ui.addEventLoopCallback(processWxEvents)

app = wx.PySimpleApp()
frame = MainWindow(None, "Font Dialog")
runWxApp(app, frame)

http://www.sidefx.com/docs/houdini10.0/hom/cookbook/wxPython/ (3 of 3) [12/7/2009 4:29:14 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

= hou.HDADefinition =
#type: homclass
#cppname: HOM_HDADefinition
#category: Assets

"""Represents the definition of a houdini digital asset (HDA)."""

A digital asset definition defines a node type and exists inside an otl file.
The node type is implemented in terms of other nodes wired together inside
a subnet. These nodes inside the subnet are called the definition's contents.

An otl file contains one or more digital asset definitions, and installing an
otl file installs all the definitions in the file. When a digital asset
definition is installed, the node type it defines is added to Houdini. Note
that you can access an HDADefinition without installing it.

A digital asset's algorithm is determined by the nodes inside it. To edit


those nodes you create an instance of the digital asset, unlock it, modify the
contents, and save the definition. New digital asset instances are normally
locked, meaning that they are read-only, and they automatically update when the
asset's definition changes. An unlocked instance is editable, does not update
when the definition changes, and you can save its contents to change the
definition.

To unlock a node, select __Allow Editing of Contents__ or call


[Hom:hou.Node#allowEditingOfContents]. To save the contents of an unlocked
node to the definition, select __Save Operator Type__ or call
[Hom:hou.HDADefinition#updateFromNode]. To revert an unlocked instance back to
the last saved definition and change it back into a locked instance, select
__Match Current Definition__ or call [Hom:hou.Node#matchCurrentDefinition].

See also [Hom:hou.hda] and [Hom:hou.HDAOptions].

@methods

::`nodeType(self)` -> [Hom:hou.NodeType]:


#cppname: HOM_HDADefinition::nodeType
#replaces: Cmd:otinuse
Return the node type defined by this digital asset. Raises
[Hom:hou.OperationFailed] if the digital asset is not installed.

::`nodeTypeCategory(self)` -> [Hom:hou.NodeTypeCategory]:

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (1 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

#cppname: HOM_HDADefinition::nodeTypeCategory
#replaces: Cmd:otls
Return the node type category (e.g. Objects, SOPs, DOPs, etc.) for the
node type defined by this digital asset. See [Hom:hou.NodeTypeCategory]
for more information.

It is safe to call this method if the digital asset is not installed. If


the digital asset is installed, this method is equivalent to
`self.nodeType().category()`.

::`nodeTypeName(self)` -> `str`:


#cppname: HOM_HDADefinition::nodeTypeName
#replaces: Cmd:otinuse, Cmd:otls
Return the name of the node type defined by this digital asset. Raises
[Hom:hou.OperationFailed] if the digital asset is not installed.

If the digital asset is installed, this method is a shortcut for


`self.nodeType().name()`.

::`libraryFilePath(self)` -> `str`:


#cppname: HOM_HDADefinition::libraryFilePath
#replaces: Cmd:dsoinfo, Cmd:otgetotl, Cmd:otls
Return the path to the otl file containing the digital asset's definition.

Note that it is possible to save an asset with a hip file, without storing
it in an otl file. In this case, this method returns `"Embedded"`.

::`isInstalled(self)` -> `bool`:


#cppname: HOM_HDADefinition::isInstalled
#replaces: Cmd:otinuse
Return whether this definition is installed in Houdini.

It is possible to access HDADefinition objects in otl files that are not


installed with [Hom:hou.hda#definitionsInFile].

See also [Hom:hou.hda#installFile].

::`updateFromNode(self, node)`:
#cppname: HOM_HDADefinition::updateFromNode
Update and save the definition to match the contents of a given unlocked
instance of the asset. Calling this method is the same as selecting
__Save Operator Type__ on the node's menu.

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (2 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

{{{
#!python
def saveUnlockedNodes():
'''Look through all the nodes in the file for unlocked digital asset
instances and save and lock them.'''
for node in hou.node("/").allSubChildren():
if node.type().definition() is None or node.isLocked():
continue

node.type().definition().updateFromNode(node)
node.matchCurrentDefinition()
}}}

::`save(self, file_name, template_node=None, options=None)`:


#cppname: HOM_HDADefinition::save
#replaces: Cmd:otwrite
Save the definition into an otl file.

file_name:
Where to save the definition. To save to the current otl file, use
the return value from [Hom:hou.HDADefinition#libraryFilePath].

template_node:
Either `None` or a [Hom:hou.Node] object containing an unlocked instance
of the digital asset that defines the definition's new contents.
If `None`, this method does not update the definition's contents.

options:
Either `None` or a [Hom:hou.HDAOptions] object that specifies extra
behaviours of the definition. If template_node is not `None`, the
compressContents, lockContents, saveSpareParms, and
makeInitialParmsDefaults values of the [Hom:hou.HDAOptions] object
are used. Otherwise, only the compressContents value is used.

See also [Hom:hou.HDADefinition#updateFromNode] for a way to save an


unlocked node's definition to the current otl file. See also
[Hom:hou.HDADefinition#copyToHDAFile].

::`copyToHDAFile(self, file_name, new_name=None, new_menu_name=None)`:


#cppname: HOM_HDADefinition::copyToHDAFile
#replaces: Cmd:otcopy, Cmd:otmerge
Copy this definition into an otl file.

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (3 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

file_name:
The otl file where the definition will be saved. If the file does
not already exist, it will be created. If it already contains
a definition for this node type, it will be overwritten.

new_name:
The new name of the node type. If None, the definition will be
saved as the existing node type name. See also
[Hom:hou.NodeType#name].

new_menu_name:
The new description of the node type that appears in the tab menu.
If None, Houdini will use the existing description. Note that the
node type name must be unique within the otl file, so saving the
definition with a new description to an otl file containing a
definition with the old node name will still overwrite the existing
definition. See also [Hom:hou.NodeType#description].

::`isCurrent(self)` -> `bool`:


#cppname: HOM_HDADefinition::isCurrent
Return whether this definition is the one currently in use by Houdini.

This example shows how you can access other definitions for the same node
type:
{{{
#!python
def otherDefinitions(definition):
'''Given an HDADefinition object, return the other loaded definitions
for the same node type.'''
# Look through all the loaded otl files for definitions providing
# the same node type.
result = []
for otl_file in hou.hda.loadedFiles():
# Skip the otl file containing the definition that was passed in.
if otl_file == definition.libraryFilePath():
continue

for other_definition in hou.hda.definitionsInFile(otl_file):


if other_definition.nodeType() == definition.nodeType():
result.append(other_definition)
return result
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (4 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

{{{
#!pycon
# Print the paths to otl files providing other definitions for a digital asset instance.
>>> for other_definition in otherDefinitions(hou.node("/obj/my_hda1").type().definition()):
... print other_definition.libraryFilePath()
/path/to/file1.otl
/path/to/file2.otl
}}}

::`isPreferred(self)` -> `bool`:


#cppname: HOM_HDADefinition::isPreferred
#replaces: Cmd:otprefer
Return whether this definition is preferred.

After loading otl files, Houdini uses a set of rules to resolve conflicts
when it encounters multiple definitions for the same node type (e.g.
preferring the most recent otl file, preferring definitions embedded in the
hip file, etc.). When these rules do not use the definition you want, you
can override them by explicitly marking a definition as preferred. Houdini
saves this list of preferred definitions with the hip file. Marking a
definition as not preferred will remove it from this list, and the normal
rules will apply again.

::`setIsPreferred(self, preferred)`:
#cppname: HOM_HDADefinition::setIsPreferred
#replaces: Cmd:otprefer
Set whether this definition is preferred. See
[Hom:hou.HDADefinition#isPreferred] for more information.

::`destroy(self)`:
#cppname: HOM_HDADefinition::destroy
#replaces: Cmd:otdelete
Uninstall this definition and _delete it from the otl file_. Any node
instances of this asset will warn that they are using an incomplete
asset definition.

See also [Hom:hou.hda#uninstallFile].

::`sections(self)` -> `dict` of `str` to [Hom:hou.HDASection]:


#cppname: HOM_HDADefinition::sections
#replaces: Cmd:otcontentls
Return a dictionary mapping section names to [Hom:hou.HDASection] objects.
See [Hom:hou.HDASection] for more information on sections.

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (5 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

::`addSection(self, name, contents="")` -> [hom:hou.HDASection]:


#cppname: HOM_HDADefinition::addSection
#replaces: Cmd:otcontentadd, Cmd:otcontentload
Create a new section with the specified contents. If a section already
exists with this name, changes the existing contents to the new contents.
Note that the contents may contain binary data. Also note that section
names may contain '/'.

See [Hom:hou.HDASection] for more information on sections. To remove


a section, use [Hom:hou.HDASection#destroy].

{{{
#!python
def addSectionFromFile(hda_definition, section_name, file_name):
'''Add a section whose contents come from a file. If the section
already exists, replace its contents.'''
section_file = open(file_name, "r")
hda_definition.addSection(section_name, section_file.read())
section_file.close()
}}}

::`removeSection(self, name)`:
#cppname: HOM_HDADefinition::removeSection
Remove an existing section. Only remove sections that you explicitly
added. Do not remove the special sections that Houdini uses to store the
contents of the digital asset definition, or Houdini will generate errors
or strange side effects.

See [Hom:hou.HDASection] for more information on sections. Note that


[Hom:hou.HDASection#destroy] will also remove a section.

Raises [Hom:hou.OperationFailed] if no such section exists in the


definition.

::`minNumInputs(self)` -> `int`:


#cppname: HOM_HDADefinition::minNumInputs
#replaces: Cmd:otls
Return the minimum number of connected inputs that node instances of this
digital asset can have. If these inputs are not connected, the node will
generate an error.

See also [Hom:hou.NodeType#minNumInputs].

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (6 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

::`setMinNumInputs(self, min_num_inputs)`:
#cppname: HOM_HDADefinition::setMinNumInputs
Set the minimum number of connected inputs that node instances of this
digital asset must have. `min_num_inputs` must be between 0 and 4,
inclusive. If a node does not have the minimum number of inputs, it will
generate an error.

::`maxNumInputs(self)` -> `int`:


#cppname: HOM_HDADefinition::maxNumInputs
#replaces: Cmd:otls
Return the maximum number of inputs that node instances of this digital
asset can have. Return a number greater than 4 if this node type can
accept an unlimited number of inputs.

See also [Hom:hou.NodeType#maxNumInputs].

::`setMaxNumInputs(self, max_num_inputs)`:
#cppname: HOM_HDADefinition::setMaxNumInputs
Set the maximum number of inputs that node instances of this digital
asset may have. This number must be greater than or equal to the minimum
number of inputs. If it is 5 or greater, Houdini will use a merge
SOP-style input connector that allows an unlimited number of inputs.
Otherwise, the node will have between 0 and 4 input connectors, each of
which may or may not be connected, that correspond to the subnet indirect
inputs inside the digital asset.

See [Hom:hou.Node#inputConnectors] and [Hom:hou.SubnetIndirectInput]


for more information on input connectors and subnet indirect inputs.

::`version(self)` -> `str`:


#cppname: HOM_NodeType::version
#replaces: Cmd:otversion
Return the user-defined version string. By default, the version is
an empty string. It is up to you how you use this version information;
it is not used by Houdini.

::`setVersion(self, version)`:
#cppname: HOM_NodeType::setVersion
#replaces: Cmd:otversion
Set the user-defined version string. See [Hom:hou.HDADefinition#version]
for more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (7 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

::`comment(self)` -> `str`:


#cppname: HOM_NodeType::comment
#replaces: Cmd:otcomment
Return the user-defined comment string. It is up to you how you use
the comment; it is not used by Houdini.

::`setComment(self, comment)`:
#cppname: HOM_NodeType::setComment
#replaces: Cmd:otcomment
Set the user-defined comment. See [Hom:hou.HDADefinition#comment]
for more information.

::`icon(self)` -> `str`:


#cppname: HOM_HDADefinition::icon
#replaces: Cmd:otls
Return the name or path of the icon for this definition's node type.
Note that Houdini uses its search path to locate icons, so you do not need
to pass in a full path.

See also [Hom:hou.NodeType#icon].

::`setIcon(self, icon)`:
#cppname: HOM_HDADefinition::setIcon
Set the icon for this definition's node type. See
[Hom:hou.HDADefinition#icon] for more information.

::`modificationTime(self)` -> int:


#cppname: HOM_HDADefinition::modificationTime
#replaces: Cmd:otls
Return the time when the definition was last modified. This time is
returned as a POSIX timestamp, such as is returned by `time.time()`.

{{{
#!pycon
>>> import time
>>> time.ctime(hou.nodeType(hou.objNodeTypeCategory(), "toon_character").
... definition().modificationTime())
'Thu Nov 6 18:22:38 2008'
}}}

::`setModificationTime(self, time=-1)`:
#cppname: HOM_HDADefinition::setModificationTime
#replaces: Cmd:ottouch

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (8 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

Set the modification time for the definition to the given POSIX timestamp.
If the time parameter is negative, uses the current time.

See also [Hom:hou.HDADefinition#modificationTime].

::`embeddedHelp(self)` -> `str`:


#cppname: HOM_HDADefinition::embeddedHelp
Return the help text embedded in the digital asset. Return an empty string
if no embedded help exists.

Embedded help typically comes from the __Help__ tab of the operator
type properties window, but it may also come from a dialog script.

::`options(self)` -> [Hom:hou.HDAOptions]:


#cppname: HOM_HDADefinition::options
Return a [Hom:hou.HDAOptions] object for the options stored in this
digital asset. See [Hom:hou.HDAOptions] for more information.

::`setOptions(self, options)`:
#cppname: HOM_HDADefinition::setOptions
Set this digital asset definition's options to the data in a
[Hom:hou.HDAOptions] object. See [Hom:hou.HDAOptions] for more
information.

::`extraFileOptions(self)` -> `dict` of `str` to `bool`, `int`, `float`, `str`:


#cppname: HOM_HDADefinition::extraFileOptions
Return a dictionary containing the extra options attached to sections
in the asset's definition. For example, event handler scripts such as
OnCreated are stored as sections inside the asset, and extra metadata
in this dictionary determines whether Houdini runs these scripts as
Python as as Hscript.

These is one dictionary for the entire asset, and keys in this dictionary
are usually of the form section_name/option_name. For example, if the
OnCreated section is marked as containing Python code, this dictionary will
contain "OnCreated/IsPython" set to True.

Note that the contents of this dictionary are saved in the ExtraFileOptions
section and are encoded in a binary format.

See also [Hom:hou.HDADefinition#setExtraFileOption] and


[Hom:hou.HDADefinition#removeExtraFileOption].

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (9 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

::`setExtraFileOption(self, name, value)`:


#cppname: HOM_HDADefinition::setExtraFileOption
Set an entry in the dictionary of extra file options. See
[Hom:hou.HDADefinition#extraFileOptions] for more information.
`value` may be an integer, float, string, or sequence of 2, 3, or 4
numbers.

The following example function marks an section, such as OnCreated, as


containing Python code:
{{{
#!python
def markSectionAsPython(definition, section_name):
definition.setExtraFileOption(section_name + "/IsPython", True)
}}}

::`removeExtraFileOption(self, name)`:
#cppname: HOM_HDADefinition::removeExtraFileOption
Remove an entry in the dictionary of extra file options. See
[Hom:hou.HDADefinition#extraFileOptions] for more information.
`value` may be a bool, integer, float, string, or sequence of 2, 3, or 4
numbers.

Raises [Hom:hou.OperationFailed] if there is no entry in the dictionary


with this name.

::`extraInfo(self)` -> `str`:


#cppname: HOM_HDADefinition::extraInfo
#replaces: Cmd:otls
Return a string storing extra information about the asset definition that
isn't stored elsewhere, like the representative node, guide geometry,
whether default parameters are hidden, etc.

See also [Hom:hou.HDADefinition#representativeNodePath] and


[Hom:hou.HDADefinition#hideDefaultParameters] to more easily retrieve
some portions of the extra info.

::`setExtraInfo(self, extra_info)`:
#cppname: HOM_HDADefinition::setExtraInfo
Set extra information about the asset definition that isn't stored
elsewhere, like the representative node, guide geometry, etc. This string
is encoded in a specific format, so it is recommended that you only
call this method with values returned from
[Hom:hou.HDADefinition#extraInfo].

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (10 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

::`representativeNodePath(self)` -> `str`:


#cppname: HOM_HDADefinition::representativeNodePath
Return the contents of the __Representative Node__ field on the __Basic__
tab of the __Type Properties__ dialog.

For object-level digital assets that contain other object nodes, it is


possible to make Houdini treat your digital asset like a camera or light
by choosing a node inside the asset to represent it. For example, if
you choose a camera inside the asset as the representative node, instances
of the digital asset will appear in the viewport's list of camera objects.

Note that this value is also stored in the string returned by


[Hom:hou.HDADefinition#extraInfo].

::`hideDefaultParameters(self)` -> `bool`:


#cppname: HOM_HDADefinition::hideDefaultParameters
Return whether the parameters that are common to nodes types in this node
type category are hidden or not. For example, nearly all objects have
common translation, rotation, scale, etc. parameters, and object level
digital assets have these parameters by default. If hidden, though,
these parameters are still there but are not displayed to the user.

Note that this value is also stored in the string returned by


[Hom:hou.HDADefinition#extraInfo].

::`addParmFolder(self, folder_name, in_folder=(), parm_name=None, create_missing_folders=False)`:


#cppname: HOM_HDADefinition::addParmFolder
Adds a folder to this node type's parameters.

folder_name:
The name of the folder that is displayed in the parameter dialog.

in_folder:
A sequence of folder name strings to indicate where the folder should
go. If this sequence is empty, the folder will go in top level set
of folders. It it is, for example, `("Transform",)`, the folder is
added inside the Transform folder. If it is `("Transform", "Options")`,
it will go inside the Options folder inside the Transform folder.

parm_name:
The name of the underlying parameter tuple corresponding to the set of
folders. For example, the folders in a set might be named Transform,

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (11 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

Subnet, and Controls, and these correspond to one parameter tuple


named, say, `'stdswitcher0'`. The value of the parameter in this tuple
is the index of the folder that is open.

If this is the first folder to go in the set, `parm_name` is used as the


parameter name. Otherwise, it is ignored and Houdini uses the
parameter name of the first folder in the set.

If this is the first folder in the set and parm_name is None, it will
default to `'folder0'`. If parm_name is already in use, Houdini
automatically generates a unique name.

create_missing_folders:
Whether Houdini should create folders specified in `in_folder` that
do not already exist. If this parameter is True, you can use this
method to add nested folders in one call.

See also [Hom:hou.HDADefinition#removeParmFolder].

::`removeParmFolder(self, folder)`:
#cppname: HOM_HDADefinition::removeParmFolder
Remove an empty folder from this node type's parameters.

folder:
A _sequence of folder names_. For example, to remove the Output
folder, pass in `("Output",)` and not `"Output"`.

Raises [Hom:hou.OperationFailed] if the folder does not exist or it is not


empty. Use [Hom:hou.HDADefinition#removeParmTuple] to remove all the
parameters inside the folder before calling this method.

See also [Hom:hou.HDADefinition#addParmFolder].

::`addParmTuple(self, parm_template, in_folder=(), create_missing_folders=False)`:


#cppname: HOM_HDADefinition::addParmTuple
Add a parameter tuple to this node type's parameters. Houdini places the
new parameter at the bottom of the parameters in a particular folder.

parm_template:
An instance of a [Hom:hou.ParmTemplate] subclass that describes the
parameter.

in_folder:

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (12 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

A sequence of folder name strings to tell Houdini which folder to


put the parameter in. If this sequence is empty, the parameter will go
in top level set of folders. It it is, for example, `("Transform",)`,
the parameter is added inside the Transform folder. If it is
`("Transform", "Options")`, it will go inside the Options folder inside
the Transform folder.

create_missing_folders:
Whether Houdini should create folders specified in `in_folder` that
do not already exist. If this parameter is True, you can create
folders without having to call [Hom:hou.HDADefinition#addParmFolder].

See also [Hom:hou.HDADefinition#replaceParmTuple].

::`removeParmTuple(self, name)`:
#cppname: HOM_HDADefinition::removeParmTuple
Remove a parameter tuple from this node type's parameters.

See also [Hom:hou.HDADefinition#addParmTuple] and


[Hom:hou.HDADefinition#removeParmFolder].

::`replaceParmTuple(self, parm_tuple_name, parm_template)`:


#cppname: HOM_HDADefinition::replaceParmTuple
Replace an existing parameter tuple with a new one. The old parameter
tuple is removed and the new one is added in its place.

parm_tuple_name:
The name of the parameter tuple to replace. Raises
[Hom:hou.OperationFailed] if no parameter tuple exists with this name.

parm_template:
A [Hom:hou.ParmTemplate] describing the new parameter tuple.

The new parameter tuple may or may not have the same name as the old one.
By providing a parameter tuple with the same name, you can modify an
existing parameter tuple. The following example function changes the
definition of the asset to make a parameter tuple visible or invisible
in all nodes of that type.
{{{
#!python
def showParmTupleInDefinition(parm_tuple, visible):
'''parm_tuple is a hou.ParmTuple on an instance of the digital asset.'''
parm_template = parm_tuple.parmTemplate()

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (13 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition

parm_template.hide(not visible)
parm_tuple.node().type().definition().replaceParmTuple(parm_tuple.name(), visible)
}}}
To show or hide a parameter in just one instance of a node, use
[Hom:hou.ParmTuple#hide].

To change a spare parameter on a node, use


[Hom:hou.Node#replaceSpareParmTuple].

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition (14 of 14) [12/7/2009 4:29:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAModule

= hou.HDAModule =
#type: homclass
#cppname: HOM_HDAModule
#category: Assets

"""User-defined Python module containing functions, classes, and constants


that are stored with and accessed from a digital asset."""

In Python, a module lets you organize functions, classes, and constants into a
common namespace. For example, `os` is a module and `os.getcwd` is a function
inside that module, and you access the contents of a module by looking up
Python attributes on it.

An HDAModule is a Python module that is associated with a particular digital


asset type. It lets you store a library of Python code in one location
in your asset, and you can invoke that code from parameters, event handlers,
and callbacks inside that asset.

The module's source code is stored in the __Python Module__ section of the
__Scripts__ tab in the __Type Properties__ dialog. For example, suppose the
digit asset is an object named `gear` and the Python Module section contains
the following:

{{{
#!python
def position():
return (hou.frame() * 1.2, 0.0, 3.2)

def onButtonPress():
print "you pressed the button"

def onLoaded():
print "onLoaded section running"
}}}

Unlike regular Python modules, which you access by name, you access a digital
asset's Python module by calling [Hom:hou.NodeType#hdaModule] on its node type.
For example, suppose you created an object-level digital asset named gear and
put the above code in its Python Module section. You could then access the
contents of the Python module as follows:

{{{

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAModule (1 of 3) [12/7/2009 4:29:18 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAModule

#!pycon
>>> node_type = hou.nodeType(hou.objNodeTypeCategory(), "gear")
>>> node_type.hdaModule().position()
(1.2, 0.0, 3.2)
>>> node_type.hdaModule().onButtonPress()
you pressed the button
}}}

One use for the Python module is drive parameter expressions on nodes inside
the digital asset. For example, suppose `/obj/gear1` is an instance of the
digital asset and `/obj/gear1/geo1` is a node inside the asset. You could put
the following inside `geo1`'s `tx` parameter expression:

{{{
#!python
hou.node("..").type().hdaModule().position()[0]
}}}

For convenience, you can also access the module from a node instance of the
digital asset using [Hom:hou.Node#hdaModule]. So, you could simplify the
above expression to:

{{{
#!python
hou.node("..").hdaModule().position()[0]
}}}

And since you don't need to use the `hou.` prefix inside expressions, you
could further simplify it to:

{{{
#!python
node("..").hdaModule().position()[0]
}}}

The following example shows how you might run code in the module from the
Callback Script field of a button parameter:
{{{
#!python
hou.pwd().hdaModule().onButtonPress()
}}}

In an event handler script, such as On Loaded, you can use the `kwargs` dict

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAModule (2 of 3) [12/7/2009 4:29:18 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAModule

to access the node type:


{{{
#!python
kwargs["type"].hdaModule().onLoaded()
}}}

Note that Houdini creates a local `kwargs` dict that's accessible from
the Python Module, too. It contains one entry with the key `"type"`, to give
you access to the [Hom:hou.NodeType] defined by the digital asset.

If you find that a digital asset has too much Python code to store in one
module, it's possible to create submodules. For example, if you want to
create a submodule named `bar`, put its source code in a new ditigal asset
section (say, `"bar_PythonModule"`). Then, from the Python Module section, you
can write the following:

{{{
#!python
import toolutils
bar = toolutils.createModuleFromSection("bar", kwargs["type"], "bar_PythonModule")
}}}

`bar` now appears as a submodule of the main module. If, for example, the
`bar_PythonModule` section contains:

{{{
#!python
def foo():
return 3.2
}}}

then you could write the following from a parameter on the digital asset node:

{{{
#!python
pwd().hdaModule().bar.foo()
}}}

Note that the Python Module code is stored in a section of the digital asset
named `"PythonModule"`. For example, you can get a string containing that
source code using
`node_type.definition().sections()["PythonModule"].contents()`.

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAModule (3 of 3) [12/7/2009 4:29:18 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAOptions

= hou.HDAOptions =
#type: homclass
#cppname: HOM_HDAOptions
#category: Assets

"""Stores miscellaneous options about a houdini digital asset (HDA)."""

The contents of this object correspond to some of the checkboxes on the


__Basic__ tab of the __Type Properties__ dialog. These values are stored
in the `TypePropertiesOptions` section of a digital asset definition.

Call [Hom:hou.HDADefinition#options] to get an HDAOptions instance. Note


that an instance of this class is simply a data structure, and is not
associated with an particular digital asset instance. In other words,
changing the values inside this object will not change the digital asset.
To save these values to the digital asset definition, call
[Hom:hou.HDADefinition#setOptions].

{{{
#!pycon
>>> node = hou.node("/obj/my_digital_asset1")
>>> definition = node.type().definition()
>>> print definition.section()['TypePropertiesOptions'].contents()
ParmsFromVfl := 0;
PrefixDroppedParmName := 1;
UseDSParms := 1;
ForbidOutsideParms := 1;
LockContents := 1;
SaveSpareParms := 0; # <-- Currently 0
CheckExternal := 1;
GzipContents := 1;
MakeDefault := 1;
PrefixDroppedParmLabel := 1;
UnlockOnCreate := 0;

>>> options = definition.options()


>>> options.saveSpareParms()
False
>>> options.setSaveSpareParms(True)
>>> definition.setOptions(options)
>>> print definition.section()['TypePropertiesOptions'].contents()
ParmsFromVfl := 0;

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAOptions (1 of 5) [12/7/2009 4:29:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAOptions

PrefixDroppedParmName := 1;
UseDSParms := 1;
ForbidOutsideParms := 1;
LockContents := 1;
SaveSpareParms := 1; # <-- Now 1
CheckExternal := 1;
GzipContents := 1;
MakeDefault := 1;
PrefixDroppedParmLabel := 1;
UnlockOnCreate := 0;
}}}

@methods

::`checkForExternalLinks(self)` -> `bool`:


#cppname: HOM_HDAOptions::checkForExternalLinks
Return whether the Check for External Node References option is set.

If set, this option changes all absolute node references inside the digital
asset into relative references.

::`setCheckForExternalLinks(self, check_for_external_links)`:
#cppname: HOM_HDAOptions::setCheckForExternalLinks
Sets the Check for External Node References option. See
[Hom:hou.HDAOptions#checkForExternalLinks] for more information.

::`forbidOutsideParms(self)` -> `bool`:


#cppname: HOM_HDAOptions::forbidOutsideParms
Return whether the Forbid Linking Parameters from Outside this Subnet
option is set.

When set, this option does not allow you to drag parameters from nodes
outside the contents of the digital asset.

::`setForbidOutsideParms(self, forbid_outside_parms)`:
#cppname: HOM_HDAOptions::setForbidOutsideParms
Sets the Forbid Linking Parameters from Outside this Subnet option. See
[Hom:hou.HDAOptions#forbidOutsideParms] for more information.

::`lockContents(self)` -> `bool`:


#cppname: HOM_HDAOptions::lockContents
Return whether the Save Contents as Locked option is on.

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAOptions (2 of 5) [12/7/2009 4:29:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAOptions

When this option is not set, Houdini will use a creation script to store
the contents of the digital asset instead of storing the node data.
A creation script cannot store extra data like locked SOPs, edit SOP
information, paint SOP information, etc.

If this option is not set, new instances of the digital asset will be
locked, so the user can edit the contents. However, you probably do not
ever want to turn this option off. Instead, if you want to lock new
instances of the digital asset, see [Hom:hou.HDAOptions#unlockNewInstances].

::`setLockContents(self, lock_contents)`:
#cppname: HOM_HDAOptions::setLockContents
Sets the Save Contents as Locked option. See
[Hom:hou.HDAOptions#lockContents] for more information.

::`unlockNewInstances(self)` -> `bool`:


#cppname: HOM_HDAOptions::unlockNewInstances
Return whether the Unlock New Nodes on Creation option is set.

When this option is set, Houdini will unlock new instances of the digital
asset when they are created. Note that this option only has effect
when the result of [Hom:hou.HDAOptions#lockContents] is `True`.

::`setUnlockNewInstances(self, unlock_new_instances)`:
#cppname: HOM_HDAOptions::setUnlockNewInstances
Sets the Unlock New Nodes on Creation option. See
[Hom:hou.HDAOptions#unlockNewInstances] for more information.

::`compressContents(self)` -> `bool`:


#cppname: HOM_HDAOptions::compressContents
Return whether the Compress Contents option is on.

When this option is set, Houdini compresses the contents of the asset
definition to reduce the size of the .otl file. Note that this option only
as effect when the result of [Hom:hou.HDAOptions#lockContents] is `True`.

::`setCompressContents(self, compress_contents)`:
#cppname: HOM_HDAOptions::setCompressContents
Sets the Compress Contents option. See
[Hom:hou.HDAOptions#compressContents] for more information.

::`makeInitialParmsDefaults(self)` -> `bool`:


#cppname: HOM_HDAOptions::makeInitialParmsDefaults

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAOptions (3 of 5) [12/7/2009 4:29:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAOptions

Return whether the Save Defaults as Initial Parameters option is on.

When set, this option uses the default values of the original parameters as
the initial values for new nodes, instead of their current values.

::`setMakeInitialParmsDefaults(self, make_initial_parms_defaults)`:
#cppname: HOM_HDAOptions::setMakeInitialParmsDefaults
Sets the Save Defaults as Initial Parameters option. See
[Hom:hou.HDAOptions#makeInitialParmsDefaults] for more information.

::`saveInitialParmsAndContents(self)` -> `bool`:


#cppname: HOM_HDAOptions::saveInitialParmsAndContents
Return whether the Save Initial Contents and Parameters option is on.

When this option is set, Houdini saves any parameter values and node
contents referenced by the digital asset to be saved as part of the asset’s
definition.

::`setSaveInitialParmsAndContents(self, save_initial_parms_and_contents)`:
#cppname: HOM_HDAOptions::setSaveInitialParmsAndContents
Set the Save Initial Contents and Parameters option. See
[Hom:hou.HDAOptions#saveInitialParmsAndContents] for more information.

::`saveSpareParms(self)` -> `bool`:


#cppname: HOM_HDAOptions::saveSpareParms
Return the Save Spare Parameters option.

When set, this option will add code into the asset creation script to
recreate the node's current spare parameters. New node instances of the
digital asset will contain the same spare parameters as those on the
representative node.

::`setSaveSpareParms(self, save_spare_parms)`:
#cppname: HOM_HDAOptions::setSaveSpareParms
Set the Save Spare Parameters option. See
[Hom:hou.HDAOptions#saveSpareParms] for more information.

::`parametersFromVexCode(self)` -> `bool`:


#cppname: HOM_HDAOptions::parametersFromVexCode
Return whether the Get Properties from VEX Code option is on.

When this option is set, most properties and parameters of the operator
come from pragma statements in the VEX source code.

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAOptions (4 of 5) [12/7/2009 4:29:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAOptions

::`setParametersFromVexCode(self, parameters_from_vex_code)`:
#cppname: HOM_HDAOptions::setParametersFromVexCode
Sets the Get Properties from VEX Code option. See
[Hom:hou.HDAOptions#parametersFromVexCode] for more information.

::`prefixDroppedParmNames(self)` -> `bool`:


#cppname: HOM_HDAOptions::prefixDroppedParmNames
Return whether the Prefix Dropped Parameter Names option is on.

When this option is set, Houdini will not include a prefix on parameter
names when you drag and drop parameters into the __Existing Parameters__
areas of the __Parameters__ tab of the __Type Properties__ dialog.

See also [Hom:hou.HDAOptions#prefixDroppedParmLabels].

::`setPrefixDroppedParmNames(self, prefix_dropped_parm_names)`:
#cppname: HOM_HDAOptions::setPrefixDroppedParmNames
Sets the Prefix Dropped Parameter Names option. See
[Hom:hou.HDAOptions#prefixDroppedParmNames] for more information.

::`prefixDroppedParmLabels(self)` -> `bool`:


#cppname: HOM_HDAOptions::prefixDroppedParmLAbels
Return whether the Prefix Dropped Parameter Labels option is on.

When this option is set, Houdini will not include a prefix on parameter
labels when you drag and drop parameters into the __Existing Parameters__
areas of the __Parameters__ tab of the __Type Properties__ dialog.

See also [Hom:hou.HDAOptions#prefixDroppedParmNames].

::`setPrefixDroppedParmLabels(self, prefix_dropped_parm_labels)`:
#cppname: HOM_HDAOptions::setPrefixDroppedParmLabels
Sets the Prefix Dropped Parameter Labels option. See
[Hom:hou.HDAOptions#prefixDroppedParmLabels] for more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDAOptions (5 of 5) [12/7/2009 4:29:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDASection

= hou.HDASection =
#type: homclass
#cppname: HOM_HDASection
#category: Assets

"""Represents a "section" of data stored along with a digital asset."""

A digital asset stores its contents in a number of different pieces of data


called sections. Each section is named and contains an arbitrarily sized
piece of data, often textual. Each section is like a file embedded inside
the definition, and Houdini uses specially named sections to store the node
contents, list of parameters, etc. You can embed your own data into a digital
asset by putting it inside a section.

Any parameter in Houdini that references a file can also reference a section
inside a digital asset. For example, if `car` is an object-level digital
asset and the section is named `"texture.jpg"`, you can reference
that texture with `opdef:/Object/car?texture.jpg`. Note that [Hom:hou.readFile]
also supports this `opdef:` syntax.

By moving files into digital asset sections, you can build self-contained
digital assets that can be distributed via a single otl file.

Note that section names may contain '/'.

@methods

::`name(self)` -> `str`:


#cppname: HOM_HDASection::name
Return the name of this section.

Note that is is not possible to rename a section, but the following


function will emulate renaming:
{{{
#!python
def renameSection(section):
'''Rename a section by removing it and creating a new one. Return the new section.'''
new_section = section.definition().addSection(new_name, section.contents())
section.destroy()
return new_section
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDASection (1 of 3) [12/7/2009 4:29:21 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDASection

::`definition(self)` -> [Hom:hou.HDADefinition]:


#cppname: HOM_HDASection::definition
Return the digital asset definition containing this section.

::`contents(self)` -> `str`:


#cppname: HOM_HDASection::contents
#replaces: Cmd:otcontentsave
Return a string containing the contents of this section.

{{{
#!python
def saveSectionToFile(section, file_name):
'''Given a section, save it to a file.'''
section_file = file(file_name, "w")
section_file.write(section.contents())
section_file.close()
}}}

::`size(self)` -> `int`:


#cppname: HOM_HDASection::size
#replaces: Cmd:otcontentls
Return the number of bytes in the contents. This method is a shortcut
for `len(self.contents())`.

::`setContents(self, contents)`:
#cppname: HOM_HDASection::setContents
Set the contents of this section to the given string. A section may
contain binary information, like bgeo files, images, etc.

See [Hom:hou.HDADefinition#addSection] for an example of how to create


a section from a file on disk.

::`destroy(self)`:
#cppname: HOM_HDASection::destroy
#replaces: Cmd:otcontentdelete
Remove this section from the HDA definition. You can also remove a section
with [Hom:hou.HDADefinition#removeSection], and this method is equivalent
to `self.definition().removeSection(self.name())`.

Only remove sections that you explicitly added. Do not remove the special
sections that Houdini uses to store the contents of the digital asset
definition, or Houdini will generate errors or strange side effects.

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDASection (2 of 3) [12/7/2009 4:29:21 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HDASection

To add a section, use [Hom:hou.HDADefinition#addSection].

::`modificationTime(self)` -> int:


#cppname: HOM_HDASection::modificationTime
#replaces: Cmd:otcontentls
Return the time when the section was last modified. This time is returned
as a POSIX timestamp, such as is returned by `time.time()`.

{{{
#!pycon
>>> hou.nodeType(hou.cop2NodeTypeCategory(), "colorwheel").definition()
<hou.HDADefinition of Cop2 colorwheel in /opt/hfs9.5/houdini/otls/OPlibCop2.otl>
>>> definition = hou.nodeType(hou.cop2NodeTypeCategory(), "colorwheel").definition()
>>> definition.sections().keys()
['VflCode', 'DialogScript', 'VexCode']
>>> section = definition.sections()['VflCode']
>>> section.modificationTime()
1177535169
>>> import datetime, time
>>> datetime.datetime.fromtimestamp(section.modificationTime())
datetime.datetime(2007, 4, 25, 17, 6, 9)
>>> time.ctime(section.modificationTime())
'Wed Apr 25 17:06:09 2007'
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/HDASection (3 of 3) [12/7/2009 4:29:21 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hda

= hou.hda =
#type: hommodule
#cppname: HOM_hda
#category: Assets

"""Module containing functions related to Houdini Digital Assets."""

@functions

::`definitionsInFile(file_path)` -> `tuple` of [Hom:hou.HDADefinition]:


#cppname: HOM_hda::definitionsInFile
#replaces: Cmd:otglob, Cmd:otls
Return all the digital asset definitions inside an otl file. See
[Hom:hou.HDADefinition] for more information.

Raises [Hom:hou.OperationFailed] if `file_path` does not refer to a valid


otl file.

{{{
#!pycon
# Print the node types defined by digital assets in $HOME/houdiniX.Y/otls/OPcustom.otl:
>>> import os
>>> my_otl_file = "%s/otls/OPcustom.otl" % hou.homeHoudiniDirectory()
>>> for definition in hou.hda.definitionsInFile(my_otl_file):
... print definition.nodeTypeCategory().name() + "/" + definition.nodeTypeName()
Sop/gcoggeo
Sop/gCogFlatGeo
Sop/gDivideAtCentroid
Object/gAxle
Object/gCog
}}}

::`installFile(file_path, oplibraries_file=None, change_oplibraries_file=True, force_use_assets=False)`:


#cppname: HOM_hda::installFile
#replaces: Cmd:otload
Install all the node types defined in an otl file into the current Houdini
session. This function is equivalent to __File > Install Digital Asset
Library...__ in Houdini.

file_path:
The otl file to load.

oplibraries_file:
The path to an OPlibraries file or `None`. OPlibraries files are text
http://www.sidefx.com/docs/houdini10.0/hom/hou/hda (1 of 5) [12/7/2009 4:29:22 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/hda

files containing lists of otl files to load on startup. When Houdini


starts up it reads all the OPlibraries files it finds in the Houdini
path and loads all the otl files listed in them. By creating
OPlibraries files in $HOME/houdiniX.Y, $HSITE/houdiniX.Y, $JOB, etc.
you can create libraries that are specific to a particular user,
studio, job, etc.

This parameter is only meaningful when `change_oplibraries_file` is


`True`.

Note that OPlibraries are only used when the __Use OPlibraries files to
find OTLS__ checkbox in the __Configuration__ tab of the __Operator
Type Manager__ is checked.

change_oplibraries_file:
When `oplibraries_file` is not `None` and this parameter is `True`,
Houdini will modify the OPlibraries file, adding the otl file to it.

force_use_assets:
When `True`, ensure that the definitions inside the otl file are
current. If they would not otherwise provide the current definition,
they are marked as preferred to ensure they are current. See
[Hom:hou.HDADefinition#isPreferred] for more information.

Note that, if you do not store the path to the otl file in an OPlibraries
file, Houdini will store it in the current Houdini session. So, when you
load a hip file, it will try to load the otl files that it references.

::`uninstallFile(file_path, oplibraries_file=None, change_oplibraries_file=True)`:


#cppname: HOM_hda::uninstallFile
#replaces: Cmd:otunload
Uninstall an otl file and all the node type definitions it provides from
the current Houdini session. The otl file and its contents on disk are
unchanged.

You can set `file_path` to the special name `"Embedded"` to refer to the
digital assets embedded in the current hip file. The following example
removes any embedded digital asset definitions from the current Houdini
session:
{{{
#!python
hou.hda.uninstallFile("Embedded")
}}}

If `oplibraries_file` is not `None` and `change_oplibraries_file` is


http://www.sidefx.com/docs/houdini10.0/hom/hou/hda (2 of 5) [12/7/2009 4:29:22 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/hda

`True`, Houdini will remove the path to the otl from the specified
OPlibraries file. See [Hom:hou.hda#installFile] for more information
about these parameters.

If all the definitions of a node type are uninstalled, any instances


of that node type will warn that they are using an incomplete asset
definition. They will, however, retain their parameter values as spare
parameters. Installing an otl file with the missing node type will
restore those node instances and remove the warnings.

See also [Hom:hou.HDADefinition#destroy].

::`reloadFile(file_path)`:
#cppname: HOM_hda::reloadFile
#replaces: Cmd:otrefresh
Reload the contents of an otl file, loading any updated digital asset
definitions inside it.

You only need to call this function if an otl file was modified from
outside the current Houdini session.

::`loadedFiles()` -> `tuple` of `str`:


#cppname: HOM_hda::loadedFiles
#replaces: Cmd:otrefresh, Cmd:otls
Return a tuple of paths to the otl files that are loaded into the current
Houdini session.

This method is can be approximately implemented as follows:


{{{
#!python
def loadedFiles():
'''Return a list of otl files loaded into this Houdini session.'''
# Look through all the node types, and for those that have digital
# asset definitions, remember the otl file containing the definition.
result = []
for category in hou.nodeTypeCategories().values():
for node_type in category.nodeTypes().values():
definition = node_type.definition()
if definition is None:
continue
if definition.libraryFilePath() not in result:
result.append(definition.libraryFilePath())
return result
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/hda (3 of 5) [12/7/2009 4:29:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hda

See [Hom:hou.HDADefinition#isCurrent] for an example.

::`expandToDirectory(file_path, directory_path)`:
#cppname: HOM_hda::expandToDirectory
#replaces: Cmd:otexpand
Expand the contents of the otl file in `file_path` into the directory
`directory_path`. If the directory does not already exist it is created.

When expanding an otl file, Houdini puts each digital asset definition in
the file into its own directory. As well, it puts each section inside a
definition into its own file. Each directory inside the expanded file tree
contains a `Sections.List` file that maps the actual file or directory
names into the section names, since section names may contain characters
that cannot occur in directory or file names. See [Hom:hou.HDASection] for
more information about sections.

This function provides an easy way to inspect and modify the contents of
an otl file. See also [Hom:hou.hda#collapseFromDirectory].

::`collapseFromDirectory(file_path, directory_path)`:
#cppname: HOM_hda::collapseFromDirectory
#replaces: Cmd:otcollapse
Given a directory that contains a previously expanded otl file, collapse
it into the otl file specified by `file_path`.

This function provides the inverse of [Hom:hou.hda#expandToDirectory].

::`renameSource(oplibraries_file, source_name=None)`:
#cppname: HOM_hda::renameSource
#replaces: Cmd:otrenamesource
Give a name to an OPlibraries file. This name appears in the __Operator
Type Manager__'s list of OPlibraries file. If `source_name` is `None`,
the name is removed from the OPlibraries file.

If the `oplibraries_file` does not already exist, it is created.

See [Hom:hou.hda#installFile] for more information about OPlibraries files.

::`encryptAsset(node, file_path, email, password, company, license_names, compile_basic=True, compile_vopnets=True, compile_channels=True, compile_nodenames=True)`:
#cppname: HOM_hda::encryptAsset
#status: nd

::`createEntitlement(email, password, company, license_name, server_code, entitled_email, license_type=hou.hdaLicenseType.Execute, expiry=0.0)`:


#cppname: HOM_hda::createEntitlement
#status: nd
http://www.sidefx.com/docs/houdini10.0/hom/hou/hda (4 of 5) [12/7/2009 4:29:22 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/hda

::`availableEntitlements(email, password)` -> `tuple` of `str`:


#cppname: HOM_hda::availableEntitlements
#status: nd

::`redeemEntitlements(email, password, license_file=None, entitlements=())`:


#cppname: HOM_hda::redeemEntitlements
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/hda (5 of 5) [12/7/2009 4:29:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hdaLicenseType

= hou.hdaLicenseType =
#type: hommodule
#cppname: HOM_hdaLicenseType
#category: Assets

"""Enumeration of digital asset license permission levels."""

Enumeration values:

* Execute
* Read
* Full

http://www.sidefx.com/docs/houdini10.0/hom/hou/hdaLicenseType [12/7/2009 4:29:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelDopesheet

= hou.ChannelDopesheet =
#type: homclass
#cppname: HOM_ChannelDopesheet
#category: Channels
#status: ni

@methods

::`setAutoSnap(self, on)`:
#cppname: HOM_ChannelDopesheet::setAutoSnap
#status: ni

::`setForceKeys(self, on)`:
#cppname: HOM_ChannelDopesheet::setForceKeys
#status: ni

::`setMinimizedRangeGadget(self, on)`:
#cppname: HOM_ChannelDopesheet::setMinimizedRangeGadget
#status: ni

::`setSplitFraction(self, value)`:
#cppname: HOM_ChannelDopesheet::setSplitFraction
#status: ni

@replaces

- [Cmd:chaneditor]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelDopesheet [12/7/2009 4:29:23 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelEditorPane

= hou.ChannelEditorPane =
#type: homclass
#cppname: HOM_ChannelEditorPane
#superclass: hou.Pane
#category: Channels
#status: ni

@methods

::`channelList(self)` -> [Hom:hou.ChannelList]:


#cppname: HOM_ChannelEditorPane::channelList
#status: ni

::`dopesheet(self)` -> [Hom:hou.ChannelDopesheet]:


#cppname: HOM_ChannelEditorPane::dopesheet
#status: ni

::`graphEditor(self)` -> [Hom:hou.ChannelGraphEditor]:


#cppname: HOM_ChannelEditorPane::graphEditor
#status: ni

::`setChannelListSplitFraction(self, value)`:
#cppname: HOM_ChannelEditorPane::setChannelListSplitFraction
#status: ni

::`setDisplayFilter(self, filter)`:
#cppname: HOM_ChannelEditorPane::setDisplayFilter
#status: ni

::`setEditorMode(self, mode)`:
#cppname: HOM_ChannelEditorPane::setEditorMode
#status: ni

::`setTemplateFilter(self, filter)`:
#cppname: HOM_ChannelEditorPane::setTemplateFilter
#status: ni

@replaces

- [Cmd:chanlist]
- [Cmd:chaneditor]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelEditorPane (1 of 2) [12/7/2009 4:29:23 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelEditorPane

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelEditorPane (2 of 2) [12/7/2009 4:29:23 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelGraphEditor

= hou.ChannelGraphEditor =
#type: homclass
#cppname: HOM_ChannelGraphEditor
#category: Channels
#status: ni

@methods

::`setGridDetailLevel(self, level)`:
#cppname: HOM_ChannelGraphEditor::setGridDetailLevel
#status: ni

::`setHorizontalRange(self, start, end)`:


#cppname: HOM_ChannelGraphEditor::setHorizontalRange
#status: ni

::`setMaxHorizontalRange(self, start, end)`:


#cppname: HOM_ChannelGraphEditor::setMaxHorizontalRange
#status: ni

::`setMinimizedChannelTools(self, on)`:
#cppname: HOM_ChannelGraphEditor::setMinimizedChannelTools
#status: ni

::`setMinimizedFunctionGadget(self, on)`:
#cppname: HOM_ChannelGraphEditor::setMinimizedFunctionGadget
#status: ni

::`setMinimizedRangeGadget(self, on)`:
#cppname: HOM_ChannelGraphEditor::setMinimizedRangeGadget
#status: ni

::`setMinimizedScaleHandle(self, on)`:
#cppname: HOM_ChannelGraphEditor::setMinimizedScaleHandle
#status: ni

::`setRawInterpolation(self, on)`:
#cppname: HOM_ChannelGraphEditor::setRawInterpolation
#status: ni

::`setScaleHandleValue(self, value)`:
#cppname: HOM_ChannelGraphEditor::setScaleHandleValue

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelGraphEditor (1 of 3) [12/7/2009 4:29:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelGraphEditor

#status: ni

::`setSnapToFrame(self, on)`:
#cppname: HOM_ChannelGraphEditor::setSnapToFrame
#status: ni

::`setVerticalAdapt(self, on)`:
#cppname: HOM_ChannelGraphEditor::setVerticalAdapt
#status: ni

::`showAttachedTimeGroups(self, on)`:
#cppname: HOM_ChannelGraphEditor::showAttachedTimeGroups
#status: ni

::`showRawHandle(self, on)`:
#cppname: HOM_ChannelGraphEditor::showRawHandle
#status: ni

::`showRelativeMoves(self, on)`:
#cppname: HOM_ChannelGraphEditor::showRelativeMoves
#status: ni

::`showScaleHandle(self, on)`:
#cppname: HOM_ChannelGraphEditor::showScaleHandle
#status: ni

::`showSegmentHandle(self, on)`:
#cppname: HOM_ChannelGraphEditor::showSegmentHandle
#status: ni

::`showSlopeHandle(self, on)`:
#cppname: HOM_ChannelGraphEditor::showSlopeHandle
#status: ni

::`showTimeGroupHandle(self, on)`:
#cppname: HOM_ChannelGraphEditor::showTimeGroupHandle
#status: ni

::`showTimeMarkHandle(self, on)`:
#cppname: HOM_ChannelGraphEditor::showTimeMarkHandle
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelGraphEditor (2 of 3) [12/7/2009 4:29:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelGraphEditor

::`showValueHandle(self, on)`:
#cppname: HOM_ChannelGraphEditor::showValueHandle
#status: ni

@replaces

- [Cmd:chaneditor]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelGraphEditor (3 of 3) [12/7/2009 4:29:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelList

= hou.ChannelList =

#type: homclass
#cppname: HOM_ChannelList
#category: Channels
#status: ni

@methods

::`setChannelChooserMode(self, mode)`:
#cppname: HOM_ChannelList::setChannelChooserMode
#status: ni

::`setScopedParmsSplitFraction(self, fraction)`:
#cppname: HOM_ChannelList::setScopedParmsSplitFraction
#status: ni

::`setShowLongNames(self, on)`:
#cppname: HOM_ChannelList::setShowLongNames
#status: ni

::`showChannelGroupKeys(self, on)`:
#cppname: HOM_ChannelList::showChannelGroupKeys
#status: ni

::`showChannelGroups(self, on)`:
#cppname: HOM_ChannelList::showChannelGroups
#status: ni

::`showChannelTree(self, on)`:
#cppname: HOM_ChannelList::showChannelTree
#status: ni

::`showFullPathToNames(self, on)`:
#cppname: HOM_ChannelList::showFullPathToNames
#status: ni

::`showNodeHeaders(self, on)`:
#cppname: HOM_ChannelList::showNodeHeaders
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelList (1 of 2) [12/7/2009 4:29:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelList

::`showParmLabels(self, on)`:
#cppname: HOM_ChannelList::showParmLabels
#status: ni

::`showParmValues(self, on)`:
#cppname: HOM_ChannelList::showParmValues
#status: ni

::`showScopedParms(self, on)`:
#cppname: HOM_ChannelList::showScopedParms
#status: ni

@replaces

- [Cmd:chanlist]
- [Cmd:chaneditor]
- [Cmd:parmlist]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelList (2 of 2) [12/7/2009 4:29:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelListPane

= hou.ChannelListPane =
#type: homclass
#cppname: HOM_ChannelListPane
#superclass: hou.Pane
#category: Channels
#status: ni

@methods

::`channelList(self)` -> [Hom:hou.ChannelList]:


#cppname: HOM_ChannelListPane::channelList
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChannelListPane [12/7/2009 4:29:25 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopNode

= hou.ChopNode =
#type: homclass
#cppname: HOM_ChopNode
#superclass: hou.Node
#category: Channels

"""Class representing a CHOP node."""

@methods

::`bypass(self, on)`:
#cppname: HOM_ChopNode::bypass

Turn the node's bypass flag on or off, making this node have no effect.

::`evaluate(self, track_index, sample_index)`:


#cppname: HOM_ChopNode::evaluate
#status: ni

::`evaluateInput(self, chop_input_node, track_index, sample_index)`:


#cppname: HOM_ChopNode::evaluateInput
#status: ni

::`evaluateInputAtEnd(self, chop_input_node)`:
#cppname: HOM_ChopNode::evaluateInputAtEnd
#status: ni

::`evaluateInputMaxValue(self, chop_input_node, track_index)`:


#cppname: HOM_ChopNode::evaluateInputMaxValue
#status: ni

::`evaluateInputMinValue(self, chop_input_node, track_index)`:


#cppname: HOM_ChopNode::evaluateInputMinValue
#status: ni

::`findTrack(self, name)` -> Track or None:


#cppname: HOM_ChopNode::findTrack
#status: ni

::`frameToSamples(self, frame)`:
#cppname: HOM_ChopNode::frameToSamples
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopNode (1 of 4) [12/7/2009 4:29:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopNode

::`isAudioFlagSet(self)` -> `bool`:


#cppname: HOM_ChopNode::isAudioFlagSet

Returns whether the node's audio flag is on.

::`isBypassed(self)` -> `bool`:


#cppname: HOM_ChopNode::isBypassed

Returns whether the node's bypass flag is on.

::`isDisplayFlagSet(self)` -> `bool`:


#cppname: HOM_ChopNode::isDisplayFlagSet

Returns whether the node's display flag is on.

::`isExportFlagSet(self)` -> `bool`:


#cppname: HOM_ChopNode::isExportFlagSet

Returns whether the node's export flag is on.

::`isUnloadFlagSet(self)` -> `bool`:


#cppname: HOM_ChopNode::isUnloadFlagSet

Returns whether the node's unload flag is on.

::`numSamples(self)`:
#cppname: HOM_ChopNode::numSamples
#status: ni

::`sampleRate(self)`:
#cppname: HOM_ChopNode::sampleRate
#status: ni

::`samplesToFrame(self, samples)`:
#cppname: HOM_ChopNode::samplesToFrame
#status: ni

::`samplesToTime(self, samples)`:
#cppname: HOM_ChopNode::samplesToTime
#status: ni

::`saveClip(self, file_name)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopNode (2 of 4) [12/7/2009 4:29:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopNode

#cppname: HOM_ChopNode::saveClip
#status: ni

::`setAudioFlag(self, on)`:
#cppname: HOM_ChopNode::setAudioFlag

Turns the node's audio flag on or off.

::`setDisplayFlag(self, on)`:
#cppname: HOM_ChopNode::setDisplayFlag

Turns the node's display flag to on or off.

::`setExportFlag(self, on)`:
#cppname: HOM_ChopNode::setExportFlag

Turns the node's export flag to on or off.

::`setUnloadFlag(self, on)`:
#cppname: HOM_ChopNode::setUnloadFlag

Turns the node's unload flag to on or off.

::`startSample(self)`:
#cppname: HOM_ChopNode::startSample
#status: ni

::`timeToSamples(self, time)`:
#cppname: HOM_ChopNode::timeToSamples
#status: ni

::`tracks(self)` -> tuple of Tracks:


#cppname: HOM_ChopNode::tracks

Returns a tuple of all the tracks in this node.

@replaces

- [Cmd:chopls]
- [Cmd:opget]
- [Cmd:opsave]
- [Cmd:opset]
- [Exp:chop]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopNode (3 of 4) [12/7/2009 4:29:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopNode

- [Exp:chope]
- [Exp:chopn]
- [Exp:chopr]
- [Exp:chops]
- [Exp:ic]
- [Exp:ice]
- [Exp:icl]
- [Exp:icmax]
- [Exp:icmin]
- [Exp:icn]
- [Exp:icr]
- [Exp:ics]
- [Exp:oc]
- [Exp:opflag]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopNode (4 of 4) [12/7/2009 4:29:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopViewerPane

= hou.ChopViewerPane =
#type: homclass
#cppname: HOM_ChopViewerPane
#superclass: hou.PathBasedPaneTab
#category: Channels
#status: ni

@methods

::`allowRawEditing(self, on)`:
#cppname: HOM_ChopViewerPane::allowRawEditing
#stauts: ni

::`displayChopChannel(self, chop_channel_path)`:
#cppname: HOM_ChopViewerPane::displayChopChannel
#status: ni

::`setBarRange(self, start, end)`:


#cppname: HOM_ChopViewerPane::setBarRange
#status: ni

::`setDisableGraph(self, on)`:
#cppname: HOM_ChopViewerPane::setDisableGraph
#status: ni

::`setDisableScope(self, on)`:
#cppname: HOM_ChopViewerPane::setDisableScope
#status: ni

::`setGraphType(self, type)`:
#cppname: HOM_ChopViewerPane::setGraphType
#status: ni

::`setGridDetailLevel(self, level)`:
#cppname: HOM_ChopViewerPane::setGridDetailLevel
#status: ni

::`setHorizontalRange(self, start, end)`:


#cppname: HOM_ChopViewerPane::setHorizontalRange
#status: ni

::`setHorzontalAdapt(self, on)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopViewerPane (1 of 3) [12/7/2009 4:29:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopViewerPane

#cppname: HOM_ChopViewerPane::setHorzontalAdapt
#status: ni

::`setNotesChopIndex(self, index)`:
#cppname: HOM_ChopViewerPane::setNotesChopIndex
#status: ni

::`setNumGraphs(self, num_graphs)`:
#cppname: HOM_ChopViewerPane::setNumGraphs
#status: ni

::`setScrollLock(self, on)`:
#cppname: HOM_ChopViewerPane::setScrollLock
#status: ni

::`setScrollLockPosition(self, position)`:
#cppname: HOM_ChopViewerPane::setScrollLockPosition
#status: ni

::`setShowExtendedRegions(self, on)`:
#cppname: HOM_ChopViewerPane::setShowExtendedRegions
#status: ni

::`setShowFrameIndicator(self, on)`:
#cppname: HOM_ChopViewerPane::setShowFrameIndicator
#status: ni

::`setShowScopeControls(self, on)`:
#cppname: HOM_ChopViewerPane::setShowScopeControls
#status: ni

::`setUnit(self, unit)`:
#cppname: HOM_ChopViewerPane::setUnit
#status: ni

::`setVerticalAdaptRange(self, min, max)`:


#cppname: HOM_ChopViewerPane::setVerticalAdaptRange
#status: ni

::`setVerticalRange(self, start, end)`:


#cppname: HOM_ChopViewerPane::setVerticalRange
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopViewerPane (2 of 3) [12/7/2009 4:29:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopViewerPane

::`showDots(self, on)`:
#cppname: HOM_ChopViewerPane::showDots
#status: ni

::`showHandles(self, on)`:
#cppname: HOM_ChopViewerPane::showHandles
#status: ni

::`showLabels(self, on)`:
#cppname: HOM_ChopViewerPane::showLabels
#status: ni

::`undisplayAllChannels(self)`:
#cppname: HOM_ChopViewerPane::undisplayAllChannels
#status: ni

::`undisplayChopChannel(self, chop_channel_path)`:
#cppname: HOM_ChopViewerPane::undisplayChopChannel
#status: ni
#status: ni
#status: ni

@replaces

- [Cmd:chopscope]
- [Cmd:chopview]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ChopViewerPane (3 of 3) [12/7/2009 4:29:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Track

= hou.Track =
#type: homclass
#cppname: HOM_Track
#category: Channels

Each [Hom:hou.ChopNode] contains its data in one or more tracks.


A track contains a sequence of floating point samples over time.
Each track has a unique name in its containing CHOP.

@methods

::`allSamples(self)` -> tuple of `float`:


#cppname: HOM_Track::allSamples

Returns all the sample values in this track.

::`chopNode(self)` -> [Hom:hou.ChopNode]:


#cppname: HOM_Track::chopNode

Returns the [Hom:hou.ChopNode] owner of this track.

::`eval(self)` -> `float`:


#cppname: HOM_Track::eval

Returns the value of this track at the current time.

::`evalAtFrame(self, frame)` -> `float`:


#cppname: HOM_Track::evalAtFrame

Returns the value of this track at a given frame.

::`evalAtSampleIndex(self, index)` -> `float`:


#cppname: HOM_Track::evalAtSampleIndex

Returns the value of the track at a given sample index.

::`evalAtTime(self, time)` -> `float`:


#cppname: HOM_Track::evalAtTime

Returns the value of this track at a given time.

::`name(self)` -> `str`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/Track (1 of 2) [12/7/2009 4:29:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Track

#cppname: HOM_Track::name

Returns the name of this track (each track in a CHOP has a unique name).

::`numSamples(self)` -> `int`:


#cppname: HOM_Track::numSamples

Return the number of samples in this track.

@replaces

- [Exp:chop]
- [Exp:chopcf]
- [Exp:chopci]
- [Exp:chopct]
- [Exp:chopf]
- [Exp:chopi]
- [Exp:chopl]
- [Exp:chopstr]
- [Exp:chopt]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Track (2 of 2) [12/7/2009 4:29:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/bezier

= hou.bezier =

#type: homfunction
#cppname: hom::bezier
#category: Channels

"""Evaluate a Bezier interpolation spline for an animated parameter


using the left keyframe's outgoing value, tangent, and acceleration and
the right keyframe's incoming value, tangent, and acceleration."""

@usage
`bezier()` -> float

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]

http://www.sidefx.com/docs/houdini10.0/hom/hou/bezier (1 of 2) [12/7/2009 4:29:28 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/bezier

- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:bezier]

http://www.sidefx.com/docs/houdini10.0/hom/hou/bezier (2 of 2) [12/7/2009 4:29:28 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/commitPendingKeyframes

= hou.commitPendingKeyframes =

#type: homfunction
#cppname: hom::commitPendingKeyframes
#category: Channels

@usage
`commitPendingKeyframes()`

http://www.sidefx.com/docs/houdini10.0/hom/hou/commitPendingKeyframes [12/7/2009 4:29:28 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/constant

= hou.constant =

#type: homfunction
#cppname: hom::constant
#category: Channels

"""Evaluate an animation function for an animated parameter. The return


value is always the left keyframe's outgoing value."""

@usage
`constant()` -> float

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]

http://www.sidefx.com/docs/houdini10.0/hom/hou/constant (1 of 2) [12/7/2009 4:29:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/constant

- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:constant]

http://www.sidefx.com/docs/houdini10.0/hom/hou/constant (2 of 2) [12/7/2009 4:29:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/cubic

= hou.cubic =

#type: homfunction
#cppname: hom::cubic
#category: Channels

"""Smooth curve between the left keyframe's outgoing slope and the
right's incoming slope."""

@usage
`cubic()` -> float

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]

http://www.sidefx.com/docs/houdini10.0/hom/hou/cubic (1 of 2) [12/7/2009 4:29:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/cubic

- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:cubic]

http://www.sidefx.com/docs/houdini10.0/hom/hou/cubic (2 of 2) [12/7/2009 4:29:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/cycle

= hou.cycle =

#type: homfunction
#cppname: hom::cycle
#category: Channels

"""Repeats the motion


between two frames, lining up the first repeated value with the left
keyframe's value."""

@usage
`cycle(start_frame, end_frame)` -> float

The repeated values are shifted so that each repeated portion has its
first value set to the last value of the previous cycle. If the start
frame is less than the end frame, the animation will cycle forwards.
Otherwise, it will cycle backwards.

This function is the same as hou.cyclet() except hou.cyclet() accepts


times instead of frames. If you want to repeat motion exactly, use the
hou.repeat() function instead.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]

http://www.sidefx.com/docs/houdini10.0/hom/hou/cycle (1 of 2) [12/7/2009 4:29:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/cycle

- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:cycle]

http://www.sidefx.com/docs/houdini10.0/hom/hou/cycle (2 of 2) [12/7/2009 4:29:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/cyclet

= hou.cyclet =

#type: homfunction
#cppname: hom::cyclet
#category: Channels

"""Repeats the motion


between two times, lining up the repeated values with the left
keyframe's value."""

@usage
`cyclet(start_time, end_time)` -> float

The repeated values are shifted so that each repeated portion has its
first value set to the last value of the previous cycle. If the start
frame is less than the end frame, the animation will cycle forwards.
Otherwise, it will cycle backwards.

This function is the same as hou.cycle() except hou.cycle() accepts


frames instead of times. If you want to repeat motion exactly, use the
hou.repeatt() function instead.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]

http://www.sidefx.com/docs/houdini10.0/hom/hou/cyclet (1 of 2) [12/7/2009 4:29:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/cyclet

- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:cyclet]

http://www.sidefx.com/docs/houdini10.0/hom/hou/cyclet (2 of 2) [12/7/2009 4:29:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ease

= hou.ease =

#type: homfunction
#cppname: hom::ease
#category: Channels

"""Interpolates
between the left keyframe's outgoing value and the right keyframe's
incoming value."""

@usage
`ease()` -> float

The tangents will be flat at both ends of the function,


so the curve will slowly ease from the left value and, near the end of
the function, slowly reduce the speed until it is at rest at the right
value.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ease (1 of 2) [12/7/2009 4:29:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ease

- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:ease]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ease (2 of 2) [12/7/2009 4:29:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/easein

= hou.easein =

#type: homfunction
#cppname: hom::easein
#category: Channels

"""Interpolates
between the left keyframe's outgoing value and the right keyframe's
incoming value."""

@usage
`easein()` -> float

The tangent will be flat at the left end of the


function, so it will slowly ease from the outgoing value of the left
keyframe.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]

http://www.sidefx.com/docs/houdini10.0/hom/hou/easein (1 of 2) [12/7/2009 4:29:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/easein

- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:easein]

http://www.sidefx.com/docs/houdini10.0/hom/hou/easein (2 of 2) [12/7/2009 4:29:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/easeinp

= hou.easeinp =

#type: homfunction
#cppname: hom::easeinp
#category: Channels

"""Interpolates
between the values of two keyframes."""

@usage
`easeinp(ease_speed)` -> float

This function is like [Hom:hou.easein], except it


has an additional parameter to say how fast the curve should ease into
the motion.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]

http://www.sidefx.com/docs/houdini10.0/hom/hou/easeinp (1 of 2) [12/7/2009 4:29:32 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/easeinp

- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:easeinp]

http://www.sidefx.com/docs/houdini10.0/hom/hou/easeinp (2 of 2) [12/7/2009 4:29:32 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/easeout

= hou.easeout =

#type: homfunction
#cppname: hom::easeout
#category: Channels

"""Interpolates
between the left keyframe's outgoing value and the right keyframe's
incoming value."""

@usage
`easeout()` -> float

The tangent will be flat at the right end of the


function, so it will slowly come to rest at the incoming value of the
right keyframe.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]

http://www.sidefx.com/docs/houdini10.0/hom/hou/easeout (1 of 2) [12/7/2009 4:29:33 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/easeout

- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:easeout]

http://www.sidefx.com/docs/houdini10.0/hom/hou/easeout (2 of 2) [12/7/2009 4:29:33 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/easeoutp

= hou.easeoutp =

#type: homfunction
#cppname: hom::easeoutp
#category: Channels

"""Interpolates
between the values of two keyframes."""

@usage
`easeoutp(ease_speed)` -> float

This function is like [Hom:hou.easeout], except it


has an additional parameter to say how fast the curve should ease into
the motion.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]

http://www.sidefx.com/docs/houdini10.0/hom/hou/easeoutp (1 of 2) [12/7/2009 4:29:33 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/easeoutp

- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:easeoutp]

http://www.sidefx.com/docs/houdini10.0/hom/hou/easeoutp (2 of 2) [12/7/2009 4:29:33 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/easep

= hou.easep =

#type: homfunction
#cppname: hom::easep
#category: Channels

"""Interpolates
between the values of two keyframes."""

@usage
`easep(ease_bias)` -> float

An ease bias of less than one slow


the animation near right keyframe, while an ease bias greater than one
will slow it near the left keyframe.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]

http://www.sidefx.com/docs/houdini10.0/hom/hou/easep (1 of 2) [12/7/2009 4:29:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/easep

- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:easep]

http://www.sidefx.com/docs/houdini10.0/hom/hou/easep (2 of 2) [12/7/2009 4:29:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/linear

= hou.linear =

#type: homfunction
#cppname: hom::linear
#category: Channels

"""Linearly
interpolates between the left keyframe's outgoing value and the right
keyframe's incoming value."""

@usage
`linear()` -> float

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]

http://www.sidefx.com/docs/houdini10.0/hom/hou/linear (1 of 2) [12/7/2009 4:29:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/linear

- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces

- [Exp:linear]

http://www.sidefx.com/docs/houdini10.0/hom/hou/linear (2 of 2) [12/7/2009 4:29:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/match

= hou.match =

#type: homfunction
#cppname: hom::match
#category: Channels

"""Creates a smooth
curve between the left keyframe's incoming slope and
the right keyframe's outgoing slope."""

@usage
`match()` -> float

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]

http://www.sidefx.com/docs/houdini10.0/hom/hou/match (1 of 2) [12/7/2009 4:29:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/match

- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces

- [Exp:match]

http://www.sidefx.com/docs/houdini10.0/hom/hou/match (2 of 2) [12/7/2009 4:29:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/matchin

= hou.matchin =

#type: homfunction
#cppname: hom::matchin
#category: Channels

"""Creates a straight
line from the left keyframe's incoming value, matching the left
keyframe's incoming slope."""

@usage
`matchin()` -> float

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]

http://www.sidefx.com/docs/houdini10.0/hom/hou/matchin (1 of 2) [12/7/2009 4:29:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/matchin

- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:matchin]

http://www.sidefx.com/docs/houdini10.0/hom/hou/matchin (2 of 2) [12/7/2009 4:29:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/matchout

= hou.matchout =

#type: homfunction
#cppname: hom::matchout
#category: Channels

"""Creates a straight
line from the right keyframe's outgoing value, matching the right
keyframe's outgoing slope."""

@usage
`matchout()` -> float

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]

http://www.sidefx.com/docs/houdini10.0/hom/hou/matchout (1 of 2) [12/7/2009 4:29:36 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/matchout

- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:matchout]

http://www.sidefx.com/docs/houdini10.0/hom/hou/matchout (2 of 2) [12/7/2009 4:29:36 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/qlinear

= hou.qlinear =

#type: homfunction
#cppname: hom::qlinear
#category: Channels

"""Linearly
interpolates between keyframes using quaternions."""

@usage
`qlinear()` -> float

The neighbouring
parameters must also be animated; for example, if "rx" uses qlinear(),
"ry" and "rz" should also use qlinear().

Because the interpolation is done in quaternion spaces, the orientations


will blend smoothly with no gimbal lock or unexpected spins. The Euler
rotation values may appear to jump suddenly, but that's simply because
different rotation values can represent the same orientation.

Note that the graph editor will display a qlinear() segment as a dashed
straight line. This line does not represent the actual intermediate
channel values, but it does give an accurate visual feel for the
behaviour of the interpolation.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]

http://www.sidefx.com/docs/houdini10.0/hom/hou/qlinear (1 of 2) [12/7/2009 4:29:36 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/qlinear

- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:qlinear]

http://www.sidefx.com/docs/houdini10.0/hom/hou/qlinear (2 of 2) [12/7/2009 4:29:36 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/quintic

= hou.quintic =

#type: homfunction
#cppname: hom::quintic
#category: Channels

"""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."""

@usage
`quintic()` -> float

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.repeat]

http://www.sidefx.com/docs/houdini10.0/hom/hou/quintic (1 of 2) [12/7/2009 4:29:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/quintic

- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:quintic]

http://www.sidefx.com/docs/houdini10.0/hom/hou/quintic (2 of 2) [12/7/2009 4:29:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/repeat

= hou.repeat =

#type: homfunction
#cppname: hom::repeat
#category: Channels

"""Repeats the motion between two times."""

@usage
`repeat(start_frame, end_frame)` -> float

The repeated values are repeated exactly. If you want to line up the
values with the value of the previous keyframe, use hou.cycle() instead.

This function is the same as hou.repeatt() except hou.repeatt() accepts


times instead of frames.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]

http://www.sidefx.com/docs/houdini10.0/hom/hou/repeat (1 of 2) [12/7/2009 4:29:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/repeat

- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:repeat]

http://www.sidefx.com/docs/houdini10.0/hom/hou/repeat (2 of 2) [12/7/2009 4:29:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/repeatt

= hou.repeatt =

#type: homfunction
#cppname: hom::repeatt
#category: Channels

"""Repeats the motion between two times."""

@usage
`repeatt(start_time, end_time)` -> float

The repeated values are repeated exactly. If you want to line up the
values with the value of the previous keyframe, use hou.cyclet()
instead.

This function is the same as hou.repeat() except hou.repeat() it accepts


frames instead of times.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]

http://www.sidefx.com/docs/houdini10.0/hom/hou/repeatt (1 of 2) [12/7/2009 4:29:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/repeatt

- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:repeatt]

http://www.sidefx.com/docs/houdini10.0/hom/hou/repeatt (2 of 2) [12/7/2009 4:29:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/spline

= hou.spline =

#type: homfunction
#cppname: hom::spline
#category: Channels

"""Fits a spline through consecutive keyframe values."""

@usage
`spline()` -> float

The resulting spline interpolates the channel values at the


keyframes, and slope values are not used.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]

http://www.sidefx.com/docs/houdini10.0/hom/hou/spline (1 of 2) [12/7/2009 4:29:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/spline

- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:spline]

http://www.sidefx.com/docs/houdini10.0/hom/hou/spline (2 of 2) [12/7/2009 4:29:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatch

= hou.vmatch =

#type: homfunction
#cppname: hom::vmatch
#category: Channels

"""Matches the incoming and outgoing values and slopes."""

@usage
`vmatch()` -> float

Unlike [Hom:hou.match], this function will use its left keyframe's outgoing
value and the right keyframe's incoming value, so hou.vmatch() can produce
curves that are discontinuous with the previous segment.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]
- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]

http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatch (1 of 2) [12/7/2009 4:29:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatch

- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]

@replaces

- [Exp:vmatch]

http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatch (2 of 2) [12/7/2009 4:29:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatchin

= hou.vmatchin =

#type: homfunction
#cppname: hom::vmatchin
#category: Channels

"""Matches the left


keyframe's incoming slope."""

@usage
`vmatchin()` -> float

The curve will be a straight line from the


left keyframe's outgoing value, and will not match the right keyframe's
outgoing value. Unlike the hou.matchin() function, the left keyframe's
outgoing value can differ from its incoming value, so so hou.vmatchin()
can produce curves whose left tangent matches the left keyframe but
whose left values do not line up.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]

http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatchin (1 of 2) [12/7/2009 4:29:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatchin

- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchout]

@replaces

- [Exp:vmatchin]

http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatchin (2 of 2) [12/7/2009 4:29:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatchout

= hou.vmatchout =

#type: homfunction
#cppname: hom::vmatchout
#category: Channels

"""Matches the right


keyframe's outgoing slope."""

@usage
`vmatchout()` -> float

The curve will be a straight line ending at


the right keyframe's incoming value, and will not match the left
keyframe's incoming value. Unlike the hou.matchout() function, the right
keyframe's incoming value can differ from its outgoing value, so so
hou.vmatchout() can produce curves whose right tangent matches the right
keyframe but whose right values do not line up.

This function is one of the special animation functions that use the
current playbar time and information in the parameter's keyframes, such
as in and out values, tangents, acceleration, etc., to evaluate
themselves. Because the information needed to evaluate these functions
comes from the keyframes, these functions take few or no parameters.

Calling this function from outside a parameter's expression will raise a


hou.NotAvailable exception.

@related

- [Hom:hou.bezier]
- [Hom:hou.constant]
- [Hom:hou.cubic]
- [Hom:hou.cycle]
- [Hom:hou.cyclet]
- [Hom:hou.ease]
- [Hom:hou.easein]
- [Hom:hou.easeinp]
- [Hom:hou.easeout]
- [Hom:hou.easeoutp]
- [Hom:hou.easep]
- [Hom:hou.linear]

http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatchout (1 of 2) [12/7/2009 4:29:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatchout

- [Hom:hou.match]
- [Hom:hou.matchin]
- [Hom:hou.matchout]
- [Hom:hou.qlinear]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]

@replaces

- [Exp:vmatchout]

http://www.sidefx.com/docs/houdini10.0/hom/hou/vmatchout (2 of 2) [12/7/2009 4:29:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/performance

= hou.performance =
#type: hommodule
#cppname: HOM_performance
#category: Cooking
#status: ni

@functions

::`enable(on)`:
#cppname: HOM_performance::enable
#status: ni

::`setCaptureSingleFrame(on)`:
#cppname: HOM_performance::setCaptureSingleFrame
#status: ni

::`setLogMode(mode)`:
#cppname: HOM_performance::setLogMode
#status: ni

::`setMonitorCook(on)`:
#cppname: HOM_performance::setMonitorCook
#status: ni

::`setMonitorFrameLength(on)`:
#cppname: HOM_performance::setMonitorFrameLength
#status: ni

::`setMonitorMemory(on)`:
#cppname: HOM_performance::setMonitorMemory
#status: ni

::`setMonitorObjectDisplay(on)`:
#cppname: HOM_performance::setMonitorObjectDisplay
#status: ni

::`setPause(on)`:
#cppname: HOM_performance::setPause
#status: ni

@replaces

http://www.sidefx.com/docs/houdini10.0/hom/hou/performance (1 of 2) [12/7/2009 4:29:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/performance

- [Cmd:performance]

http://www.sidefx.com/docs/houdini10.0/hom/hou/performance (2 of 2) [12/7/2009 4:29:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/recookNodesIfReferencedFilesChanged

= hou.recookNodesIfReferencedFilesChanged =

#type: homfunction
#cppname: hom::recookNodesIfReferencedFilesChanged
#category: Cooking
#status: ni

@usage
`recookNodesIfReferencedFilesChanged()`

@replaces
- [Cmd:opupdate]

http://www.sidefx.com/docs/houdini10.0/hom/hou/recookNodesIfReferencedFilesChanged [12/7/2009 4:29:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setHighlightNodesWhenCooking

= hou.setHighlightNodesWhenCooking =

#type: homfunction
#cppname: hom::setHighlightNodesWhenCooking
#category: Cooking
#status: ni

@usage
`setHighlightNodesWhenCooking(on)`

@replaces
- [Cmd:performance]

http://www.sidefx.com/docs/houdini10.0/hom/hou/setHighlightNodesWhenCooking [12/7/2009 4:29:42 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/showCookStatisticsInNodeInfo

= hou.showCookStatisticsInNodeInfo =

#type: homfunction
#cppname: hom::showCookStatisticsInNodeInfo
#category: Cooking
#status: ni

@usage
`showCookStatisticsInNodeInfo(on)`

@replaces
- [Cmd:performance]

http://www.sidefx.com/docs/houdini10.0/hom/hou/showCookStatisticsInNodeInfo [12/7/2009 4:29:42 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData

= hou.DopData =
#type: homclass
#cppname: HOM_DopData
#category: Dynamics

"""A piece of data stored inside a DOP network's simulation."""

Each DOP network builds a tree of data, and then Houdini examines and updates
this tree when it runs the simulation. DOP data elements can be DOP objects,
geometry, volumes, forces, solvers, etc. The data is arranged in a tree
structure, where child nodes are called subdata and are said to be attached
to their parent nodes. Under the root of the tree are usually the DOP objects
and data describing their relationships.

Note that the same piece of data can appear in the tree in multiple locations,
with different names. DopData objects thus do not store their name, and the
name of a piece of data in the tree is instead stored with its parent data(s).

Each piece of data can contain records, and each record stores a list of
name and value pairs called fields. Each record has a name, but it's possible
for multiple records with the same name to exist in the same piece of data. In
this case, the record also has an index, and you can think of the records as
rows of a spreadsheet.

@methods

::`subData(self)` -> dict of `str` to [Hom:hou.DopData]:


#cppname: HOM_DopData::subData
#replaces: Exp:dopsubdataname, Exp:dopnumsubdata
Return a dictionary mapping names to DOP data instances for the subdata
attached to this data.

{{{
#!pycon
# The following code assumes you have created a box from the shelf and used
# Rigid Bodies > RBD Object on the shelf to make it a rigid body.
>>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0]
>>> obj
<hou.DopObject box_object1 id 0>
>>> obj.recordTypes()
('Basic', 'Options', 'RelInGroup', 'RelInAffectors')
>>> record = obj.record("Options")
>>> record.fieldNames()
('name', 'groups', 'affectors', 'affectorids', 'objid')
>>> record.field("name")
'box_object1'

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData (1 of 7) [12/7/2009 4:29:44 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData

>>> obj.subData().keys()
['PhysicalParms', 'ODE_Body', 'Solver', 'Geometry', 'SolverParms', 'ODE_Geometry', 'Forces', 'Position', 'Colliders']
>>> obj.findSubData("Forces/Gravity_gravity1")
<hou.DopData of type SIM_ForceGravity>
>>> obj.findSubData("Forces/Gravity_gravity1").options().field("force")
<hou.Vector3 [0, -9.80665, 0]>
}}}

::`findSubData(self, data_spec)` -> [Hom:hou.DopData] or `None`:


#cppname: HOM_DopData::findSubData
#replaces: Exp:dophassubdata
Return the DOP data with the given name that is attached to this DOP data,
or `None` if no such data exists. Note that the name may also be a
slash-separated path to nested subdata.

See [Hom:hou.DopData#subData] for an example.

This method can be approximately implemented as follows:


{{{
#!python
def findSubData(self, data_spec):
data = self
for name in data_spec.split("/"):
if name not in data.subData():
return None
data = data.subData()[name]
return data
}}}

::`findAllSubData(self, data_spec, recurse=False)` -> dict of `str` to [Hom:hou.DopData]:


#cppname: HOM_DopData::findAllSubData
Given a pattern, return a dictionary mapping subdata paths to DOP data
instances for all the subdatas whose name matches the pattern. If
`recurse` is `True`, all grandchildren subdata will be added to the result.

{{{
#!pycon
# The following code assumes you have created a box from the shelf and used
# Rigid Bodies > RBD Object on the shelf to make it a rigid body.
>>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0]
>>> obj.findAllSubData("S*").keys()
['SolverParms', 'Solver']
>>> obj.findAllSubData("S*", recurse=True).keys()
['SolverParms', 'Solver/Random', 'SolverParms/ActiveValue', 'Solver']
>>> obj.findAllSubData("S*/*", recurse=True).keys()
['SolverParms/ActiveValue', 'Solver/Random']
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData (2 of 7) [12/7/2009 4:29:44 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData

::`dataType(self)` -> `str`:


#cppname: HOM_DopData::dataType
Return a string describing the type of data this object contains.

{{{
#!pycon
>>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0]
>>> obj.dataType()
'SIM_Object'
}}}

See also [Hom:hou.DopData#dataTypeObject].

::`dataTypeObject(self)` -> [Hom:hou.DopDataType] or `None`:


#cppname: HOM_DopData::dataTypeObject
#status: ni
Return the [Hom:hou.DopDataType] object corresponding to this object's
data type, or `None` if there is no corresponding [Hom:hou.DopDataType]
instance. Most type names do have a corresponding type object.

This method can be approximately implemented as follows:


{{{
#!python
def dataTypeObject(self):
return hou.dop.findDataType(self.dataType())
}}}

See also [Hom:hou.DopData#dataType].

::`recordTypes(self)` -> `tuple` of `str`:


#cppname: HOM_DopData::recordTypes
#replaces: Exp:dopnumrecordtypes, Exp:doprecordtypename
Return a tuple of strings containing the record types stored inside this
DOP data. Each DOP data contains records named "Basic" and "Options", and
some types of DOP data contain additional records.

::`record(self, record_type, record_index=0)` -> [Hom:hou.DopRecord]:


#cppname: HOM_DopData::record
#replaces: Exp:dopfield
Given a record type name return that record, or `None` if no record exists
with that name. If this DOP data contains multiple records with this
record type name you can think of each record as a row in a spreadsheet,
and `record_index` determines which one is returned. Use
`len(self.records(record_type))` to determine how many records of this type
are in this DOP data.

Use [Hom:hou.DopData#recordTypes] to get a tuple of record types in a DOP


data. See also [Hom:hou.DopData#records] for an example, and see

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData (3 of 7) [12/7/2009 4:29:44 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData

[Hom:hou.DopData#options] for a way to easily access the "Options" record.

::`records(self, record_type)` -> `tuple` of [Hom:hou.DopRecord]:


#cppname: HOM_DopData::records
#replaces: Exp:dopnumrecords
Return a tuple of all the records of this record type. See also
[Hom:hou.DopData#record].

This example lists the input affectors for a rigid body box that collides
with a ground plane:
{{{
#!pycon
>>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[-1]
>>> obj.records("RelInAffectors")
(<hou.DopRecord of type RelInAffectors index 0>, <hou.DopRecord of type RelInAffectors index 1>)
>>> [record.field("relname") for record in obj.records("RelInAffectors")]
['merge1', 'staticsolver1_staticsolver1']
>>> obj.record("RelInAffectors", 1).field("relname")
'staticsolver1_staticsolver1'
}}}

::`options(self)` -> [Hom:hou.DopRecord]:


#cppname: HOM_DopData::options
#replaces: Exp:dopoption, Exp:dopoptions
Return the Options record. This method is a shortcut for
`self.record("Options")`.

::`dopNetNode(self)` -> [Hom:hou.Node]:


#cppname: HOM_DopData::dopNetNode
Return the DOP network node containing this DOP data.

::`simulation(self)` -> [Hom:hou.DopSimulation]:


#cppname: HOM_DopData::simulation
Return the DOP simulation containing this DOP data. This method is a
shortcut for `self.dopNetNode().simulation()`.

::`creator(self)` -> [Hom:hou.DopNode]:


#cppname: HOM_DopData::creator
Return the DOP node that created this DOP data inside the DOP network.

::`id(self)` -> `str`:


#cppname: HOM_DopData::id
Return the globally unique identifier (GUID) for this DOP data. This
method is a shortcut for `self.record("Basic").field("uniqueid")`.

If you want an object's index, [Hom:hou.DopObject#objid].

{{{

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData (4 of 7) [12/7/2009 4:29:44 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData

#!pycon
>>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0]
>>> obj.id()
'0xD011E41C-0x000034AE-0x494C12E4-0x000018B9'
>>> obj.objid()
0
}}}

::`save(self, file_path)`:
#cppname: HOM_DopData::save
#replaces: Cmd:dopsavedata
#status: ni
Save this DOP data to a file. You can load in this data using a File Data
DOP.

You might use this method to cache data that takes a long time to generate
and is only generated once at the start of a simulation, such as the volume
representation of an object for collision detection. You would then modify
your DOP network to use a File Data DOP to read in that data instead of
computing it.

Raises [Hom:hou.OperationFailed] if the file could not be created.

::`createSubData(self, data_name, data_type, avoid_name_collisions=False)` -> [Hom:hou.DopData]:


#cppname: HOM_DopData::addSubData
#replaces: Cmd:dopsolveadddata
Create subdata under this data with the specified name and type. You would
call this method from a script solver DOP.

`data_name`:
The name of the new data. Note that this name may contain slashes to
create subdata on existing data.

`data_type`:
Either the name of the data type to create or a [Hom:hou.DopDataType]
instance.

`avoid_name_collisions`:
If True and data with the specified name exists, Houdini will create
a unique name that does not conflict with any existing data.

Raises [Hom:hou.OperationFailed] if data with this name already exists. If


you want to replace existing data it is up to you to first call
[Hom:hou.DopData#removeData].

Raises [Hom:hou.PermissionError] if called from outside a script solver


DOP.

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData (5 of 7) [12/7/2009 4:29:44 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData

Use [Hom:hou.DopData#attachSubData] to create a reference to existing data.


See [Hom:hou.DopData#copyContentsFrom] for an example of how to create a
copy of existing data.

::`attachSubData(self, data, new_data_name, avoid_name_collisions=False)`:


#cppname: HOM_DopData::attachSubData
#replaces: Cmd:dopsolvecopydata
Make existing data become subdata of this data. Houdini does not create
a duplicate of the data. Instead, the data's parent(s) and this data will
both refer to the same instance of subdata. You would call this method
from a script solver DOP.

`data`:
The DopData that will become subdata of this data.

`new_data_name`:
The name of the new subdata.

`avoid_name_collisions`:
If True and data with the specified name exists, Houdini will create
a unique name that does not conflict with any existing data.

Raises [Hom:hou.OperationFailed] if data with this name already exists. If


you want to replace existing data it is up to you to first call
[Hom:hou.DopData#removeData].

Raises [Hom:hou.PermissionError] if called from outside a script solver


DOP.

See [Hom:hou.DopData#copyContentsFrom] for an example of how to create a


copy of existing data.

::`removeSubData(self, data_spec)`:
#cppname: HOM_DopData::removeSubData
#replaces: Cmd:dopsolveremovedata
Remove subdata with the given name. Raises [Hom:hou.PermissionError] if
called from outside a script solver DOP.

Raises [Hom:hou.OperationFailed] if data with that name already exists.

::`copyContentsFrom(self, data)`:
#cppname: HOM_DopData::copyContentsFrom
#replaces: Cmd:dopsolveadddata
Copy the contents of the given DopData into this one, adapting the data
if it is of a different type. You would call this method from a script
solver DOP.

Raises [Hom:hou.PermissionError] if called from outside a script solver

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData (6 of 7) [12/7/2009 4:29:44 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData

DOP.

Use this method along with [Hom:hou.DopData#createSubData] to copy existing


subdata:
{{{
#!python
def copySubData(new_parent_data, data_to_copy, new_data_name, avoid_name_collisions=False):
'''Create a copy of data and attach it to other data.'''
new_data = new_parent_data.createSubData(new_data_name, data_to_copy.dataType(), avoid_name_collisions)
new_data.copyContentsFrom(data_to_copy)
return new_data
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopData (7 of 7) [12/7/2009 4:29:44 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopDataType

= hou.DopDataType =
#type: homclass
#cppname: HOM_DopDataType
#category: Dynamics
#status: ni

"""Describes the type of data in a DOP object."""

See [Hom:hou.DopData#dataTypeObject] for a function that retrieves a


DopDataType instance from a [Hom:hou.DopData] instance. Note that not all
DOP data type names have a corresponding DopDataType instance.

@methods

::`name(self)`:
#cppname: HOM_DopDataType::name
#status: ni
Return the name of this data type.

{{{
#!pycon
>>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0]
>>> obj.dataTypeObject().name()
'SIM_Object'
}}}

::`nodeType(self)` -> [Hom:hou.NodeType]:


#cppname: HOM_DopDataType::nodeType
#replaces: Cmd:dopdatatypes
#status: ni
Return the DOP node type that creates this DOP data type.
{{{
#!pycon
>>> hou.dop.findDataType("SIM_SDF").nodeType()
<hou.NodeType for Dop volume>
}}}

::`allowedChildData(self)` -> tuple of [Hom:hou.DopDataType]:


#cppname: HOM_DopDataType::allowedChildData
#replaces: Cmd:dopdatahint
#status: ni
Return a tuple of DopDataTypes that are allowed to be attached as subdata

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopDataType (1 of 3) [12/7/2009 4:29:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopDataType

to instances of this data type.

These allowed child data types give hints to Houdini to prevent you from
accidentally building DOP networks that attach DOP data to the wrong
location. Houdini will validate the network and flag possible mistakes
when the "Provide Data Hints" option is on.

Houdini also uses this information to decide how many data inputs to
display on DOP nodes and how to label those inputs.

The default data hints are stored in `$HFS/houdini/scripts/dophints.cmd`.

See also [Hom:hou.DopDataType#maxNumAllowedChildData] and


[Hom:hou.DopDataType#allowedChildDataName].

::`maxNumAllowedChildData(self, type)` -> `int` or `None`:


#cppname: HOM_DopDataType::maxNumAllowedChildData
#replaces: Cmd:dopdatahint
#status: ni
Given a DopDataType, return the maximum number of allowed children of
that type, or `None` if there is no maximum. If the type is not allowed
at all, return 0.

See also [Hom:hou.DopDataType#allowedChildData] and


[Hom:hou.DopDataType#allowedChildDataName].

::`allowedChildDataName(self, type)` -> `str` or `None`:


#cppname: HOM_DopDataType::maxNumAllowedChildData
#replaces: Cmd:dopdatahint
#status: ni
Given a DopDataType, return what any subdata of that type must be named,
or `None` if there is no name restriction.

See also [Hom:hou.DopDataType#allowedChildData] and


[Hom:hou.DopDataType#maxNumAllowedChildData].

::`addAllowedChildData(self, dop_data_type, max_num=None, child_name=None)`:


#cppname: HOM_DopDataType::addAllowedChildDataType
#replaces: Cmd:dopdatahint
#status: ni
Allow a DOP data type to be a child of this one, with possible restrictions.

`max_num`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopDataType (2 of 3) [12/7/2009 4:29:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopDataType

If not `None`, the maximum allowed number of children of this type.


If `None`, there is no maximum.

`child_name`:
If not `None`, the subdata must have this name when added as a child.
If `None`, there are no name restrictions.

See [Hom:hou.DopDataType#allowedChildData] for more information.

::`removeAllowedChildData(self, dop_data_type)`:
#cppname: HOM_DopDataType::removeAllowedChildDataType
#replaces: Cmd:dopdatahint
#status: ni
No longer allow a particular DOP data type to be a child of this one. See
[Hom:hou.DopDataType#allowedChildData] and
[Hom:hou.DopDataType#addAllowedChildData] for more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopDataType (3 of 3) [12/7/2009 4:29:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopNetNode

= hou.DopNetNode =
#type: homclass
#cppname: HOM_DopNetNode
#superclass: hou.Node
#category: Dynamics

"""Represents a dynamics (DOP) network node."""

The DOP nodes inside this network add an modify the DOP data that contains
a single simulation.

@methods

::`simulation(self)` -> [Hom:hou.DopSimulation]:


#cppname: HOM_DopNetNode::simulation
Return the simulation defined by this DOP network node.

::`findNodesThatProcessedObject(self, dop_object)` -> `tuple` of [Hom:hou.DopNode]:


#cppname: HOM_DopNetNode::findNodesThatProcessedObject
#replaces: Exp:dopnodeobjs
Given a [Hom:hou.DopObject], return a tuple of DOP nodes that processed
that object.

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopNetNode [12/7/2009 4:29:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopNode

= hou.DopNode =
#type: homclass
#cppname: HOM_DopNode
#superclass: hou.Node
#category: Dynamics

"""Represents a dynamics node."""

@methods

::`processedObjects(self)` -> `tuple` of [Hom:hou.DopObject]:


#cppname: HOM_DopNode::processedObjects
Return a tuple of DOP objects that this DOP node processes.

::`createdObjects(self)` -> `tuple` of [Hom:hou.DopObject]:


#cppname: HOM_DopNode::createdObjects
#replaces: Exp:dopobjscreatedby
Return a tuple of DOP objects that this DOP node creates.

::`dopNetNode(self)` -> [Hom:hou.DopNetNode]:


#cppname: HOM_DopNode::dopNetNode
Return the DOP network node that contains this dop node.

::`simulation(self)` -> [Hom:hou.DopSimulation]:


#cppname: HOM_DopNode::simulation
Return the simulation that this node contributes to. This method is
a shortcut for `self.dopNetNode().simulation()`.

::`isDisplayFlagSet(self)` -> `bool`:


#cppname: HOM_DopNode::isDisplayFlagSet
#replaces: Cmd:opget
Return whether this node's display flag is on.

::`displayNode(self)` -> [Hom:hou.Node] or `None`:


#cppname: HOM_DopNode::displayNode
If this node is a subnet (i.e. it contains child nodes), return the child
that has its display flag set, or `None` if there are no children.
Otherwise, return `None`.

::`setDisplayFlag(self, on)`:
#cppname: HOM_DopNode::setDisplayFlag
#replaces: Cmd:opset

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopNode (1 of 2) [12/7/2009 4:29:46 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopNode

Turn the node's display flag on or off.

::`bypass(self, on)`:
#cppname: HOM_DopNode::bypass
Turn the node's bypass flag on or off, making this node have no effect.

::`isBypassed(self)` -> `bool`:


#cppname: HOM_DopNode::isBypassed
#replaces: Exp:opflag
Returns whether the node's bypass flag is on.

::`objectsToProcess(self)` -> `tuple` of [Hom:hou.DopObject]:


#cppname: HOM_DopNode::objectsToProcess
Return a tuple of DOP objects that this node should process. Raises
[Hom:hou.PermissionError] if called from outside a DOP implemented in
Python.

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopNode (2 of 2) [12/7/2009 4:29:46 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopObject

= hou.DopObject =
#type: homclass
#cppname: HOM_DopObject
#superclass: hou.DopData
#category: Dynamics

"""A type of DOP data that contains an object in the simulation."""

This object might be a rigid body, a fluid, cloth, etc. The type and
properties of the DOP object are determined by the subdata attached to the
object.

@methods

::`name(self)` -> `str`:


#cppname: HOM_DopObject::name
#replaces: Exp:dopnodeobjs
Return the name of this DOP object.

::`matches(self, pattern)` -> `bool`:


#cppname: HOM_DopObject::matches
Return whether or not this object's name matches a pattern. `*` will
match any number of characters and `?` will match any single character.
The pattern string contains only one pattern, so spaces in the pattern
will be compared against the object name.

{{{
#!pycon
>>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0]
>>> obj.name()
'box_object1'
>>> obj.matches("box*")
True
>>> obj.matches("c*")
False
>>> obj.matches("box* b*")
False
>>> obj.matches("b?x_object1")
True
}}}

::`objid(self)` -> `int`:


#cppname: HOM_DopObject::objid
Return the index of this object in the output from
[Hom:hou.DopSimulation#objects]. This method is a shortcut for
`self.options().field("objid")`.

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopObject (1 of 2) [12/7/2009 4:29:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopObject

See [Hom:hou.DopData#id] for an example.

Some fields in DOP records store an objid to refer to other objects.


The following function looks up an object by objid:
{{{
#!python
def findObjectByObjid(dopnet_node, objid):
return dopnet_node.simulation().objects()[objid]
}}}

::`areObjectsAffectors(self, object_sequence)`:
#cppname: HOM_DopObject::areObjectsAffectors
#replaces: Exp:dopobjectsareaffectors
#status: ni
Given a sequence of DOP objects, return whether or not all of those obejcts
are affectors of this object.

::`velocityAtPosition(self, position, use_point_velocity=True, use_volume_velocity=False)` -> [Hom:hou.Vector4]:


#cppname: HOM_DopObject::velocityAtPosition
#replaces: Exp:dopvelatpos
#status: ni
Given a [Hom:hou.Vector3] position, return the velocity at that position
in the simulation. This method accounts for the velocity and angular
velocity store in the object's "Position" data.

`use_volume_velocity`:
Whether or not the velocity is affected by the volumetric
representation of the geometry.

`use_point_velocity`:
Whether or not the velocity is affected by the velocity attribute
on the object's geometry. When used, Houdini adds this velocity to
the velocity in the Position data.

If both `use_volume_velocity` and `use_point_velocity` are set then


the volume velocity is used.

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopObject (2 of 2) [12/7/2009 4:29:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopObjectGroup

= hou.DopObjectGroup =
#type: homclass
#cppname: HOM_DopObjectGroup
#category: Dynamics
#status: ni

@methods

::`name(self)`:
#cppname: HOM_DopObjectGroup::name
#status: ni

::`objects(self)` -> tuple of DopObjects:


#cppname: HOM_DopObjectGroup::objects
#status: ni

::`containsObject(self, dop_object)`:
#cppname: HOM_DopObjectGroup::containsObject
#replaces: Exp:dopgrouphasobject
#status: ni

::`isMutuallyAffecting(self)`:
#cppname: HOM_DopObjectGroup::isMutuallyAffecting
#replaces: Exp:dopgroupismutual
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopObjectGroup [12/7/2009 4:29:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopRecord

= hou.DopRecord =
#type: homclass
#cppname: HOM_DopRecord
#category: Dynamics

"""A table of values stored inside a DopData."""

See [Hom:hou.DopData] for a description of DOP data, records, and fields.

@methods

::`field(self)` -> `int`, `bool`, `float`, `str`, [Hom:hou.Vector2], [Hom:hou.Vector3], [Hom:hou.Vector4], [Hom:hou.Quaternion], [Hom:hou.Matrix3], or [Hom:hou.Matrix4]:
#cppname: HOM_DopRecord::field
#replaces: Exp:dopfield, Exp:dopfields, Exp:doptransform
Return the value of a field inside this record, or `None` if no such field
exists.

Note that you can add the suffixes "x", "y", and "z" to a vector field's
name to access the individual float values.

{{{
#!pycon
# The following code assumes you have created a box from the shelf and used
# Rigid Bodies > RBD Object on the shelf to make it a rigid body.
>>> record = hou.node("/obj/AutoDopNetwork").simulation().findData("box_object1/Forces/Gravity_gravity1").options()
>>> record.fieldNames()
('force', 'handlepos')
>>> record.field("force")
<hou.Vector3 [0, -9.80665, 0]>
>>> record.field("forcey")
-9.8066501617431641
>>> record.fieldType("force")
fieldType.Vector3
>>> record.fieldType("forcey")
fieldType.Float
}}}

This example function creates a dict out of a record:


{{{
#!python
def recordAsDict(record):
return dict((field_name, record.field(field_name))
for field_name in record.fieldNames())

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopRecord (1 of 3) [12/7/2009 4:29:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopRecord

}}}

The following function implements the equivalent of the [Exp:doptransform]


hscript expression function:
{{{
#!python
def dopTransform(dopnet_node, object_name, subdata_name="Geometry"):
subdata = dopnet_node.simulation().findObject(object_name).findSubData(subdata_name)
return subdata.record("Transform").field("transform")
}}}

::`fieldNames(self)` -> tuple of `str`:


#cppname: HOM_DopRecord::fieldNames
#replaces: Exp:dopallfields, Exp:dopfieldname, Exp:dophasfield, Exp:dopnumfields
Return the names of all the fields inside this record. See
[Hom:hou.DopRecord#field] for an example.

::`fieldType(self, field_name)` -> [Hom:hou.fieldType] enum value:


#cppname: HOM_DopRecord::fieldType
#replaces: Exp:dopfieldtype, Exp:dophasfield
Return a [Hom:hou.fieldType] enumerated value that describes the type
of data stored in a field. Returns `hou.fieldType.NoSuchField` if
no field exists with that name.

See [Hom:hou.DopRecord#field] for an example.

::`recordIndex(self)` -> `int`:


#cppname: HOM_DopRecord::recordIndex
Return the index of this record. See [Hom:hou.DopData#record] and
[Hom:hou.DopData#records] for more information.

::`recordType(self)` -> `str`:


#cppname: HOM_DopRecord::recordType
Return the name of this record. See [Hom:hou.DopData#recordTypes] for
more information.

::`setField(self, value)`:
#cppname: HOM_DopRecord::field
#replaces: Cmd:dopsolvesetoption
Set a field to the specified value. You would call this method from a
script solver DOP. `value` may be an `int`, `float`, `str`,
[Hom:hou.Vector2], [Hom:hou.Vector3], [Hom:hou.Vector4],
[Hom:hou.Quaternion], [Hom:hou.Matrix3], or [Hom:hou.Matrix4].

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopRecord (2 of 3) [12/7/2009 4:29:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopRecord

Unfortunately, this method cannot be used to set a field to a boolean


(True or False) value. If you pass a boolean to this method, it will set
the field to the integer 1 or 0. To properly set it to a boolean value,
use [Hom:hou.DopRecord#setFieldBool].

Raises [Hom:hou.PermissionError] if called from outside a script solver


DOP.

::`setFieldBool(self, value)`:
#cppname: HOM_DopRecord::field
#replaces: Cmd:dopsolvesetoption
Set a field to the specified boolean value. You would call this method
from a script solver DOP.

To set a field to a different type, use [Hom:hou.DopRecord#setField].

Raises [Hom:hou.PermissionError] if called from outside a script solver


DOP.

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopRecord (3 of 3) [12/7/2009 4:29:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopRelationship

= hou.DopRelationship =
#type: homclass
#cppname: HOM_DopRelationship
#superclass: hou.DopData
#category: Dynamics

"""A type of DOP data that stores which DOP objects affect one another."""

In addition to the "Basic" and "Options" records, a DopRelationship contains


"ObjInAffectors" and "ObjInGroup" records. The former contains the objects
doing the affecting and the latter contains the objects being affected.

See [Hom:hou.DopSimulation#relationships] for an example.

@methods

::`name(self)` -> `str`:


#cppname: HOM_DopRelationship::name
Return the name of this DOP relationship.

::`matches(self, pattern)` -> `bool`:


#cppname: HOM_DopRelationship::matches
Return whether or not this relationship's name matches a pattern. See
[Hom:hou.DopObject#matches] for more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopRelationship [12/7/2009 4:29:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopSimulation

= hou.DopSimulation =
#type: homclass
#cppname: HOM_DopSimulation
#category: Dynamics

"""A dynamics simulation contained inside a DOP network node."""

See [Hom:hou.DopData] for more information about the contents of a DOP


simulation.

@methods

::`findData(self, data_spec)` -> [Hom:hou.DopData] or `None`:


#cppname: HOM_DopSimulation::findData
Return the DOP data with the given name. Note that the name may also be a
slash-separated path to nested subdata.

Note that this method returns `None` if the data name refers to a DOP
object. Use [Hom:hou.DopSimulation#findObject] to look up DOP objects.

See also [Hom:hou.DopData#findSubData].

::`findAllData(self, data_spec)` -> tuple of [Hom:hou.DopData]:


#cppname: HOM_DopSimulation::findAllData
Given a pattern, return a tuple of DOP data whose names match the pattern.
See also [Hom:hou.DopSimulation#findData].

::`objects(self)` -> tuple of [Hom:hou.DopData]:


#cppname: HOM_DopSimulation::objects
#replaces: Exp:dopnumobjects, Exp:dopnodeobjs
Return a tuple of all the DOP objects in the simulation.

You cannot index into this list using the object ID (see
[Hom:hou.DopObject#objid]). To create a dictionary mapping object IDs to
[Hom:hou.DopObject]s, do this:

{{{
#!python
id_dict = dict((obj.objid(), obj) for obj in simulation.objects())
}}}

::`findObject(self, obj_spec)` -> [Hom:hou.DopObject] or `None`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopSimulation (1 of 4) [12/7/2009 4:29:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopSimulation

#cppname: HOM_DopSimulation::findObject
Return the DOP object with the given name, or `None` if no object exists
with that name. See also [Hom:hou.DopSimulation#findData] and
[Hom:hou.DopSimulation#objects].

::`findAllObjects(self, obj_spec)` -> tuple of [Hom:hou.DopObject]:


#cppname: HOM_DopSimulation::findAllObjects
#replaces: Exp:dopobjectlist
Given a pattern, return a tuple of DOP objects whose names match the
pattern.

{{{
#!pycon
>>> simulation = hou.node("/obj/AutoDopNetwork").simulation()
>>> [obj.name() for obj in simulation.findAllObjects("box_object?")]
['box_object1', 'box_object2']
>>> [obj.name() for obj in simulation.findAllObjects("o* b*")]
['obj1', 'obj2', 'box_object1', 'box_object2']
}}}

::`relationships(self)` -> tuple of [Hom:hou.DopRelationship]:


#cppname: HOM_DopSimulation::relationships
Return a tuple of [Hom:hou.DopRelationship] objects for all the DOP
relationships in the simulation.

{{{
#!pycon
# The following example assumes you have created two box objects and made
# them rigid bodies.
>>> simulation = hou.node("/obj/AutoDopNetwork").simulation()
>>> relationship = simulation.relationships()[1]
>>> affecting_objects = [
... simulation.objects()[record.field("objid")]
... for record in relationship.records("ObjInAffectors")]
>>> [obj.name() for obj in affecting_objects]
['box_object1']
>>> affected_objects = [
... simulation.objects()[record.field("objid")]
... for record in relationship.records("ObjInGroup")]
>>> [obj.name() for obj in affected_objects]
['box_object2']
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopSimulation (2 of 4) [12/7/2009 4:29:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopSimulation

::`findRelationship(self, rel_spec)` -> [Hom:hou.DopRelationship]:


#cppname: HOM_DopSimulation::findRelationship
Find a DOP relationship by name. Return None if no such relationship
with that name exists. See also [Hom:hou.DopSimulation#relationships].

::`findAllRelationships(self, rel_spec)` -> tuple of [Hom:hou.DopRelationship]:


#cppname: HOM_DopSimulation::findAllRelationships
Return a tuple of [Hom:hou.DopRelationship] objects whose names match
a pattern. See also [Hom:hou.DopSimulation#relationships] and
[Hom:hou.DopSimulation#findRelationship].

::`dopNetNode(self)` -> [Hom:hou.Node]:


#cppname: HOM_DopSimulation::dopNetNode
Return the DOP network node containing this simulation.

::`save(self, file_name)`:
#cppname: HOM_DopSimulation::save
#replaces: Cmd:dopsave
#status: ni
Save the contents of this simulation to a `.sim` file that you can load
in with a file DOP.

::`time(self)`:
#cppname: HOM_DopSimulation::time
#replaces: Exp:doptime
#status: ni
Return the simulation's current time. This value is often the same
as [Hom:hou.time], unless the `Time Scale` or `Offset Time` parameters
of the DOP network have been changed from their default values.

::`frame(self)`:
#cppname: HOM_DopSimulation::frame
#replaces: Exp:dopframe
#status: ni
Return the simulation's current frame. This value is often the same
as [Hom:hou.frame], unless the `Time Scale` or `Offset Time` parameters
of the DOP network have been changed from their default values.

This method is a shortcut for `hou.timeToFrame(self.time())`.

::`globalTimeToSimTime(self, global_time)`:
#cppname: HOM_DopSimulation::globalTimeToSimTime
#replaces: Exp:dopttost

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopSimulation (3 of 4) [12/7/2009 4:29:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/DopSimulation

#status: ni
Given a global (playbar time), return the corresponding simulation time.
See [Hom:hou.DopSimulation#time] for more information.

::`globalFrameToSimTime(self, global_frame)`:
#cppname: HOM_DopSimulation::simFrameToSimTime
#replaces: Exp:dopframetost
#status: ni
Given a global (playbar frame), return the corresponding simulation frame.
See [Hom:hou.DopSimulation#frame] for more information.

::`simTimeToGlobalTime(self, sim_time)`:
#cppname: HOM_DopSimulation::simTimeToGlobalTime
#status: ni
Given a simulation time, return the corresponding global (playbar) time.
See [Hom:hou.DopSimulation#time] for more information.

::`simTimeToGlobalFrame(self, sim_time)`:
#cppname: HOM_DopSimulation::simTimeToSimFrame
#replaces: Exp:dopsttoframe
#status: ni
Given a simulation frame, return the corresponding global (playbar) frame.
See [Hom:hou.DopSimulation#frame] for more information.

::`objectGroups(self)` -> `tuple` of [Hom:hou.DopObjectGroup]:


#cppname: HOM_DopSimulation::objectGroups
#replaces: Exp:dopgrouplist
#status: ni
Return a tuple of [Hom:hou.DopObjectGroup] objects for the DOP object
groups in this simulation.

::`findObjectGroup(self, name)` -> DopObjectGroup or None:


#cppname: HOM_DopSimulation::findObjectGroup
#replaces: Exp:dopgrouphasobject
#status: ni
Given a DOP object group name, return the corresponding
[Hom:hou.DopObjectGroup], or None if no such group exists.

http://www.sidefx.com/docs/houdini10.0/hom/hou/DopSimulation (4 of 4) [12/7/2009 4:29:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/currentDopNet

= hou.currentDopNet =
#type: homfunction
#cppname: hom::currentDopNet
#category: Dynamics
#status: nd

@usage
`currentDopNet()` -> DopNetNode

http://www.sidefx.com/docs/houdini10.0/hom/hou/currentDopNet [12/7/2009 4:29:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/dop

= hou.dop =
#type: hommodule
#cppname: HOM_dop
#category: Dynamics

"""DOP related functions."""

@functions

::`dataTypes()` -> `tuple` of [Hom:hou.DopDataType]:


#cppname: HOM_dop::dataTypes
#replaces: Cmd:dopdatatypes
#status: ni
Return a tuple of all the [Hom:hou.DopDataType] objects. See
[Hom:hou.DopDataType] for more information.

::`findDataType(name)` -> [Hom:hou.DopDataType] or `None`:


#cppname: HOM_dop::findDataType
#replaces: Cmd:dopdatahint
#status: ni
Return the [Hom:hou.DopDataType] object corresponding to the given DOP data
type name.

{{{
#!pycon
>>> hou.dop.findDataType("SIM_Geometry")
<hou.DopDataType SIM_Geometry>
}}}

::`scriptSolverNetwork()` -> [Hom:hou.DopNetNode] or `None`:


#cppname: HOM_dop::scriptSolverNetwork
#replaces: Exp:dopsolvedopnet
Return the DOP network node that contains the script solver DOP that is
current running, or `None` if not script solver is running. You would call
this function from a script solver DOP.

::`scriptSolverObjects()` -> `tuple` of [Hom:hou.DopObject]:


#cppname: HOM_dop::scriptSolverObjects
#replaces: Exp:dopsolveobject, Exp:dopsolvenumobjects
Return a tuple of DOP objects being solved by the current script solver
DOP. If no script solver is running, returns an empty tuple.

http://www.sidefx.com/docs/houdini10.0/hom/hou/dop (1 of 2) [12/7/2009 4:29:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/dop

::`scriptSolverTimestepSize()` -> `float`:


#cppname: HOM_dop::scriptSolverTimestepSize
#replaces: Exp:dopsolvetimestep
Return the timestep size for the script solver that is currenting running,
or 0.0 if no script solver is running.

http://www.sidefx.com/docs/houdini10.0/hom/hou/dop (2 of 2) [12/7/2009 4:29:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/dopDataTypes

= hou.dopDataTypes =

#type: homfunction
#cppname: hom::dopDataTypes
#category: Dynamics
#status: ni

@usage
`dopDataTypes()` -> tuple of DopDataTypes

http://www.sidefx.com/docs/houdini10.0/hom/hou/dopDataTypes [12/7/2009 4:29:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/fieldType

= hou.fieldType =
#type: hommodule
#cppname: HOM_fieldType
#category: Dynamics
#status: nd

"""Enumeration of field types."""

* hou.field.TypeNoSuchField
* hou.field.TypeInteger
* hou.field.TypeBoolean
* hou.field.TypeFloat
* hou.field.TypeString
* hou.field.TypeVector2
* hou.field.TypeVector3
* hou.field.TypeVector4
* hou.field.TypeQuaternion
* hou.field.TypeMatrix3
* hou.field.TypeMatrix4
* hou.field.TypeUV
* hou.field.TypeUVW

http://www.sidefx.com/docs/houdini10.0/hom/hou/fieldType [12/7/2009 4:29:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setCurrentDopNet

= hou.setCurrentDopNet =
#type: homfunction
#cppname: hom::setCurrentDopNet
#category: Dynamics
#status: nd

@usage
`setCurrentDopNet(dopnet)`

http://www.sidefx.com/docs/houdini10.0/hom/hou/setCurrentDopNet [12/7/2009 4:29:52 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setSimulationEnabled

= hou.setSimulationEnabled =

#type: homfunction
#cppname: hom::setSimulationEnabled
#category: Dynamics
#status: nd

@usage
`setSimulationEnabled(enabled)`

http://www.sidefx.com/docs/houdini10.0/hom/hou/setSimulationEnabled [12/7/2009 4:29:52 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/simulationEnabled

= hou.simulationEnabled =

#type: homfunction
#cppname: hom::simulationEnabled
#category: Dynamics
#status: nd

@usage
`simulationEnabled()` -> bool

http://www.sidefx.com/docs/houdini10.0/hom/hou/simulationEnabled [12/7/2009 4:29:53 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Error

= hou.Error =
#type: homclass
#cppname: HOM_Error
#category: Exceptions

"""Base class for all exceptions in the hou module."""

You can check if an exception instance is a Houdini-specific exception


using `isinstance(ex, hou.Error)`.

@methods

::`description(self)` -> `str`:


#cppname: HOM_Error::description

Return a description of the class of exception. The description is


not related to the exception instance.

::`exceptionTypeName(self)` -> `str`:


#cppname: HOM_Error::exceptionTypeName

Return the name of the exception type. Instances of different


subclasses of hou.Error will return different names. Instances of the
base class will return `"Error"`.

You can also use `str(e.__class__)` to get the name of the subclass.

::`instanceMessage(self)` -> `str`:


#cppname: HOM_Error::instanceMessage

Return a message specific to the exception instance.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Error [12/7/2009 4:29:53 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryPermissionError

= hou.GeometryPermissionError =
#type: homclass
#cppname: HOM_GeometryPermissionError
#superclass: hou.Error
#category: Exceptions

"""Exception that is raised when you try to modify geometry from outside of
a Python SOP."""

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryPermissionError [12/7/2009 4:29:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/InitScriptFailed

= hou.InitScriptFailed =
#type: homclass
#cppname: HOM_InitScriptFailed
#superclass: hou.Error
#category: Exceptions
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/InitScriptFailed [12/7/2009 4:29:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/InvalidInput

= hou.InvalidInput =
#type: homclass
#cppname: HOM_InvalidInput
#superclass: hou.Error
#category: Exceptions

"""Exception that is raised when you try to set a node's input to something
invalid."""

http://www.sidefx.com/docs/houdini10.0/hom/hou/InvalidInput [12/7/2009 4:29:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/InvalidNodeType

= hou.InvalidNodeType =
#type: homclass
#cppname: HOM_InvalidNodeType
#superclass: hou.Error
#category: Exceptions

"""Exception that is raised when you try to call a method on a Node that isn't
supported by that type of node."""

For example, if you ask a non-subnet node for its indirect inputs,
[Hom:hou.Node#indirectInputs] raises an instance of this exception.

http://www.sidefx.com/docs/houdini10.0/hom/hou/InvalidNodeType [12/7/2009 4:29:55 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/InvalidSize

= hou.InvalidSize =
#type: homclass
#cppname: HOM_InvalidSize
#superclass: hou.Error
#category: Exceptions

"""Exception that is raised when you pass a sequence of the wrong length to a
function."""

http://www.sidefx.com/docs/houdini10.0/hom/hou/InvalidSize [12/7/2009 4:29:55 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/KeyframeValueNotSet

= hou.KeyframeValueNotSet =
#type: homclass
#cppname: HOM_KeyframeValueNotSet
#superclass: hou.Error
#category: Exceptions
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/KeyframeValueNotSet [12/7/2009 4:29:56 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/LoadWarning

= hou.LoadWarning =
#type: homclass
#cppname: HOM_LoadWarning
#superclass: hou.Error
#category: Exceptions

"""Exception class for when loading a hip file in Houdini generates


warnings."""

http://www.sidefx.com/docs/houdini10.0/hom/hou/LoadWarning [12/7/2009 4:29:56 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/MatchDefinitionError

= hou.MatchDefinitionError =
#type: homclass
#cppname: HOM_MatchDefinitionError
#superclass: hou.Error
#category: Exceptions
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/MatchDefinitionError [12/7/2009 4:29:57 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NotAvailable

= hou.NotAvailable =
#type: homclass
#superclass: hou.Error
#cppname: HOM_NotAvailable
#category: Exceptions

""" Exception class for when an operation attempted to use a


feature that is not available. This class is a subclass of
[Hom:hou.Error]. """

@related

- [Hom:hou.Error]

http://www.sidefx.com/docs/houdini10.0/hom/hou/NotAvailable [12/7/2009 4:29:57 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjectWasDeleted

= hou.ObjectWasDeleted =
#type: homclass
#cppname: HOM_ObjectWasDeleted
#superclass: hou.Error
#category: Exceptions

""" Exception class for when you use a stale variable to attempt
to access something that was deleted in Houdini. This class is
a subclass of [Hom:hou.Error]. """

For example, setting a variable to a Node object, deleting that


node in Houdini, and attempting to call a method using the
variable will raise this exception.

@related

- [Hom:hou.Error]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjectWasDeleted [12/7/2009 4:29:57 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/OperationFailed

= hou.OperationFailed =
#type: homclass
#cppname: HOM_OperationFailed
#superclass: hou.Error
#category: Exceptions
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/OperationFailed [12/7/2009 4:29:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/OperationInterrupted

= hou.OperationInterrupted =
#type: homclass
#cppname: HOM_OperationInterrupted
#superclass: hou.Error
#category: Exceptions
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/OperationInterrupted [12/7/2009 4:29:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PermissionError

= hou.PermissionError =
#type: homclass
#cppname: HOM_PermissionError
#superclass: hou.Error
#category: Exceptions
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/PermissionError [12/7/2009 4:29:59 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SystemExit

= hou.SystemExit =
#type: homclass
#cppname: HOM_SystemExit
#superclass: hou.Error
#category: Exceptions
#status: nd

@methods

::`code(self)` -> `int`:


#cppname: HOM_SystemExit::code
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/SystemExit [12/7/2009 4:29:59 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/TypeError

= hou.TypeError =
#type: homclass
#cppname: HOM_TypeError
#superclass: hou.Error
#category: Exceptions
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/TypeError [12/7/2009 4:29:59 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ValueError

= hou.ValueError =
#type: homclass
#cppname: HOM_ValueError
#superclass: hou.Error
#category: Exceptions
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/ValueError [12/7/2009 4:30:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/EnumValue

= hou.EnumValue =
#type: homclass
#cppname: HOM_EnumValue
#category: General

""" This class is the base class for an enumeration value. It cannot be
instanced and is not meant to be used directly by the user. """

All the built-in HOM enumeration values are derived from this class such as
`hou.paneTabType.*`, `hou.severityType.*`, and `hou.connectivityType.*`.

@methods

::`name(self) -> string`:


#cppname: HOM_EnumValue::name

Returns the name of the enumeration value.

http://www.sidefx.com/docs/houdini10.0/hom/hou/EnumValue [12/7/2009 4:30:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Preference

= hou.Preference =
#type: homclass
#cppname: HOM_Preference
#superclass: hou.Value
#category: General
#status: ni

@methods

::`defaultValue(self)`:
#cppname: HOM_Preference::defaultValue
#status: ni

::`forciblySaveTo(self, houdini_path_location)`:
#cppname: HOM_Preference::forciblySaveTo
#status: ni

::`hasImmediateEffectWhenChanged(self)`:
#cppname: HOM_Preference::hasImmediateEffectWhenChanged
#status: ni

::`name(self)`:
#cppname: HOM_Preference::name
#status: ni

::`savingBehaviour(self)` -> [Hom:hou.savingBehaviour] enum value:


#cppname: HOM_Preference::savingBehaviour
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Preference [12/7/2009 4:30:01 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Value

= hou.Value =
#type: homclass
#cppname: HOM_Value
#category: General
#status: ni

@methods

::`addChangeCallback(self, callback)`:
#cppname: HOM_Value::addChangeCallback
#status: ni

::`callbackDependents(self)` -> tuple of callbacks:


#cppname: HOM_Value::callbackDependents
#status: ni

::`documentation(self)` -> string:


#cppname: HOM_Value::documentation
#status: ni

::`parmDependents(self)` -> tuple of Parms:


#cppname: HOM_Value::parmDependents
#status: ni

::`set(self, value)`:
#cppname: HOM_Value::set
#status: ni

::`value(self)`:
#cppname: HOM_Value::value
#status: ni

@replaces

- [Exp:param]
- [Cmd:varchange]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Value [12/7/2009 4:30:01 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Variable

= hou.Variable =
#type: homclass
#cppname: HOM_Variable
#superclass: hou.Value
#category: General
#status: ni

"""The variable() function returns a variable by name.


The Variable class represents Houdini variables."""

@methods

::`name(self)`:
#cppname: HOM_Variable::name
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Variable [12/7/2009 4:30:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/_isExiting

= hou._isExiting =

#type: homfunction
#cppname: hom::_isExiting
#category: General

"""Returns whether Houdini is in the process of exiting. This function


is called internally by the interactive Houdini Python shell."""

@usage
`_isExiting()` -> `bool`

@related

- [Hom:hou.exit]

http://www.sidefx.com/docs/houdini10.0/hom/hou/_isExiting [12/7/2009 4:30:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/almostEqual

= hou.almostEqual =

#type: homfunction
#cppname: hom::almostEqual
#category: General

"""Compares two numbers and returns True if they are almost equal in terms
of how far apart they are when represented as floating point numbers."""

@usage
`almostEqual(x, y)` -> bool

http://www.sidefx.com/docs/houdini10.0/hom/hou/almostEqual [12/7/2009 4:30:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/appendSessionModuleSource

= hou.appendSessionModuleSource =

#type: homfunction
#cppname: hom::appendSessionModuleSource
#category: General

"""Appends the given source code to the hou.session module. The appended
code is made available immediately. You do not have to re-import hou.session.
"""

@usage
`appendSessionModuleSource(source)`

This function throws a hou.OperationFailed exception if it fails to update the


hou.session module. This can happen if the appended source has syntax errors
or if it conflicts with the existing contents of the module.

@related

- [Hom:hou.session]
- [Hom:hou.sessionModuleSource]
- [Hom:hou.setSessionModuleSource]

http://www.sidefx.com/docs/houdini10.0/hom/hou/appendSessionModuleSource [12/7/2009 4:30:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/applicationCompilationDate

= hou.applicationCompilationDate =

#type: homfunction
#cppname: hom::applicationCompilationDate
#category: General

"""Returns the application's compilation date."""

@usage
`applicationCompilationDate()` -> string

If this method is executed in python, then it returns the date which the
hou module was compiled on.

@replaces
- [Cmd:version]

@related
- [Hom:hou.applicationName]
- [Hom:hou.applicationVersion]
- [Hom:hou.applicationVersionString]
- [Hom:hou.isApprentice]

http://www.sidefx.com/docs/houdini10.0/hom/hou/applicationCompilationDate [12/7/2009 4:30:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/applicationName

= hou.applicationName =

#type: homfunction
#cppname: hom::applicationName
#category: General

"""Returns the application name."""

@usage
`applicationName()` -> string

@replaces
- [Cmd:version]

@related

- [Hom:hou.applicationCompilationDate]
- [Hom:hou.applicationVersion]
- [Hom:hou.applicationVersionString]
- [Hom:hou.isApprentice]

http://www.sidefx.com/docs/houdini10.0/hom/hou/applicationName [12/7/2009 4:30:04 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/applicationVersion

= hou.applicationVersion =

#type: homfunction
#cppname: hom::applicationVersion
#category: General

"""Returns the application's version number as a tuple of integers --


(major_version, minor_version, build_version)."""

@usage
`applicationVersion()` -> tuple of 3 ints

If this method is executed in python, then it returns the hou module's


version number.

@replaces
- [Cmd:version]

@related

- [Hom:hou.applicationCompilationDate]
- [Hom:hou.applicationName]
- [Hom:hou.applicationVersionString]
- [Hom:hou.isApprentice]

http://www.sidefx.com/docs/houdini10.0/hom/hou/applicationVersion [12/7/2009 4:30:04 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/applicationVersionString

= hou.applicationVersionString =

#type: homfunction
#cppname: hom::applicationVersionString
#category: General

"""Returns the application's version number as a string."""

@usage
`applicationVersionString()` -> string

The format of the string is 'major_version.minor_version.build_version'.


If this method is executed in python, then it returns the hou module's
version number.

@replaces
- [Cmd:version]

@related

- [Hom:hou.applicationCompilationDate]
- [Hom:hou.applicationName]
- [Hom:hou.applicationVersion]
- [Hom:hou.isApprentice]

http://www.sidefx.com/docs/houdini10.0/hom/hou/applicationVersionString [12/7/2009 4:30:04 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/audio

= hou.audio =
#type: hommodule
#cppname: HOM_audio
#category: General

"""Functions related to playing audio using Houdini's playbar."""

@functions

::`setAudioFileName(path)`:
#cppname: HOM_audio::setAudioFileName
Set the Audio Panel to play the sound inside an audio file. Houdini plays
this sound during testing, animation or scrubbing. See also
[Hom:hou.audio#useAudioFile].

::`setChopPath(path)`:
#cppname: HOM_audio::setChopPath
Set the Audio Panel to play the sound inside a CHOP node. Houdini plays
this sound during testing, animation or scrubbing. See also
[Hom:hou.audio#useChops].

path:
A string containing the path to the CHOP node.

::`useAudioFile()`:
#cppname: HOM_audio::useAudioFile
Set the Audio Panel to use a disk file for the audio.

::`useChops()`:
#cppname: HOM_audio::useChops
Set the Audio Panel to use a CHOP node for the audio.

::`setMono(on)`:
#cppname: HOM_audio::setMono
Set whether the audio will play in mono or stereo mode.

::`setLeftVolume(value)`:
#cppname: HOM_audio::setLeftVolume
Set the volume for the left audio channel.

::`setRightVolume(value)`:
#cppname: HOM_audio::setRightVolume

http://www.sidefx.com/docs/houdini10.0/hom/hou/audio (1 of 4) [12/7/2009 4:30:06 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/audio

Set the volume for the right channel.

::`setVolumeTied(self, on)`:
#cppname: HOM_audio::setVolumeTied
Set whether changing the volume of one channel affects the volume of the
other channel. If so, both channels will have the same volume set.

::`setMeter(on)`:
#cppname: HOM_audio::setMeter
Ses whether the meter will show the volume levels during the audio
playback.

::`setAudioOffset(offset)`:
#cppname: HOM_audio::setAudioOffset
Set the time offset of the sound to sync the audio. This offset,
specified in seconds, will coincide with the audio frame. See also
[Hom:hou.audio#setAudioFrame].

::`setAudioFrame(frame)`:
#cppname: HOM_audio::setAudioFrame
Set the frame to sync the audio. The audio offset (in seconds) will
coincide with this frame. See also [Hom:hou.audio#setAudioOffset].

::`useTestMode()`:
#cppname: HOM_audio::useTestMode
Put the Audio Panel into a mode that tests the audio playback.

When the Audio Panel is in the test mode, it will play the entire audio
soundtrack. The test can be stopped and resumed with stop() and play()
functions.

The sound will not play when scrubbing the thumb in the playbar or when
playing the animation in the playbar. The audio must be in either scrub or
realtime mode for playing the sound during animation or scrubbing.

::`useTimeLineMode()`:
#cppname: HOM_audio::useTimeLineMode
Put the Audio Panel into a scrub mode.

When the Audio Panel is in the scrub (a.k.a. timeline) mode, Houdini will
play the audio during the animation or when scrubbing the thumb in the
playbar.

http://www.sidefx.com/docs/houdini10.0/hom/hou/audio (2 of 4) [12/7/2009 4:30:06 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/audio

::`useTimeSliceMode()`:
#cppname: HOM_audio::useTimeSliceMode
Put the Audio Panel into realtime (a.k.a. timeslice) mode.

::`turnOffAudio()`:
#cppname: HOM_audio::turnOffAudio
Turn off the audio playback.

::`play()`:
#cppname: HOM_audio::play
When the Audio Panel is in the test mode, start playing the Audio Panel's
specified audio file or CHOP. See also [Hom:hou.audio#setAudioFileName]
and [Hom:hou.audio#setChopPath].

::`stop()`:
#cppname: HOM_audio::stop
When the Audio Panel is in the test mode, stop the test playback if any
audio is currently playing.

::`reverse()`:
#cppname: HOM_audio::reverse
When the Audio Panel is in the test mode, start playing the sound in
reverse.

::`setLooping(on)`:
#cppname: HOM_audio::setLooping
When the Audio Panel is in the test mode, set whether the test should start
playing from the beginning once the end is reached. See also
[Hom:hou.audio#setRewind].

::`setRewind(on)`:
#cppname: HOM_audio::setRewind
When the Audio Panel is in the test mode, set whether the sound should
rewind to the beginning when the test is stopped. If not, on subsequent
start, the sound will resume from the point at which it was previously
stopped. See also [Hom:hou.audio#setLooping].

::`setScrubRate(value)`:
#cppname: HOM_audio::setScrubRate
When the sustain period is non-zero, the small chunk of the sound will be
repeated with this frequency when the scrubbing comes to a standstill at a
single frame. See also [Hom:hou.audio#useTimeSliceMode].

http://www.sidefx.com/docs/houdini10.0/hom/hou/audio (3 of 4) [12/7/2009 4:30:06 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/audio

::`setScrubRepeat(on)`:
#cppname: HOM_audio::setScrubRepeat
Set whether the sound chunk is repeated during scrubbing. See also
[Hom:hou.audio#useTimeSliceMode].

::`setScrubSustain(value)`:
#cppname: HOM_audio::setScrubSustain
Set the length of time the that the sound chunk is repeatedly played when
scrubbing comes to a standstill on a particular single frame. In practice,
when the value is zero, no sound will be played when scrubbing keeps
hovering over one frame. But, when the value is non-zero, a small sound
chunk will keep playing repeatedly with a specified frequency. See also
[Hom:hou.audio#useTimeSliceMode].

@replaces

- [Cmd:audiopanel]

http://www.sidefx.com/docs/houdini10.0/hom/hou/audio (4 of 4) [12/7/2009 4:30:06 PM]


hou.cache - Houdini online help

Houdini Houdini Object hou hou.


10 Model cache

Search

hou.cache module
Not implemented yet

Subtopics

Text Clear

hou.cache.composite

hou.cache.imageViewer

hou.cache.objectTransform

hou.cache.sop

http://www.sidefx.com/docs/houdini10.0/hom/hou/cache/ (1 of 2) [12/7/2009 4:30:10 PM]


hou.cache - Houdini online help

hou.cache.texture

hou.cache.undo

hou.cache.vexGeoCache

http://www.sidefx.com/docs/houdini10.0/hom/hou/cache/ (2 of 2) [12/7/2009 4:30:10 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/convertToNewKinematics

= hou.convertToNewKinematics =

#type: homfunction
#cppname: hom::convertToNewKinematics
#category: General
#status: ni

@usage
`convertToNewKinematics()`

@replaces

- [Cmd:kinconvert]

http://www.sidefx.com/docs/houdini10.0/hom/hou/convertToNewKinematics [12/7/2009 4:30:11 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/createVariable

= hou.createVariable =

#type: homfunction
#cppname: hom::createVariable
#category: General
#status: ni

@usage
`createVariable(name)` -> Variable

http://www.sidefx.com/docs/houdini10.0/hom/hou/createVariable [12/7/2009 4:30:11 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/exit

= hou.exit =

#type: homfunction
#cppname: hom::exit
#category: General

"""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."""

@usage
`exit(exit_code=0, suppress_save_prompt=False)`

The exit confirmation prompt only appears if the session has unsaved
changes. This function will not return until after the user has made a
choice from the prompt. If this function is called from outside Houdini
(e.g. mplay or a non-graphical Python shell), the dialog is not
displayed and suppress_save_prompt==True is implied.

Note that if the user chose to exit, this function will raise a Python
SystemExit exception to ensure the executing Python script terminates.
This approach ensures that the next Python statement will not be
executed, since Houdini may add events to its event queue that carry out
the actual shutdown, or hou.exit() may be called from a different thread
than the one executing the shutdown.

Note that if you call sys.exit() from within the interactive Houdini
Python shell, it will call hou.exit() with suppress_save_prompt=True.
The Houdini Python shell does this by intercepting the SystemExit
exception raised by sys.exit() and calling hou.exit(). Since both
sys.exit() and hou.exit() both raise SystemExit exceptions, the shell
calls hou._isExiting() to differentiate between the two.

Avoid calling sys.exit() from any place other than the interactive
Houdini Python shell, such as non-graphical Python shells, and instead
call hou.exit(). Using hou.exit() ensures that Houdini shuts down
cleanly.

@replaces
- [Cmd:quit]

http://www.sidefx.com/docs/houdini10.0/hom/hou/exit [12/7/2009 4:30:12 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hipFile

= hou.hipFile =
#type: hommodule
#cppname: HOM_hipFile
#category: General

@functions

::`name()` -> `str`:


#cppname: HOM_hipFile::name
Returns the name of the current hip file.

::`hasUnsavedChanges()` -> `bool`:


#cppname: HOM_hipFile::hasUnsavedChanges
Returns whether the current Houdini session has been modified since
it was last saved.

::`load(file_name, suppress_save_prompt=False)`:
#cppname: HOM_hipFile::load
#replaces: Cmd:mread
Loads a hip file.

If suppress_save_prompt is `False`, the function acts as if the


file was loaded via "File -> Open...". It prompts you to save the
current file before loading the new file and displays any load errors in
a popup window. It also changes the name of the current file at the top
of the main window and adds the file name to the list of most recently
used files.

If the UI is not available (for example, if you run the function from
hython), the suppress_save_prompt parameter is ignored and non-
interactive load is always performed.

Raises [Hom:hou.OperationFailed] if the file to


be loaded does not exist or cannot be opened. The same exception will
also be raised if the method is called during shutting down or
loading/saving a hip file. In each case, the exception instance message
will reflect the failure reason.

Raises [Hom:hou.LoadWarning] if warnings are


generated during load. The instance message will contain the warning
text.

http://www.sidefx.com/docs/houdini10.0/hom/hou/hipFile (1 of 4) [12/7/2009 4:30:13 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hipFile

::`save(file_name=None)`:
#cppname: HOM_hipFile::save
#replaces: Cmd:mwrite
Saves the current session to a hip file.

If you do not provide a file name, the session will be saved under the
current name. If you attempt to save a file to a directory that does not
exist, the directory will be created.

Raises [Hom:hou.OperationFailed] if the target


file or directory cannot be created or if other errors occur during
save. The same exception will also be raised if the method is called
during shutting down or loading/saving a hip file. In each case, the
exception instance message will reflect the failure reason.

::`saveAndIncrementFileName()`:
#cppname: HOM_hipFile::saveAndIncrementFileName
#replaces: Cmd:mwrite
Saves the current session to a hip file, automatically incrementing
the file name.

Raises [Hom:hou.OperationFailed] if the target


file or directory cannot be created or if other errors occur during
save. The same exception will also be raised if the method is called
during shutting down or loading/saving a hip file. In each case, the
exception instance message will reflect the failure reason.

::`saveAsBackup()`:
#cppname: HOM_hipFile::saveAsBackup
#replaces: Cmd:mwrite
Creates a numbered backup from the current session.

If a file with the same name as the current backup already exists, then
the backup is renamed to contain the next number in the sequence before
saving. The backup files are saved in the directory set in the
environment variable HOUDINI_BACKUP_DIR. If HOUDINI_BACKUP_DIR is not
set, then a default relative directory called "backup" is used.

Raises [Hom:hou.OperationFailed] if the target


file or directory cannot be created or if other errors occur during
save. The same exception will also be raised if the method is called
during shutting down or loading/saving a hip file. In each case, the
exception instance message will reflect the failure reason.

http://www.sidefx.com/docs/houdini10.0/hom/hou/hipFile (2 of 4) [12/7/2009 4:30:13 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hipFile

::`clear(suppress_save_prompt=False)`:
#cppname: HOM_hipFile::clear
#replaces: Cmd:mnew
This function replaces the current session with an empty session.

If suppress_save_prompt is set to False, the method acts as "File ->


New" in an interactive session. It prompts you to save the current file
before clearing. Otherwise, the session is cleared non-interactively: no
prompts appear and any changes are discarded.

If the UI is not available (for example, if you run the method from
hython), the suppress_save_prompt parameter is ignored and non-
interactive clear is always performed.

::`merge(file_name, node_pattern="*", overwrite_on_conflict=False)`:


#cppname: HOM_hipFile::merge
#replaces: Cmd:mread
Merges the given file into the current hip file. The nodes to merge in
are indicated by the node_pattern parameter.

If `overwrite_on_conflict` is `True`, the method will


overwrite nodes with the same name as nodes in the merge file.

This method will raise a hou.OperationFailed exception if the file to


be merged into the current one does not exist or cannot be opened. The
same exception will also be raised if the method is called during
shutting down or loading/saving a hip file. In each case, the exception
instance message will reflect the failure reason.

This method will raise a hou.LoadWarning exception if warnings are


generated during merge. The instance message will contain the warning
text.

::`collisionNodesIfMerged(file_name, node_pattern="*")` -> tuple of [Hom:hou.Node]:


#cppname: HOM_hipFile::collisionNodesIfMerged
Returns the Nodes that would collide if a merge was performed with the
specified node_pattern.

The result is a tuple of all Nodes in the merge file satisfying the
node_pattern and having the same name as any of the existing nodes.

Raises [Hom:hou.OperationFailed] if the file to

http://www.sidefx.com/docs/houdini10.0/hom/hou/hipFile (3 of 4) [12/7/2009 4:30:13 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hipFile

be used in the collision check does not exist, cannot be opened, or is


not a valid hip file. The same exception will also be thrown if the
method is called during shutting down or loading/saving a hip file. In
each case, the exception instance message will reflect the failure
reason.

::`isLoadingHipFile()` -> `bool`:


#cppname: HOM_hipFile::isLoadingHipFile
#replaces: Exp:opisloading
Return whether the main application is loading a hip file.

::`isShuttingDown()` -> `bool`:


#cppname: HOM_hipFile::isShuttingDown
#replaces: Exp:opisquitting
Return whether the main application is shutting down.

::`setOnSaveCallback(callback)`:
#cppname: HOM_hipFile::setOnSaveCallback
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/hipFile (4 of 4) [12/7/2009 4:30:13 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath

= hou.hmath =
#type: hommodule
#cppname: HOM_hmath
#category: General

"""Houdini and 3D related math functions."""

@functions

::`buildTranslate(values)` -> [Hom:hou.Matrix4]:


#cppname: HOM_hmath::buildTranslate
#replaces: Exp:translate
Return a transformation matrix containing only a translation. You can
build more complex tranformations by multiplying the result with
another transformation matrix.

values:
A sequence of 3 floats representing the translation in x, y, and z.

See [Hom:hou.Geometry#transformPrims] and [Hom:hou.Matrix4#explode] for


examples.

::`buildRotateAboutAxis(axis, angle_in_deg)` -> [Hom:hou.Matrix4]:


#cppname: HOM_hmath::buildRotateAboutAxis
#replaces: Exp:rotaxis
Return a transformation matrix containing only a rotation, given
an axis and a rotation amount. You can build more complex tranformations
by multiplying the result with another transformation matrix.

See [Hom:hou.Geometry#transformPrims] and [Hom:hou.Matrix4#explode] for


examples.

If you want to convert Euler angles into a corresponding axis and angle,
you can use the following code:
{{{
#!python
def extractAxisAndAngleFromRotateMatrix(m):
'''Given a matrix, return an (Vector3, float) tuple containing the
axis and angle. See Wikipedia's rotation represention page for
more details.'''
import math

http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath (1 of 8) [12/7/2009 4:30:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath

acos_input = (m.at(0, 0) + m.at(1, 1) + m.at(2, 2) - 1.0) * 0.5


if acos_input < -1.0 or acos_input > 1.0:
return None

angle = math.acos(acos_input)
if angle >= -1e-6 and angle <= 1e-6:
# There is no rotation. Choose an arbitrary axis and a rotation of 0.
return hou.Vector3(1, 0, 0), 0.0

inv_sin = 1.0 / (2.0 * math.sin(angle))


axis = hou.Vector3(
(m.at(1, 2) - m.at(2, 1)) * inv_sin,
(m.at(2, 0) - m.at(0, 2)) * inv_sin,
(m.at(0, 1) - m.at(1, 0)) * inv_sin)
return axis, hou.hmath.radToDeg(angle)

def eulerToAxisAndAngle(angles):
return extractAxisAndAngleFromRotateMatrix(hou.hmath.buildRotate(angles))
}}}

See [Wikipedia's axis angle


page|http://en.wikipedia.org/wiki/Axis_angle] and [rotation representation
page|http://en.wikipedia.org/wiki/Rotation_representation_(mathematics)]
for more information.

::`buildRotate(values, order=`xyz`)` -> [Hom:hou.Matrix4]:


#cppname: HOM_hmath::buildRotate
#replaces: Exp:rotate
Return a transformation matrix containing only a rotation, given a sequence
of Euler angles. You can build more complex tranformations by multiplying
the result with another transformation matrix.

values:
A sequence of 3 floats representing the rotations about each of
the x, y, and z axes. Each rotation value is in degrees.

order:
A string containing a permutation of the letters `x`, `y`, and `z`
that determines the order in which rotations are performed about
the coordinate axes.

See [Wikipedia's Euler angles


page|http://en.wikipedia.org/wiki/Euler_angles] for more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath (2 of 8) [12/7/2009 4:30:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath

See [Hom:hou.Matrix4#explode] for an example. See also


[Hom:hou.hmath#buildRotateAboutAxis] and [Hom:hou.hmath#radToDeg].

::`buildRotateToFrame(new_z_axis, new_y_axis)` -> [Hom:hou.Matrix4]:


#cppname: HOM_hmath::buildRotateToFrame
#replaces: Exp:morient
#status: ni

::`buildScale(values)` -> [Hom:hou.Matrix4]:


#cppname: HOM_hmath::buildScale
#replaces: Exp:scale
Return a transformation matrix containing only a scale, given a sequence
of scale values for x, y, and z. You can build more complex tranformations
by multiplying the result with another transformation matrix.

To apply a uniform scale, use the same value for x, y, and z.

See [Hom:hou.Geometry#createNURBSSurface] and [Hom:hou.Matrix4#explode] for


examples.

::`buildShear(values)` -> [Hom:hou.Matrix4]:


#cppname: HOM_hmath::buildShear
Return a transformation matrix containing only a shear, given a sequence
of shear values for x, y, and z. You can build more complex tranformations
by multiplying the result with another transformation matrix.

See [Wikipedia's shear matrix


page|http://en.wikipedia.org/wiki/Shear_matrix] for more information.

See [Hom:hou.Matrix4#explode] for an example.

::`buildTransform(values_dict, transform_order="srt", rotate_order="xyz")` -> [Hom:hou.Matrix4]:


#cppname: HOM_hmath::buildTransform
Given a set of translate, rotate, scale, and shear values, and transform
and rotate orders, return a corresponding matrix. This function is the
inverse of [Hom:hou.Matrix4#explode].

values_dict:
A dictionary whose keys are one of the strings "translate",
"rotate", "scale", "shear" and whose values are sequences of three
floats. Note that the rotate values are Euler angles about the `x`,
`y`, and `z` axes, in degrees.

http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath (3 of 8) [12/7/2009 4:30:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath

transform_order:
A string containing a permutation of the letters `s`, `r`, and `t`.
The rotate, scale, and translate results are dependent on the order in
which you perform those operations, and this string specifies that
order.

rotate_order:
A string containing a permutation of the letters `x`, `y`, and `z`
that determines the order in which rotations are performed about
the coordinate axes.

This function can be approximately implemented as follows:


{{{
#!python
def buildTransform(values_dict, transform_order="srt", rotate_order="xyz"):
# Take the return value from explode, along with the transform and
# rotate order, and rebuild the original matrix.
result = hou.hmath.identityTransform()
for operation_type in transform_order:
if operation_type == "t":
result *= hou.hmath.buildTranslate(values_dict["translate"])
elif operation_type == "s":
result *= hou.hmath.buildScale(values_dict["scale"])
if "shear" in values_dict:
result *= hou.hmath.buildShear(values_dict["shear"])
elif operation_type == "r":
result *= hou.hmath.buildRotate(values_dict["rotate"], rotate_order)
else:
raise ValueError("Invalid transform order")
return result
}}}

::`identityTransform()` -> `[Hom:hou.Matrix4]:


#cppname: HOM_hmath::identityTransform
#replaces: Exp:identity
Returns the identity matrix. This is the same as calling `hou.Matrix4(1)`.

{{{
#!pycon
>>> hou.hmath.identityTransform()
<hou.Matrix4 [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]>
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath (4 of 8) [12/7/2009 4:30:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath

See also [Hom:hou.Matrix4#__init__].

::`degToRad(degrees)` -> `float`:


#cppname: HOM_hmath::degToRad
#replaces: Exp:rad
Given a value in degrees, return the corresponding value in radians.

This function is equivalent to `degrees * math.pi / 180.0`.

::`radToDeg(radians)` -> `double`:


#cppname: HOM_hmath::radToDeg
#replaces: Exp:deg
Given a value in radians, return the corresponding value in degrees.

This function is equivalent to `radians * 180.0 / math.pi`.

::`clamp(value, min, max)` -> `float`:


#cppname: HOM_hmath::clamp
#replaces: Exp:clamp
Returns the value clamped to the range `min` to `max`. See also
[Hom:hou.hmath#wrap]. This function is useful in expressions to prevent
a value from going outside the specified range.

::`wrap(value, min, max)`:


#cppname: HOM_hmath::wrap
#replaces: Exp:wrap
Similar to the [Hom:hou.hmath#clamp] function in that the resulting value
will always fall between the specified minimum and maximum value. However,
it will create a saw-tooth wave for continuously increasing or decreasing
parameter values.

::`sign(value)` -> `int`:


#cppname: HOM_hmath::sign
#replaces: Exp:sign
Returns 1.0 if `value` is positive, -1.0 if negative and 0.0 if `value` is
zero.

Note that you can achieve the same effect with Python's builtin `cmp`
function: `float(cmp(value, 0))`.

::`smooth(value, min, max)` -> `float`:


#cppname: HOM_hmath::smooth

http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath (5 of 8) [12/7/2009 4:30:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath

#replaces: Exp:smooth
Takes a value and range and returns a smooth interpolation between 0
and 1.

When `value` is less than `min`, the return value is 0.


If `value` is greater than `max`, the return value is 1.

{{{
#!pycon
>>> hou.hmath.smooth(5, 0, 20)
0.15625
>>> hou.hmath.smooth(10, 0, 20)
0.5
>>> hou.hmath.smooth(15, 0, 20)
0.84375
}}}

{{{
#!python
# Visualize the output of this function by positioning geometry objects at various locations.
def createSpheres(num_spheres=40):
for i in range(num_spheres):
sphere = hou.node("/obj").createNode("geo").createNode("sphere")
sphere.parmTuple("rad").set((0.1, 0.1, 0.1))
sphere.setDisplayFlag(True)

# Given a value between 0 and 5, we'll call smooth with a range


# of 0 to 3, and the resulting y value will be between 0 and 1.
x = 5.0 * i / num_spheres
y = hou.hmath.smooth(x, 0, 3)
sphere.parent().setParmTransform(hou.hmath.buildTranslate((x, y, 0)))
}}}

::`fit(value, old_min, old_max, new_min, new_max)` -> `float`:


#cppname: HOM_hmath::fit
#replaces: Exp:fit
Returns a number between `new_min` and `new_max` that is relative to
the `value` between the range `old_min` and `old_max`. If the value
is outside the `old_min` to `old_max` range, it will be clamped to the new
range.

{{{
#!pycon

http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath (6 of 8) [12/7/2009 4:30:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath

>>> hou.hmath.fit(3, 1, 4, 5, 20)


15.0
}}}

::`fit01(value, new_min, new_max)` -> `float`:


#replaces: Exp:fit01
#cppname: HOM_hmath::fit01
Returns a number between `new_min` and `new_max` that is relative to
the `value` between the range 0 and 1. If the value is outside the 0
to 1 range, it will be clamped to the new range.

This function is a shortcut for


`hou.hmath.fit(value, 0.0, 1.0, new_min, new_max)`.

::`fit10(value, new_min, new_max)` -> `float`:


#cppname: HOM_hmath::fit10
#replaces: Exp:fit10
Returns a number between `new_min` and `new_max` that is relative to
the `value` between the range 1 to 0. If the value is outside the 1 to 0
range, it will be clamped to the new range.

This function is a shortcut for


`hou.hmath.fit(value, 1.0, 0.0, new_min, new_max)`.

::`fit11(value, new_min, new_max)` -> `float`:


#cppname: HOM_hmath::fit11
#replaces: Exp:fit11
Returns a number between `new_min` and `new_max` that is relative to
the `value` between the range -1 to 1. If the value is outside the
-1 to 1 range, it will be clamped to the new range.

This function is a shortcut for


`hou.hmath.fit(value, -1.0, 1.0, new_min, new_max)`.

::`modularBlend(value1, value2, modulus, blend_factor)`:


#cppname: HOM_hmath::modularBlend
#replaces: Exp:modblend
#status: ni

::`rand(seed)` -> `float`:


#cppname: HOM_hmath::rand
#replaces: Exp:rand
Returns a pseudo-random number from 0 to 1. Using the same `seed` will

http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath (7 of 8) [12/7/2009 4:30:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath

always give the same result.

::`noise1d(self, pos)` -> `float`:


#cppname: HOM_hmath::noise1d
#replaces: Exp:noise
Given a sequence of 1 to 4 floats representing a position in
N-dimensional space, return a single float corresponding to 1 dimensional
noise.

This function matches the output of the [Vex:noise] function from VEX.

::`noise3d(self, pos)` -> [Hom:hou.Vector3]:


#cppname: HOM_hmath::noise3d
Given a sequence of 1 to 4 floats representing a position in
N-dimensional space, return a [Hom:hou.Vector3] object representing the
vector noise at the given position.

This function matches the output of the [Vex:noise] function from VEX.

::`sparseConvolutionNoise(pos3)` -> float:


#cppname: HOM_hmath::sparseConvolutionNoise
#replaces: Exp:snoise
#status: ni

::`sparseConvolutionTurbulantNoise(pos3, depth)` -> float:


#cppname: HOM_hmath::sparseConvolutionTurbulantNoise
#replaces: Exp:sturb
#status: ni

::`turbulantNoise(pos3, depth)` -> float:


#cppname: HOM_hmath::turbulantNoise
#replaces: Exp:turb
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/hmath (8 of 8) [12/7/2009 4:30:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/isApprentice

= hou.isApprentice =

#type: homfunction
#cppname: hom::isApprentice
#category: General

"""Returns True if the application is an apprentice (non-commercial) version.


Returns False otherwise."""

@usage
`isApprentice()` -> bool

If this method is executed in python, then it returns True if the hou module
is an apprentice version and False otherwise.

@replaces
- [Cmd:version]

@related

- [Hom:hou.applicationCompilationDate]
- [Hom:hou.applicationName]
- [Hom:hou.applicationVersion]
- [Hom:hou.applicationVersionString]

http://www.sidefx.com/docs/houdini10.0/hom/hou/isApprentice [12/7/2009 4:30:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/operatingSystem

= hou.operatingSystem =

#type: homfunction
#cppname: hom::operatingSystem
#category: General
#status: ni

@usage
`operatingSystem()` -> string

http://www.sidefx.com/docs/houdini10.0/hom/hou/operatingSystem [12/7/2009 4:30:16 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/releaseLicense

= hou.releaseLicense =
#type: homfunction
#cppname: releaseLicense
#category: General

"""Release the currently held Houdini license."""

@usage
`releaseLicense()`

When you import the hou module into a Python shell, it will acquire a
Houdini license. This function exists so you can release that license
when you're done using the hou module. This way, you can have a long
running Python script that periodically uses Houdini without having to
hold a Houdini license for the entire duration of the script.

After you release the license, it will automatically be reacquired when


you access functions and objects from the hou module.

http://www.sidefx.com/docs/houdini10.0/hom/hou/releaseLicense [12/7/2009 4:30:16 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/session

= hou.session =
#type: hommodule
#cppname: HOM_session
#category: General

""" This module is used to define custom classes, functions and


variables that can be called from within the current Houdini session. The
contents of this module are saved into the .hip file."""

You can add your own custom definitions to this module and refer to them
anywhere python is used in Houdini. This includes shelf tools, parameter fields, callback scripts and the Python Shell pane. For example, if you write a `fooBar` method in the module, you can invoke it from your python code with `hou.session.fooBar()`.

To view and edit the contents of this module, choose __Windows >
Python Source Editor__. You can also read and write the module contents from HOM.

@related

- [Hom:hou.appendSessionModuleSource]
- [Hom:hou.sessionModuleSource]
- [Hom:hou.setSessionModuleSource]

http://www.sidefx.com/docs/houdini10.0/hom/hou/session [12/7/2009 4:30:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/sessionModuleSource

= hou.sessionModuleSource =

#type: homfunction
#cppname: hom::sessionModuleSource
#category: General

""" Returns the contents of the hou.session module. """

@usage
`sessionModuleSource()` -> string

@related

- [Hom:hou.appendSessionModuleSource]
- [Hom:hou.session]
- [Hom:hou.setSessionModuleSource]

http://www.sidefx.com/docs/houdini10.0/hom/hou/sessionModuleSource [12/7/2009 4:30:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setSessionModuleSource

= hou.setSessionModuleSource =

#type: homfunction
#cppname: hom::setSessionModuleSource
#category: General

"""Sets the contents of the hou.session module. The new contents is


made available immediately. You do not have to re-import hou.session."""

@usage
`setSessionModuleSource(source)`

This function throws a hou.OperationFailed exception if it fails to update the


hou.session module. This can happen if the new contents has syntax errors.

@related

- [Hom:hou.appendSessionModuleSource]
- [Hom:hou.session]
- [Hom:hou.setSessionModuleSource]

http://www.sidefx.com/docs/houdini10.0/hom/hou/setSessionModuleSource [12/7/2009 4:30:18 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/variable_

= hou.variable =

#type: homfunction
#cppname: hom::variable
#category: General
#status: ni

@usage
`variable(name)` -> Variable or None

@related

[Hom:hou.Variable]

@replaces

- [Exp:ishvariable]
- [Exp:isvariable]

http://www.sidefx.com/docs/houdini10.0/hom/hou/variable_ [12/7/2009 4:30:18 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/variables

= hou.variables =

#type: homfunction
#cppname: hom::variables
#category: General
#status: ni

@usage
`variables()` -> tuple of Variables

http://www.sidefx.com/docs/houdini10.0/hom/hou/variables [12/7/2009 4:30:18 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/attribData

= attribData =
#type: hommodule
#cppname: HOM_attribData
#category: Geometry

"""Enumeration of attribute data types."""

* hou.attribData.Int
* hou.attribData.Float
* hou.attribData.String

http://www.sidefx.com/docs/houdini10.0/hom/hou/attribData [12/7/2009 4:30:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Attrib

= hou.Attrib =
#type: homclass
#cppname: HOM_Attrib
#category: Geometry
"""This class stores information about a Geometry attribute."""

An attribute describes extra data you can attach to different elements


of geometry. The attribute values are the individual instances of that data,
and for each attribute there is exactly one attribute value per geometry
element. For example, if you look at the points in Houdini's geometry
spreadsheet, the point numbers are listed down the side, the point
attributes are listed across the top, and the point attribute values are
contained in the table.

The attribute specifies which elements store the attribute values: points,
primitives, or vertices. An attribute can also be global (also known as
a detail attribute), in which case there is one instance of the attribute
value in the geometry.

The attribute also specifies the data type of the attribute values.

To look up existing attributes, use [Hom:hou.Geometry#findPointAttrib],


[Hom:hou.Geometry#findPrimAttrib], [Hom:hou.Geometry#findVertexAttrib], and
[Hom:hou.Geometry#findGlobalAttrib]. To add a new attribute, use
[Hom:hou.Geometry#addAttrib].

NOTE:
Point positions are stored in a point attribute named `P` and point weights
are stored in `Pw`. See [Hom:hou.Point#position] and
[Hom:hou.Point#weight] for more information.

@methods

::`name(self)` -> `str`:


#cppname: HOM_Attrib::name
Return the attribute's name. Each attribute in the geometry has a unique
name.

::`type(self)` -> [Hom:hou.attribType] enum value:


#cppname: HOM_Attrib::type
Return the type of attribute (point, primitive, vertex, or global).

http://www.sidefx.com/docs/houdini10.0/hom/hou/Attrib (1 of 3) [12/7/2009 4:30:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Attrib

::`dataType(self)` -> [Hom:hou.attribData] enum value:


#cppname: HOM_Attrib::dataType
Return the attribute's data type (int, float or string).

The size of the attribute also determines the format of the attribute
values. For example, if the data type is `int` and the size is 3,
the attribute value will be a tuple of 3 ints. If the size was 1,
the attribute value would simply be an int.

Note that a string attribute's size must be 1.

::`size(self)` -> `int`:


#cppname: HOM_Attrib::size
#replaces: Exp:pointattribsize, Exp:primattribsize, Exp:vertexattribsize
Return the number of data components in the attribute value. See
[Hom:hou.Attrib#dataType] for more information.

::`strings(self)` -> tuple of `str`:


#cppname: HOM_Attrib::strings
Return the string table for this attribute. If the attribute is not
a string, returns an empty tuple.

A string attribute does not store each string value inside the attribute
element (i.e. point, primitive, etc.). Instead, the unique string
attribute values are stored in a table inside the attribute, and each
attribute value stores an index to that string.

For example, suppose this attribute stores strings on points. If


all points have the attribute value `"foo"` then the string table will be
just `("foo",)` and each point will store the index 0. When you set some
points' values to `"bar"`, Houdini adds sets the string table to
`("foo", "bar")` and sets stores the index 1 in those points. When you set
one of those points back to `"foo"`, Houdini leaves the string table
unchanged and stores the index 0 in that point.

When using string attribute values, this implementation is hidden from you,
and you get and set those attributes as strings. This method is provided
only in case you need access to the string table.

::`defaultValue(self)` -> `int` or `float` or `string` or `tuple`:


#cppname: HOM_Attrib::defaultValue
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Attrib (2 of 3) [12/7/2009 4:30:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Attrib

::`geometry(self)` -> [Hom:hou.Geometry]:


#cppname: HOM_Attrib::geometry
Return the Geometry object containing this attribute.

::`isTransformedAsNormal(self)` -> `bool`:


#cppname: HOM_Attrib::isTransformedAsNormal
Return whether attribute values in the geometry are automatically
transformed as a normal when Houdini transforms (e.g. rotates) the
geometry.

For more information, see the [Hom:hou.Geometry#addAttrib], in the


`transform_as_normal` parameter documentation.

::`setDefaultValue(self, default_value)`:
#cppname: HOM_Attrib::setDefaultValue
#status: ni

::`destroy(self)`:
#cppname: HOM_Attrib::destroy
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Attrib (3 of 3) [12/7/2009 4:30:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Curve

= hou.Curve =
#type: homclass
#cppname: HOM_Curve
#superclass: hou.Face
#category: Geometry
#status: ni

@methods

::`derivativeAtU(self, u, derivative=1)` -> [Hom:hou.Vector3]:


#cppname: HOM_Curve::derivativeAtU
#status: ni

::`knotValue(self, knot_index)`:
#cppname: HOM_Curve::knotValue
#status: ni

::`normalAt(self, u)` -> [Hom:hou.Vector3]:


#cppname: HOM_Curve::normalAt
#status: ni

::`parametricToUniform(self, u)`:
#cppname: HOM_Curve::parametricToUniform
#status: ni

::`uniformToParametric(self, u)`:
#cppname: HOM_Curve::uniformToParametric
#status: ni

@replaces

- [Exp:normal]
- [Exp:realuv]
- [Exp:spknot]
- [Exp:unituv]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Curve [12/7/2009 4:30:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Face

= hou.Face =
#type: homclass
#cppname: HOM_Face
#superclass: hou.Prim
#category: Geometry
"""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."""

A [Hom:hou.Surface], on the other hand, stores a two dimension grid of


vertices, and might be a NURBS surface, Bezier surface, or quadrilateral mesh.

@methods

::`addVertex(self, point)` -> [Hom:hou.Vertex]:


#cppname: HOM_Face::addVertex
Create a new vertex inside this face, adding it to the end of the vertex
list. You would typically call this method from the code of a
Python-defined SOP.

`point` is a [Hom:hou.Point] object that the new vertex will refer to. See
[Hom:hou.Vertex] for information on the relationship between points and
vertices.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

{{{
#!python
# These arrays define point positions and a set of polygons composed
# of those points. Note that the point positions could also be floating
# point values.
point_positions = ((0,0,0), (1,0,0), (1,1,0), (0,1,0))
poly_point_indices = ((0,1,2), (2,3,0))

geo = hou.pwd().geometry()

# Create all the points.


points = []
for position in point_positions:
points.append(geo.createPoint())
points[-1].setPosition(position)

http://www.sidefx.com/docs/houdini10.0/hom/hou/Face (1 of 3) [12/7/2009 4:30:21 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Face

# Now create the polygons, adding vertices that refer to the points.
for point_indices in poly_point_indices:
poly = geo.createPolygon()
for point_index in point_indices:
poly.addVertex(points[point_index])
}}}

See also:
- [Hom:hou.Geometry#createPoint]
- [Hom:hou.Geometry#createPolygon]

::`isClosed(self) -> bool`:


#cppname: HOM_Face::isClosed
#replaces: Exp:isclosed
Return whether the first and last vertex are connected.

An open face forms a multi-segment line or curve, since the first and last
vertices are not connected. A closed face forms a very thin surface.

::`setIsClosed(self, on)`:
#cppname: HOM_Face::setIsClosed
Set whether the face is open or closed. See [Hom:hou.Face#isClosed] for
more information. You would typically call this method from the code of a
Python-defined SOP.

Note that this method will raise [Hom:hou.OperationFailed] on a Bezier


curve. See [Hom:hou.Geometry#createBezierCurve] for more information.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

::`setOpen(self, on)`:
#cppname: HOM_Face::setOpen
#status: ni

::`normal(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_Face::normal
Return the vector that's perpendicular to the face.

::`attribValueAt(self, u)` -> `int`, `float`, `str` or `tuple`:


#cppname: HOM_Face::attribValueAt
#replaces: Exp:primuv
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Face (2 of 3) [12/7/2009 4:30:21 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Face

::`positionAtU(self, u)` -> [Hom:hou.Vector3]:


#cppname: HOM_Face::positionAtU
#replaces: Exp:primuv
#status: ni

::`degree(self)`:
#cppname: HOM_Face::degree
#replaces: Exp:degree
#status: ni

::`arcLength(self, u_start, u_stop)`:


#cppname: HOM_Face::arcLength
#replaces: Exp:arclen
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Face (3 of 3) [12/7/2009 4:30:21 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

= hou.Geometry =
#type: homclass
#cppname: HOM_Geometry
#category: Geometry

"""A Geometry object contains the points and primitives that define a 3D
geometric shape. For example, each SOP node in Houdini generates a single
Geometry object."""

If you ask a SOP for its geometry via [Hom:hou.SopNode#geometry], you'll get
a read-only reference to it. If the SOP recooks, the corresponding Geometry
object will update to the SOP's new geometry. If the SOP is deleted, accessing
the Geometry object will raise a [Hom:hou.ObjectWasDeleted] exception. If
you call methods that try to modify the geometry, they will raise a
[Hom:hou.GeometryPermissionError] exception.

If you do not want the geometry to update when the SOP recooks, you can call
[Hom:hou.Geometry#freeze]. freeze returns another Geometry object that will
not change when the SOP recooks. Accessing frozen Geometry is slightly faster,
since Houdini does not need to look up the SOP node for each access, so you
may want to use frozen geometry for speed-crucial operations.

If you're writing a SOP using Python, you will have read-write access to
the geometry, and it will be frozen. To create a Python-defined SOP,
select __File > New Operator Type...__ and place the Python code in the
__Code__ tab.

@methods

::`findPointAttrib(self, name)` -> [Hom:hou.Attrib] or `None`:


#cppname: HOM_Geometry::findPointAttrib
#replaces: Exp:haspointattrib
Look up a point attribute by name. Returns the corresponding
[Hom:hou.Attrib] object, or None if no attribute exists with that name.

Note that the point position attribute is named `P` and is 3 floats in
size. Also, the point weight attribute is named `Pw` and is 1 float in
size. These attributes always exist in HOM, even though they are not
listed by Houdini's UI.

See [Hom:hou.Point#attribValue] for an example.

::`findPrimAttrib(self, name)` -> [Hom:hou.Attrib] or `None`:


#cppname: HOM_Geometry::findPrimAttrib

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (1 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

#replaces: Exp:hasprimattrib
Look up a primitive attribute by name. Returns the corresponding
[Hom:hou.Attrib] object, or None if no attribute exists with that name.

::`findVertexAttrib(self, name)` -> [Hom:hou.Attrib] or `None`:


#cppname: HOM_Geometry::findVertexAttrib
#replaces: Exp:hasvertexattrib
Look up a vertex attribute by name. Returns the corresponding
[Hom:hou.Attrib] object, or None if no attribute exists with that name.

::`findGlobalAttrib(self, name)` -> [Hom:hou.Attrib] or `None`:


#cppname: HOM_Geometry::findGlobalAttrib
#replaces: Exp:hasdetailattrib
Look up a global (a.k.a. detail) attribute by name. Returns the
corresponding [Hom:hou.Attrib] object, or None if no attribute exists with
that name.

::`pointAttribs(self)` -> `tuple` of [Hom:hou.Attrib]:


#cppname: HOM_Geometry::pointAttribs
Return a tuple of all the point attributes.

Note that the point position attribute is named `P` and is 3 floats in
size. Also, the point weight attribute is named `Pw` and is 1 float in
size. These attributes always exist in HOM, even though they are not
listed by Houdini's UI.

::`primAttribs(self)` -> `tuple` of [Hom:hou.Attrib]:


#cppname: HOM_Geometry::primAttribs
Return a tuple of all the primitive attributes.

::`vertexAttribs(self)` -> `tuple` of [Hom:hou.Attrib]:


#cppname: HOM_Geometry::vertexAttribs
Return a tuple of all the vertex attributes.

::`globalAttribs(self)` -> `tuple` of [Hom:hou.Attrib]:


#cppname: HOM_Geometry::globalAttribs
Return a tuple of all the global (a.k.a. detail) attributes.

::`addAttrib(self, type, name, default_value, transform_as_normal=False)` -> [Hom:hou.Attrib]:


#cppname: HOM_Geometry::addAttrib
Create a new point, primitive, vertex, or global (a.k.a. detail) attribute.
Returns a [Hom:hou.Attrib] object describing the newly created attribute.
You would typically call this method from the code of a Python-defined
SOP.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (2 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

type:
A [Hom:hou.attribType] value to specify if the new attribute should be
a point, primitive, vertex, or global attribute.
name:
The new attribute's name. Each attribute in the geometry must have
a unique name.
default_value:
The default value for this attribute. When an attribute is created,
all existing elements (e.g. primitives or points) will store this
value. As well, elements that you add later will also use this value.

This value also determines the attribute's data type, and may be one
of the following:
- an integer
- a float
- a string
- an integer sequence
- a float sequence

If the default value is a sequence of integers or floats, the sequence


size will determine the attribute's size. Otherwise, the attribute's
size is 1.
transform_as_normal:
This parameter is only available when the default value is a sequence
of 3 floats. For such attributes, Houdini will not modify the attribute
values when it transforms (translates, rotates, etc.) the geometry.
If you want to the attribute to be transformed as a vector (such as
a normal vector) when Houdini transforms the geometry, set this
parameter to `True`.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

Raises [Hom:hou.OperationFailed] if an attribute with this name already


exists. If you are familiar with the C++ Houdini Development Kit (HDK),
you know that Houdini can support attributes with the same name but with
different types. However, many SOPs do not let you distinguish between
attributes that have the same name, and multiple attributes with the same
name are discouraged. For this reason, you cannot create them with this
method.

Raises [Hom:hou.OperationFailed] if transform_as_normal is `True` and the


default value is not a sequence of 3 floats.

{{{
#!python

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (3 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

# Create an integer point attribute of size 1 named "population", and


# create 5 points with attribute values 0, 5, 10, 15, and 20. This code
# will work from inside a Python SOP, but not from the Python shell.
geo = hou.pwd().geometry()
population_attrib = geo.addAttrib(hou.attribType.Point, "population", 0)
for i in range(5):
point = geo.createPoint()
point.setPosition((i, 0, 0))
point.setAttribValue(population_attrib, i * 5)
}}}

See also:
- [Hom:hou.Prim#setAttribValue]
- [Hom:hou.Point#setAttribValue]
- [Hom:hou.Prim#setAttribValue]
- [Hom:hou.Geometry#setGlobalAttribValue]

::`attribValue(self, name_or_attrib)` -> `int`, `float`, `str`, or `tuple`:


#cppname: HOM_Geometry::attribValue
#replaces: Exp:detail, Exp:detailattribsize, Exp:details
Return the global (a.k.a. detail) attribute value for a particular
attribute. The attribute may be specified by name or by [Hom:hou.Attrib]
object.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name.

::`floatAttribValue(self, name_or_attrib)` -> `float`:


#cppname: HOM_Geometry::floatAttribValue
Return the global (a.k.a. detail) attribute value for a particular floating
point attribute. The attribute may be specified by name or by
[Hom:hou.Attrib] object.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name


or the attribute is not a float of size 1.

In most cases, you'll just use [Hom:hou.Geometry#attribValue] to access


attribute values. Houdini uses this method internally to implement
attribValue.

::`floatListAttribValue(self, name_or_attrib)` -> `tuple` of `float`:


#cppname: HOM_Geometry::floatListAttribValue
Return the global (a.k.a. detail) attribute value for a particular floating
point attribute. The attribute may be specified by name or by
[Hom:hou.Attrib] object. The return value is a list of floats.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (4 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

It is valid to call this method when the attribute's size is 1. In this


case, a list with one element is returned.

See also:
- [Hom:hou.Geometry#attribValue]

::`intAttribValue(self, name_or_attrib)` -> `int`:


#cppname: HOM_Geometry::intAttribValue
Return the global (a.k.a. detail) attribute value for a particular integer
attribute of size 1. The attribute may be specified by name or by
[Hom:hou.Attrib] object. See [Hom:hou.Geometry#floatAttribValue] for more
information.

::`intListAttribValue(self, name_or_attrib)` -> `tuple` of `int`:


#cppname: HOM_Geometry::intListAttribValue
Return the global (a.k.a. detail) attribute value for a particular integer
attribute. The attribute may be specified by name or by [Hom:hou.Attrib]
object. The return value is a list of ints. See
[Hom:hou.Geometry#floatListAttribValue] for more information.

::`stringAttribValue(self, name_or_attrib)` -> `str`:


#cppname: HOM_Geometry::stringAttribValue
Return the global (a.k.a. detail) attribute value for a particular string
attribute. The attribute may be specified by name or by [Hom:hou.Attrib]
object. See [Hom:hou.Geometry#floatAttribValue] for more information.

::`setGlobalAttribValue(self, name_or_attrib, attrib_value)`:


#cppname: HOM_Geometry::setGlobalAttribValue
Set a global (a.k.a. detail) attribute value. The attribute may be
specified by name or by [Hom:hou.Attrib] object. You would typically call
this method from the code of a Python-defined SOP.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name


or if the attribute's data type does not match the value passed in.
If the attribute's size is more than 1, the attribute value must be a
sequence of integers/floats, and the size of the sequence must match the
attribute's size.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

{{{
#!python
# This code will work from inside a Python SOP, but not from the Python
# shell.
geo = hou.pwd().geometry()

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (5 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

geo.addAttrib(hou.attribType.Global, "author", "")


geo.addAttrib(hou.attribType.Global, "version", (0, 0, 0))
geo.setGlobalAttribValue("author", "Joe")
geo.setGlobalAttribValue("version", (1, 0, 7))
}}}

See also:
- [Hom:hou.Geometry#attribValue]
- [Hom:hou.Point#setAttribValue]
- [Hom:hou.Prim#setAttribValue]
- [Hom:hou.Vertex#setAttribValue]

::`attribType(self)` -> [Hom:hou.attribType] enum value:


#cppname: HOM_Geometry::attribType
Return the enumerated value [Hom:hou.attribType#Global]. Points,
primitives, vertices, and geometry support the same set of methods for
querying their attributes, and this method is one of them.

See also:
- [Hom:hou.Prim#attribType]
- [Hom:hou.Point#attribType]
- [Hom:hou.Vertex#attribType]

::`averagePointAttribValue(self, attrib_name, index)`:


#cppname: HOM_Geometry::averagePointAttribValue
#replaces: Exp:pointavg
#status: ni

::`averagePointAttribValueByType(self, attrib_type, index)`:


#cppname: HOM_Geometry::averagePointAttribValueByType
#replaces: Exp:pointavg
#status: ni

::`averagePrimAttribValue(self, attrib_name, index)`:


#cppname: HOM_Geometry::averagePrimAttribValue
#status: ni

::`averagePrimAttribValueByType(self, attrib_type, index)`:


#cppname: HOM_Geometry::averagePrimAttribValueByType
#status: ni

::`averageVertexAttribValue(self, attrib_name, index)`:


#cppname: HOM_Geometry::averageVertexAttribValue
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (6 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

::`averageVertexAttribValueByType(self, attrib_type, index)`:


#cppname: HOM_Geometry::averageVertexAttribValueByType
#status: ni

::`boundingBox(self)` -> [Hom:hou.BoundingBox]:


#cppname: HOM_Geometry::boundingBox
#replaces: Exp:bbox
Return an axis-aligned 3D bounding box that is sized and positioned to be
large enough to hold this geometry.

::`centroid(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_Geometry::centroid
#replaces: Exp:centroid
#status: ni

::`createPoint(self)` -> [Hom:hou.Point]:


#cppname: HOM_Geometry::createPoint
Create a new point located and (0, 0, 0) and return the corresponding
[Hom:hou.Point] object. You would typically call this method from the code
of a Python-defined SOP.

If the geometry contains point attributes, the new point receives the
default values for those attributes.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

See [Hom:hou.Geometry#addAttrib], [Hom:hou.Geometry#createPolygon], and


[Hom:hou.Face#addVertex] for examples.

::`createPolygon(self)` -> [Hom:hou.Polygon]:


#cppname: HOM_Geometry::createPolygon
Create a new polygon and return the corresponding [Hom:hou.Polygon]
object. You would typically call this method from the code of a
Python-defined SOP.

The newly created polygon has no vertices. Use [Hom:hou.Face#addVertex]


to add them. The polygon is also closed (see [Hom:hou.Face#isClosed]
for more information).

If the geometry contains primitive attributes, the new polygon receives the
default values for those attributes.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

{{{

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (7 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

#!python
geo = hou.pwd().geometry()
poly = geo.createPolygon()
for position in (0,0,0), (1,0,0), (0,1,0):
point = geo.createPoint()
point.setPosition(position)
poly.addVertex(point)
}}}

See [Hom:hou.Face#addVertex] for a slightly more complicated example.

::`createNURBSCurve(self, num_vertices=4, is_closed=False)` -> [Hom:hou.Face]:


#cppname: HOM_Geometry::createNURBSCurve
Create a new NURBS with the specified number of vertices and return it.
You would typically call this method from the code of a Python-defined SOP.

num_vertices:
The number of verticies in the curve. A new point is added to the
geometry for each vertex, and this point is located at the origin until
you change its position. You can also add more vertices with
[Hom:hou.Face#addVertex].

The order of the NURBS curve is 4, so the curve must always have a
minimum of 4 vertices. If you specify too few vertices, this method
raises [Hom:hou.OperationFailed].

is_closed:
Controls if the curve is open or closed; see [Hom:hou.Face#isClosed]
for more information. If not specified, the resulting curve is open.
This behaviour is different from [Hom:hou.Geometry#createPolygon],
where the new polygon is closed. You can also open or close it with
[Hom:hou.Face#setIsClosed].

If the geometry contains primitive attributes, the new curve receives the
default values for those attributes.

{{{
#!python
# This code will work from inside a Python SOP, but not from the Python
# shell.
geo = hou.pwd().geometry()
curve = geo.createNURBSCurve(10)
for vertex in curve.vertices():
vertex.point().setPosition((i, i % 3, 0))
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (8 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

See also:
- [Hom:hou.Prim#vertices]
- [Hom:hou.Point#setPosition]

::`createBezierCurve(self, num_vertices=4, is_closed=False)` -> [Hom:hou.Face]:


#cppname: HOM_Geometry::createBezierCurve
Create a new Bezier curve with the specified number of vertices and
return it. You would typically call this method from the code of a
Python-defined SOP.

The Bezier curve has order 4, and the `is_closed` parameter determines
if it is open or closed (see [Hom:hou.Face#isClosed] for more
information). An open Bezier curve must have `3n+1` vertices for some
integer `n>=1` (so valid values are 4, 7, 10, etc.). A closed Bezier curve
must have `3n` vertices (e.g. 3, 6, 9, etc.). You cannot use
[Hom:hou.Face#setIsClosed] on a Bezier curve, since the number of vertices
would need to change.

See [Hom:hou.Geometry#createNURBSCurve] for more information.

::`createNURBSSurface(self, rows, cols, is_closed_in_u=False, is_closed_in_v=False)` -> [Hom:hou.Surface]:


#cppname: HOM_Geometry::createNURBSSurface
Create a NURBS surface in the XY plane centered at the origin with size
(1, 1) and return it. You would typically call this method from the code
of a Python-defined SOP.

rows, cols:
Determines the size of the 2D array of vertices defining the control
points of the surface. The order of the NURBS surface is 4 in each
of the u and v dimensions, so rows and cols much each be at least 4.

is_closed_in_u, is_closed_in_v:
Controls if the surface is open or closed in each of the dimensions;
see [Hom:hou.Surface#isClosedInU] for more information. If not
specified, the default behaviour is to build an open surface.

If the geometry contains primitive attributes, the new surface receives the
default values for those attributes.

You can move or resize the surface using [Hom:hou.Prim#transform].

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (9 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

Raises [Hom:hou.OperationFailed] if the number of rows and/or columns


is invalid.

{{{
#!python
# This code will work from inside a Python SOP, but not from the Python
# shell.
geo = hou.pwd().geometry()

# Create a surface with a 10x10 grid of vertices.


surf = geo.createNURBSSurface(10, 10)

# Initially, the center is at (0, 0, 0), size is (1, 1, 1), on the XY


# plane. Scale to (20, 10) and rotate into the XZ plane.
geo.transformPrims((surf,),
hou.hmath.buildScale((20, 10, 1)) *
hou.hmath.buildRotateAboutAxis((1, 0, 0), 90))
}}}

See also:
- [Hom:hou.Geometry#transformPrims]
- [Hom:hou.Matrix4]
- [Hom:hou.hmath]

::`createBezierSurface(self, rows, cols, is_closed_in_u=False, is_closed_in_v=False)` -> [Hom:hou.Surface]:


#cppname: HOM_Geometry::createBezierSurface
Create a Bezier surface in the XY plane centered at the origin with size
(1, 1) and return it. You would typically call this method from the code
of a Python-defined SOP.

rows, cols:
Determines the size of the 2D array of vertices defining the control
points of the surface. The surface must have `3n+1`, `n>=1` (e.g. 4,
7, 10, ...) rows/columns if it is open in that dimension, and `3n`,
`n>=1` (e.g. 3, 6, 9, ...) rows/columns if it is closed in that
dimension. Otherwise, this method raises [Hom:hou.OperationFailed].

Note that the number of rows corresponds to `v` and the number or
columns corresponds to `u`, which can be slightly confusing. For
example, `geo.createBezierSurface(9, 7, is_closed_in_u=False,
is_closed_in_v=True)` is valid, but `geo.createBezierSurface(9, 7,
is_closed_in_u=True, is_closed_in_v=False)` raises
[Hom:hou.OperationFailed].

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (10 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

is_closed_in_u, is_closed_in_v:
Determines if it is open or closed in each of the `u` and `v`
dimensions; see [Hom:hou.Surface#isClosedInU] for more information.

You can move or resize the surface using [Hom:hou.Prim#transform].

If the geometry contains primitive attributes, the new surface receives the
default values for those attributes.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not


modifiable.

{{{
#!python
import math

# This code will work from inside a Python SOP, but not from the Python
# shell.
geo = hou.pwd().geometry()

# Build a tube-like object about the y axis.


num_rows, num_cols = (10, 9)
surf = geo.createBezierSurface(num_rows, num_cols, is_closed_in_u=True)
for v_index in range(num_rows):
for u_index in range(num_cols):
angle = u_index * (2.0 * math.pi) / num_cols
surf.vertex(u_index, v_index).point().setPosition(
(math.cos(angle), v_index / float(num_cols-1), math.sin(angle)))
}}}

::`createMeshSurface(self, rows, cols, is_closed_in_u=False, is_closed_in_v=False)` -> [Hom:hou.Surface]:


#cppname: HOM_Geometry::createNURBSSurface
Create a quadrilateral mesh surface in the XY plane centered at the origin
with size (1, 1) and return it. You would typically call this method from
the code of a Python-defined SOP.

Note that a mesh object is not the same as a set of polygons defining the
same shape. A mesh object is a single primitive.

See [Hom:hou.Geometry#createNURBSSurface] for more information.

::`createVolume(self, xres, yres, zres, bounding_box=None)` -> [Hom:hou.Volume]:


#cppname: HOM_Geometry::createVolume
Given the x, y, and z resolution (or size) of a voxel array, add a new
volume primitive to the geometry and return it. The values in the new

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (11 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

volume's voxels are all zero.

xres, yres, zres:


Integers greater than zero that specify the size of the voxel array
in one dimension. Raises [Hom:hou.OperationFailed] if any of these
values are not positive.

bounding_box:
A [Hom:hou.BoundingBox] that specifies the volume's 3D size. Note that
this size is independent of the volume's voxel resolution. If
this parameter is None, Houdini uses a bounding box going from
(-1,-1,-1) to (1,1,1).

::`createMetaball(self)` -> [Hom:hou.Metaball]:


#cppname: HOM_Geometry::createMetaball
#status: ni

::`deletePrims(self, prims, keep_points=False)`:


#cppname: HOM_Geometry::deletePrims
Delete a sequence of primitives. You would typically call this method
from the code of a Python-defined SOP.

keep_points:
if `True`, the primitive will be deleted but its points will remain.

To delete a single primitive, pass in a sequence with one primitive.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

{{{
#!python
# Delete every other primitive:
prims = [p for p in geo.prims() if p.number() % 2 == 0]
geo.deletePrims(prims)

# Delete the first primitive:


geo.deletePrims([geo.iterPrims()[0]])
}}}

::`deletePoints(self, points)`:
#cppname: HOM_Geometry::deletePoints
Delete a sequence of points. You would typically call this method
from the code of a Python-defined SOP.

Note that Houdini will delete any vertices that reference the point.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (12 of 22) [12/7/2009 4:30:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

For example, suppose you have a box with 6 polygons, each with 4 vertices.
Also suppose that each point on the box is shared by 3 vertices on 3
separate polygons. If you delete one of those points, Houdini will remove
each of those vertices from their corresponding polygons, leaving 3
polygons with 4 vertices and 3 polygons with 3 vertices.

To delete a single primitive, pass in a sequence with one point.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

::`findPointGroup(self, group_name)` -> [Hom:hou.PointGroup] or `None`:


#cppname: HOM_Geometry::findPointGroup
#status: ni

::`findPointGroups(self, pattern)` -> `tuple` of [Hom:hou.PointGroup]:


#cppname: HOM_Geometry::findPointGroups
#replaces: Exp:pointgroupmask
#status: ni

::`pointGroups(self)` -> `tuple` of [Hom:hou.PointGroup]:


#cppname: HOM_Geometry::pointGroups
#replaces: Exp:pointgrouplist
#status: ni

::`findPrimGroup(self, group_name)` -> [Hom:hou.PrimGroup] or `None`:


#cppname: HOM_Geometry::findPrimGroup
#status: ni

::`findPrimGroups(self, pattern)` -> `tuple` of [Hom:hou.PrimGroup]:


#cppname: HOM_Geometry::findPrimGroups
#replaces: Exp:primgroupmask
#status: ni

::`primGroups(self)` -> `tuple` of PrimGroups:


#cppname: HOM_Geometry::primGroups
#replaces: Exp:primgrouplist
#status: ni

::`freeze(self)` -> [Hom:hou.Geometry]:


#cppname: HOM_Geometry::freeze
Return another Geometry object that is not linked to a particular SOP.

When you call [Hom:hou.SopNode#geometry], the resultant Geometry object


retains a reference to that SOP, and is said to be unfrozen. Each time
you access points, primitives, attributes, etc. in an unfrozen Geometry

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (13 of 22) [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

object, Houdini uses the SOP's latest cooked geometry. So, if you change
parameters or change the time for an animated SOP, the Geometry object
will update to the SOP's new geometry.

A frozen Geometry object, however, is not associated with a particular


SOP. When the SOP recooks, the frozen Geometry object will save its
own copy of the point and primitive data, and is unaffected by subsequent
changes to the SOP. When a frozen Geometry object is destroyed, any
geometry copy it created is destroyed.

Calling this method on an unfrozen Geometry object returns a frozen


one. Calling it on a frozen object has no effect, and it returns
a frozen object.

Note that accessing a Geometry object's points, primitives, attributes,


etc. may be faster when dealing with frozen objects. So, you may want
to work with frozen Geometry in speed-sensitive operations.

::`sopNode(self)` -> [Hom:hou.SopNode]:


#cppname: HOM_Geometry::sopNode
If the Geometry is not frozen, return the [Hom:hou.SopNode] object
corresponding to this Geometry. Otherwise, return None.

See [Hom:hou.Geometry#freeze] for more information on frozen geometry.

::`points(self)` -> `tuple` of [Hom:hou.Point]:


#cppname: HOM_Geometry::points
Return a tuple of all the points in the geometry.

See also the [Hom:hou.Geometry#iterPoints] method.

::`iterPoints(self)` -> generator of [Hom:hou.Point]:


#cppname: HOM_Geometry::iterPoints
#replaces: Exp:haspoint, Exp:point, Exp:points, Exp:pointlist, Exp:poppoint
Return a generator that iterates through all the points in the geometry.

Whereas [Hom:hou.Geometry#points] allocates and returns a tuple of all the


points in the geometry, this method returns a generator object that will
allocate [Hom:hou.Point] objects on demand. This object is very fast at
random access into the sequence.

If you're accessing a specific point by index and the geometry contains many
points, it is faster to use iterPoints() than points(). If, however, you
are iterating over all the points in the geometry, it is generally faster
to use points() than iterPoints().

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (14 of 22) [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

{{{
#!python
# This is preferred:
geo.iterPoints()[23]

# over this:
geo.points()[23]

# But this is preferred:


for point in geo.points():
...process point...

# over this:
for point in geo.iterPoints():
...process point...
}}}

::`globPoints(self, patern)` -> `tuple` of [Hom:hou.Point]:


#cppname: HOM_Geometry::globPoints
#replaces: Exp:pointpattern
Return a tuple of points corresponding to a pattern of point numbers.

The pattern format is the same one used by the group fields on SOP
nodes that take point selections. Elements in the pattern are separated
by spaces, and elements can be point numbers, point number ranges,
or group names.

This method can be useful when writing a Python SOP that works on only
a selected set of points.

Raises [Hom:hou.OperationFailed] if the pattern is not valid or if it


refers to a group that does not exist. Note that an empty pattern is
considered to be invalid. Numbers that do not refer to valid points are
not errors, and simply do not match points.

{{{
#!python
# Return a tuple containing points 5 and 7.
geo.globPoints("5 7")

# Return a tuple containing points 5 to 10.


geo.globPoints("5-10")

# Return a tuple containing all the points in the pointgroup called group1.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (15 of 22) [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

geo.globPoints("group1")

# Return all the points except those from 0 to 98.


geo.globPoints("!0-98")

# Return points 5, 10 to 20, and those in group1.


geo.globPoints("5 group1 10-20")
}}}

The following Python SOP example is behaves similarly to the


[Node:sop/point] sop.
{{{
#!python
# This code will work from inside a Python SOP, but not from the Python
# shell. It assumes the Python sop has the following parm tuples:
# group: A string containing which points to affect
# t: A set of 3 floats that behaves like the point sop's position
# parameter. Set these parameters to the expressions ($TX, $TY, $TZ).
geo = hou.pwd().geometry()

# Use the group field to determine which points to affect. If it's blank,
# operate on all points.
pattern = hou.ch("group")
if pattern == "":
points = geo.points()
else:
points = geo.globPoints(pattern)

# Loop through the points, setting the SOP's current point as we go.
# Then evaluate the t parm tuple, so it can use the current point (e.g.
# with hscript's $TX or Python's pwd().curPoint()).
for point in points:
hou.pwd().setCurPoint(point)
new_position = hou.pwd().evalParmTuple("t")
point.setPosition(new_position)
}}}

::`findClosestPoint(self, pos3)` -> [Hom:hou.Point] or `None`:


#cppname: HOM_Geometry::findClosestPoint
#replaces: Exp:nearpoint
#status: ni

::`findClosestPrim(self, pos3)` -> [Hom:hou.Prim] or `None`:


#cppname: HOM_Geometry::findClosestPrim
#replaces: Exp:xyzdist

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (16 of 22) [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

#status: ni

::`nearestPrim(self, position)` -> ([Hom:hou.Prim] or `None`, `float`, `float`, `float`):


#cppname: HOM_Geometry::nearestPrim
#replaces: Exp:xyzdist
Given a sequence of three floats containing a position, find the location
on the primitive closest to that position and return a tuple containing
that primitive, the u value on the primitive, the v value on the primitive,
and the distance to the primitive.

Note that the first value in the return tuple can be None if there are
no primitives in the geometry.

::`findParticleById(self, particle_id)` -> [Hom:hou.Point] or `None`:


#cppname: HOM_Geometry::findParticleById
#replaces: Exp:poppointid, Exp:poppointnum
#status: ni

::`pointFloatAttribValues(self, name)` -> `tuple` of `float`:


#cppname: HOM_Geometry::pointFloatAttribValues
Return a tuple of floats containing one attribute's values for all the
points.

This method only works on int or float attributes. If the attribute


contains more than one element, each point will correspond to multiple
values in the result. For example, if "Cd" is a float attribute of size 3
and there are 3 points with values (0.1, 0.2, 0.3), (0.5, 0.5, 0.5), and
(0.8, 0.7, 0.6) then the result will be (0.1, 0.2, 0.3, 0.5, 0.5, 0.5, 0.8,
0.7, 0.6).

Calling this method is faster than looping over all the points and calling
[Hom:hou.Point#attribValue]

If the attribute name is invalid or the attribute is not an int or float


(e.g. it's a string attribute), this method raises
[Hom:hou.OperationFailed].

Note that you cannot pass a [Hom:hou.Attrib] object to this method like
you can with many methods dealing with attributes. However, you can use
[Hom:hou.Attrib#name] to easily get the name from an Attrib object.

::`setPointFloatAttribValues(self, name, values)`:


#cppname: HOM_Geometry::setPointFloatAttribValues
For a particular attribute, set the attribute values for all points.
You would typically call this method from the code of a Python-defined

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (17 of 22) [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

SOP.

name:
The name of the point attribute.
values:
A sequence of int or float values in the same format as that returned
by [Hom:hou.Geometry#pointFloatAttribValues]. See that method for
more information.

Raises [Hom:hou.OperationFailed] if the attribute name is not valid, the


attribute is not an int or float (i.e. it's a string), or the array of
values it not the correct size.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not


modifiable.

Also see [Hom:hou.Geometry#pointFloatAttribValues].

::`prims(self)` -> `tuple` of [Hom:hou.Prim]:


#cppname: HOM_Geometry::prims
#replaces: Exp:hasprim, Exp:prim, Exp:prims, Exp:primlist
Return a tuple of all the primitives in the geometry. The primitives
returned will be subclasses of [Hom:hou.Prim] (e.g.polygons, volumes,
etc.).

See also:
- [Hom:hou.Geometry#iterPrims]
- [Hom:hou.Face]
- [Hom:hou.Polygon]
- [Hom:hou.Surface]
- [Hom:hou.Volume]

::`iterPrims(self)` -> generator of [Hom:hou.Prim]:


#cppname: HOM_Geometry::iterPrims
Return a generator that iterates through all the primitives in the
geometry.

Whereas [Hom:hou.Geometry#prims] allocates and returns a tuple of all the


primitives in the geometry, this method returns a generator object that
will yield [Hom:hou.Prim] objects on demand. This object is very fast at
random access into the sequence.

If you're accessing a specific primitive by index and the geometry contains


many primitives, it is faster to use iterPrims() than prims(). If, however,
you are iterating over all the primitives in the geometry, it is generally

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (18 of 22) [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

faster to use prims() than iterPrims().

{{{
#!python
# This is preferred:
geo.iterPrims()[23]

# over this:
geo.prims()[23]

# But this is preferred:


for prim in geo.prims():
...process prim...

# over this:
for prim in geo.iterPrims():
...process prim...
}}}

See also the [Hom:hou.Geometry#prims] method.

::`globPrims(self, patern)` -> `tuple` of [Hom:hou.Prim]:


#cppname: HOM_Geometry::globPrims
Return a tuple of primitives corresponding to a pattern of primitive
numbers.

The pattern format is the same one used by the group fields on SOP nodes
that take primitive selections. See [Hom:hou.Geometry#globPoints] for
more information.

::`primFloatAttribValues(self, name)` -> `tuple` of `float`:


#cppname: HOM_Geometry::primFloatAttribValues
Return a tuple of floats containing one attribute's values for all the
primitives.

This method only works on int or float attributes. If the attribute


contains more than one element, each primitive will correspond to multiple
values in the result. For example, if "Cd" is a float attribute of size 3
and there are 3 primitives with values (0.1, 0.2, 0.3), (0.5, 0.5, 0.5), and
(0.8, 0.7, 0.6) then the result will be (0.1, 0.2, 0.3, 0.5, 0.5, 0.5, 0.8,
0.7, 0.6).

Calling this method is faster than looping over all the points and calling
[Hom:hou.Point#attribValue]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (19 of 22) [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

If the attribute name is invalid or the attribute is not an int or float


(e.g. it's a string attribute), this method raises
[Hom:hou.OperationFailed].

Note that you cannot pass a [Hom:hou.Attrib] object to this method like
you can with many methods dealing with attributes. However, you can use
[Hom:hou.Attrib#name] to easily get the name from an Attrib object.

::`setPrimFloatAttribValues(self, name, values)`:


#cppname: HOM_Geometry::setPrimFloatAttribValues
For a particular attribute, set the attribute values for all primitives.
You would typically call this method from the code of a Python-defined
SOP.

name:
The name of the primitive attribute.
values:
A sequence of int or float values in the same format as that returned
by [Hom:hou.Geometry#primFloatAttribValues]. See that method for
more information.

Raises [Hom:hou.OperationFailed] if the attribute name is not valid, the


attribute is not an int or float (i.e. it's a string), or the array of
values it not the correct size.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not


modifiable.

Also see [Hom:hou.Geometry#primFloatAttribValues].

::`saveToFile(self, file_name)`:
#cppname: HOM_Geometry::saveToFile
#replaces: Cmd:opsave
Save the contents of the geometry object to a file. The file extension
determines what file format to use.

All file formats supported by Houdini (e.g. geo, bgeo, obj, etc.),
including extensions listed in `GEOio`, are supported. If the file
extension is not recognized, the bgeo format is used.

Raises [Hom:hou.OperationFailed] if the path to the file is invalid or


there were permission or other I/O errors.

::`transform(self, matrix)`:
#cppname: HOM_Geometry::transform

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (20 of 22) [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

Transforms (e.g. rotates, scales, translates, etc.) the geometry by a


transformation matrix. You would typically call this method from the code
of a Python-defined SOP.

See [Hom:hou.hmath] for functions that build transformation matrices.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not


modifiable.

::`transformPrims(self, prims, matrix)`:


#cppname: HOM_Geometry::transform
Transforms a set of primitives (e.g. rotates, scales, translates, etc.) by
a transformation matrix. You would typically call this method from the
code of a Python-defined SOP.

{{{
#!python
import math

# This code will work from inside a Python SOP, but not from the Python
# shell.

def createCircle(geo, num_vertices=10):


# Create a closed curve with the specified number of vertices.
curve = geo.createNURBSCurve(num_vertices)
curve.setIsClosed(True)

# Arrange the points into a unit circle on the XZ plane,


# centered about the origin.
for i, vertex in enumerate(curve.vertices()):
angle = i * (2.0 * math.pi) / num_vertices
position = (math.cos(angle), 0, math.sin(angle))
vertex.point().setPosition(position)
return curve

# Create a bunch of circles on the XZ plane, tilt them slightly


# about X, translate them away from the origin, and rotate each
# one about the y axis by a different amount.
geo = hou.pwd().geometry()
num_copies = 20
for i in range(num_copies):
curve = createCircle(geo)
geo.transformPrims([curve],
hou.hmath.buildRotateAboutAxis((1, 0, 0), 30) *
hou.hmath.buildTranslate((2, 0, 0)) *

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (21 of 22) [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry

hou.hmath.buildRotateAboutAxis((0, 1, 0), i * 360.0 / num_copies))


}}}

See [Hom:hou.hmath] functions that build transformation matrices.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not


modifiable.

::`metaballWeight(self, pos3)`:
#cppname: HOM_Geometry::metaballWeight
#replaces: Exp:metaweight
#status: ni

::`seamPoints(self, seam_half)` -> `tuple` of [Hom:hou.Point]:


#cppname: HOM_Geometry::seamPoints
#replaces: Exp:seampoints
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry (22 of 22) [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Metaball

= hou.Metaball =
#type: homclass
#cppname: HOM_Metaball
#superclass: hou.Prim
#category: Geometry
#status: ni

@methods

::`point(self)`:
#cppname: HOM_Metaball::point
#status: ni

::`setWeight(self, weight)`:
#cppname: HOM_Metaball::setWeight
#status: ni

::`weight(self)`:
#cppname: HOM_Metaball::weight
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Metaball [12/7/2009 4:30:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Point

= hou.Point =
#type: homclass
#cppname: HOM_Point
#category: Geometry

"""Each Point object resides inside a Geometry object and stores a


3D position. Points may be shared between primitives (such as polygons), and
the set of points and primitives describes a 3D shape."""

The set of points may also store arbitrary data in the form of attributes,
and each point instance stores a unique attribute value.

@methods

::`attribValue(self, name_or_attrib)` -> `int`, `float`, `str` or `tuple`:


#cppname: HOM_Point::attribValue
#replaces: Exp:point, Exp:points, Exp:poppoint, Exp:poppointid
Return value stored in this point for a particular attribute. The
attribute may be specified by name or by [Hom:hou.Attrib] object.

Looking up an attribute value using a [Hom:hou.Attrib] object is slightly


faster than looking it up by name. When looking up attribute values inside
a loop, look up the [Hom:hou.Attrib] object outside the loop, and pass it
into this method.

Note that the point position attribute is named `P` and is 4 floats in size.
This attribute always exists.

When looking up the attribute values of all points, it is faster to call


[Hom:hou.Geometry#pointFloatAttribValues] than to call this method for each
point in the geometry.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name.

{{{
#!python
# Create an object containing two SOPs: a box SOP wired into a color SOP.
geo_node = hou.node("/obj").createNode("geo")
box = geo_node.createNode("box")
color = geo_node.createNode("color")
color.setFirstInput(box)

http://www.sidefx.com/docs/houdini10.0/hom/hou/Point (1 of 7) [12/7/2009 4:30:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Point

# Grab the color SOP's geometry, get its first point, and print out the
# value of the Cd attribute.
geo = color.geometry()
point = geo.iterPoints()[0]
print point.attribValue("Cd")

# Look up the Cd attribute and illustrate how to access the attribute


# value using the attribute object.
cd_attribute = geo.findPointAttrib("Cd")
print point.attribValue(cd_attribute)
}}}

::`floatAttribValue(self, name_or_attrib)` -> `float`:


#cppname: HOM_Point::floatAttribValue
Return the point attribute value for a particular floating point attribute.
The attribute may be specified by name or by [Hom:hou.Attrib] object.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name


or the attribute is not float of size 1.

In most cases, you'll just use [Hom:hou.Point#attribValue] to access


attribute values. Houdini uses this method internally to implement
attribValue.

::`floatListAttribValue(self, name_or_attrib)` -> `tuple` of `float`:


#cppname: HOM_Point::floatListAttribValue
Return the point attribute value for a particular floating point
attribute. The attribute may be specified by name or by
[Hom:hou.Attrib] object. The return value is a list of floats.

It is valid to call this method when the attribute's size is 1. In this


case, a list with one element is returned.

See also [Hom:hou.Point#attribValue].

::`intAttribValue(self, name_or_attrib)` -> `int`:


#cppname: HOM_Point::intAttribValue
Return the point attribute value for a particular integer
attribute of size 1. The attribute may be specified by name or by
[Hom:hou.Attrib] object. See [Hom:hou.Point#floatAttribValue] for more
information.

::`intListAttribValue(self, name_or_attrib)` -> `tuple` of `int`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/Point (2 of 7) [12/7/2009 4:30:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Point

#cppname: HOM_Point::intListAttribValue
Return the point attribute value for a particular integer attribute. The
attribute may be specified by name or by [Hom:hou.Attrib] object. The
return value is a list of ints. See [Hom:hou.Point#floatListAttribValue]
for more information.

::`stringAttribValue(self, name_or_attrib)` -> `str`:


#cppname: HOM_Point::stringAttribValue
Return the point attribute value for a particular string attribute. The
attribute may be specified by name or by [Hom:hou.Attrib] object. See
[Hom:hou.Point#floatAttribValue] for more information.

::`position(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_Point::position
Return the position of this point as a Vector3 containing the (X, Y, Z)
position values.

This method is a shortcut for accessing the `P` attribute of the point.
{{{
#!python
point.position()
# is equivalent to
hou.Vector3(point.attribValue("P"))
}}}

Because the position is returned as a Vector3, it can be accessed as


a sequence. However, you can also easily use [Hom:hou.Matrix4] to
transform the position.

See also:
- [Hom:hou.Point#weight]
- [Hom:hou.Vector3]
- [Hom:hou.Matrix4]

::`weight(self)` -> `float`:


#cppname: HOM_Point::weight
Return the weight of this point. Point weights are displayed in Houdini's
geometry spreadsheet as the fourth component of the position, and are
used in NURBS curves and surfaces.

Most of the time, the weight is 1.0.

This method is a shortcut for accessing the `Pw` attribute of the point.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Point (3 of 7) [12/7/2009 4:30:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Point

{{{
#!python
point.weight()
# is equivalent to
point.attribValue("Pw")
}}}

You can build a [Hom:hou.Vector4] containing both the position and weight
as follows:
{{{
#!python
hou.Vector4(tuple(point.position()) + (point.weight(),))
}}}

See also [Hom:hou.Point#position].

::`setAttribValue(self, name_or_attrib, attrib_value)`:


#cppname: HOM_Point::setAttribValue
Store an attribute value in this point. The attribute may be specified by
name or by [Hom:hou.Attrib] object, and must be an existing point attribute
in the geometry. You would typically call this method from the code of a
Python-defined SOP.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name


or if the attribute's data type does not match the value passed in. If the
attribute's size is more than 1, the attribute value must be a sequence of
integers/floats, and the size of the sequence must match the attribute's
size.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

See [Hom:hou.Geometry#addAttrib] for an example.

See also:
- [Hom:hou.Prim#setAttribValue]
- [Hom:hou.Vertex#setAttribValue]
- [Hom:hou.Geometry#setGlobalAttribValue]

::`setPosition(self, position)`:
#cppname: HOM_Point::setPosition
Changes the point's location. You would typically call this method from
the code of a Python-defined SOP.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Point (4 of 7) [12/7/2009 4:30:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Point

position:
Any sequence of floats, such has a [Hom:hou.Vector3] or a tuple of
floats, of length either 3 or 4. The fourth coordinate corresponds to
the weight, and is usually 1. The weight is typically used by NURBS
curves and sequences. If the sequence is of size 3, the weight will be
unchanged.

This method is a shortcut for calling [Hom:hou.Point#setAttribValue] on


the `P` attribute.

{{{
#!python
point.setPosition((x, y, z))
# is the same as
point.setAttribValue("P", (x, y, z))
}}}

Raises [Hom:hou.GeometryPermissionError] if the geometry is not modifiable.


Raises [Hom:hou.InvalidSize] if the length of `position` is not 3.

See also [Hom:hou.Point#setWeight].

::`setWeight(self, weight)`:
#cppname: HOM_Point::setWeight
Change the point's weight. You would typically call this method from
the code of a Python-defined SOP.

This method is a shortcut for calling [Hom:hou.Point#setAttribValue] on


the `Pw` attribute.

See [Hom:hou.Point#weight] for more information about a point's weight.


See also [Hom:hou.Point#setPosition].

::`attribType(self)` -> [Hom:hou.attribType] enum value:


#cppname: HOM_Point::attribType
Return the enumerated value [Hom:hou.attribType#Point]. Points,
primitives, vertices, and geometry support the same set of methods for
querying their attributes, and this method is one of them.

See also:
- [Hom:hou.Prim#attribType]
- [Hom:hou.Vertex#attribType]
- [Hom:hou.Geometry#attribType]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Point (5 of 7) [12/7/2009 4:30:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Point

- [Hom:hou.attribType]

::`geometry(self)` -> [Hom:hou.Geometry]:


#cppname: HOM_Point::geometry
Return the [Hom:hou.Geometry] object containing this point.

::`number(self)` -> `int`:


#cppname: HOM_Point::number
#replaces: Exp:pointlist, Exp:poppointnum
Return the number of this point. Points are numbered sequentially
starting from 0, and the points returned by [Hom:hou.Geometry#points]
are in order by their number.

::`transform(self, matrix)`:
#cppname: HOM_Point::transform
#status: ni

::`destroy(self)`:
#cppname: HOM_Point::destroy
#status: ni

::`closestPrim(self)` -> [Hom:hou.Prim] or `None`:


#cppname: HOM_Point::closestPrim
#status: ni

::`minDistanceToPrim(self, prim)`:
#cppname: HOM_Point::minDistanceToPrim
#replaces: Exp:pointdist
#status: ni

::`pointsOnPrimsSharingThisPoint(self, num_prims)` -> `tuple` of [Hom:hou.Point]:


#cppname: HOM_Point::pointsOnPrimsSharingThisPoint
#replaces: Exp:pointneighbours
#status: ni

::`uvOfClosestLocationOnPrim(self, prim)`:
#cppname: HOM_Point::uvOfClosestLocationOnPrim
#status: ni

::`hasCollided(self)`:
#cppname: HOM_Point::hasCollided
#replaces: Exp:iscollided
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Point (6 of 7) [12/7/2009 4:30:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Point

::`isStuck(self)`:
#cppname: HOM_Point::isStuck
#replaces: Exp:isstuck
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Point (7 of 7) [12/7/2009 4:30:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PointGroup

= hou.PointGroup =
#type: homclass
#cppname: HOM_PointGroup
#category: Geometry
#status: ni

@methods

::`geometry(self)` -> Geometry:


#cppname: HOM_PointGroup::geometry
#status: ni

::`hasPoint(self, point)`:
#cppname: HOM_PointGroup::hasPoint
#status: ni

::`name(self)`:
#cppname: HOM_PointGroup::name
#status: ni

::`points(self)` -> tuple of Points:


#cppname: HOM_PointGroup::points
#status: ni

@replaces

- [Exp:haspoint]
- [Exp:pointlist]

http://www.sidefx.com/docs/houdini10.0/hom/hou/PointGroup [12/7/2009 4:30:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Polygon

= hou.Polygon =
#type: homclass
#cppname: HOM_Polygon
#superclass: hou.Face
#category: Geometry

"""A Polygon is a kind of Face whose vertices are connected via straight
lines."""

Currently, [Hom:hou.Face], and its base class [Hom:hou.Prim] contain all the
necessary methods for polygon inspection and manipulation.

@methods

http://www.sidefx.com/docs/houdini10.0/hom/hou/Polygon [12/7/2009 4:30:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Prim

= hou.Prim =
#type: homclass
#cppname: HOM_Prim
#category: Geometry

"""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."""

This class has a number of subclasses for the different primitive types,
such as [Hom:hou.Polygon] and [Hom:hou.Volume].

@methods

::`attribValue(self, name_or_attrib)` -> `int`, `float`, `str` or `tuple`:


#cppname: HOM_Prim::attribValue
#replaces: Exp:prim, Exp:prims
Return the value stored in this primitive for a particular attribute. The
attribute may be specified by name or by [Hom:hou.Attrib] object.

Looking an attribute value using a [Hom:hou.Attrib] object is slightly


faster than looking it up by name. When looking up attribute values inside
a loop, look up the [Hom:hou.Attrib] object outside the loop, and pass it
into this method.

When looking up the attribute values of all primitives, it is faster to


call [Hom:hou.Geometry#primFloatAttribValues] than to call this method for
each primitive in the geometry.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name.

::`floatAttribValue(self, attrib)` -> `float`:


#cppname: HOM_Prim::floatAttribValue
Return the primitive attribute value for a particular floating point
attribute. The attribute may be specified by name or by [Hom:hou.Attrib]
object.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name


or the attribute is not float of size 1.

In most cases, you'll just use [Hom:hou.Prim#attribValue] to access

http://www.sidefx.com/docs/houdini10.0/hom/hou/Prim (1 of 5) [12/7/2009 4:30:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Prim

attribute values. Houdini uses this method internally to implement


attribValue.

::`floatListAttribValue(self, name_or_attrib)` -> `tuple` of `float`:


#cppname: HOM_Prim::floatListAttribValue
Return the primitive attribute value for a particular floating point
attribute. The attribute may be specified by name or by
[Hom:hou.Attrib] object. The return value is a list of floats.

It is valid to call this method when the attribute's size is 1. In this


case, a list with one element is returned.

See also [Hom:hou.Prim#attribValue].

::`intAttribValue(self, name_or_attrib)` -> `int`:


#cppname: HOM_Prim::intAttribValue
Return the primitive attribute value for a particular integer
attribute of size 1. The attribute may be specified by name or by
[Hom:hou.Attrib] object. See [Hom:hou.Point#floatAttribValue] for more
information.

::`intListAttribValue(self, name_or_attrib)` -> `tuple` of `int`:


#cppname: HOM_Prim::intListAttribValue
Return the primitive attribute value for a particular integer attribute.
The attribute may be specified by name or by [Hom:hou.Attrib] object. The
return value is a list of ints. See [Hom:hou.Prim#floatListAttribValue]
for more information.

::`stringAttribValue(self, name_or_attrib)` -> `str`:


#cppname: HOM_Prim::stringAttribValue
Return the primitive attribute value for a particular string attribute. The
attribute may be specified by name or by [Hom:hou.Attrib] object. See
[Hom:hou.Prim#floatAttribValue] for more information.

::`setAttribValue(self, name_or_attrib, attrib_value)`:


#cppname: HOM_Prim::setAttribValue
Store an attribute value in this primitive. The attribute may be specified
by name or by [Hom:hou.Attrib] object, and must be an existing primitive
attribute in the geometry. You would typically call this method from the
code of a Python-defined SOP.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name


or if the attribute's data type does not match the value passed in. If the

http://www.sidefx.com/docs/houdini10.0/hom/hou/Prim (2 of 5) [12/7/2009 4:30:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Prim

attribute's size is more than 1, the attribute value must be a sequence of


integers/floats, and the size of the sequence must match the attribute's
size.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

{{{
#!python
# Create a float primitive attribute of size 3 named "Cd", and assign
# each primitive a unique color. This code will work from inside a Python
# SOP, but not from the Python shell.
geo = hou.pwd().geometry()
color_attrib = geo.addAttrib(hou.attribType.Prim, "Cd", (1.0, 1.0, 1.0))
num_prims = len(geo.prims())
color = hou.Color()
for prim in geo.prims():
fraction = float(prim.number()) / num_prims
# Give each primitive a different hue, but full saturation and value.
# Store the RGB value in the attribute.
color.setHSV((fraction * 255, 1, 1))
prim.setAttribValue(color_attrib, color.rgb())
}}}

::`attribType(self)` -> [Hom:hou.attribType] enum value:


#cppname: HOM_Prim::attribType
Return the enumerated value [Hom:hou.attribType#Prim]. Points, primitives,
vertices, and geometry support the same set of methods for querying
their attributes, and this method is one of them.

See also:
- [Hom:hou.Point#attribType]
- [Hom:hou.Vertex#attribType]
- [Hom:hou.Geometry#attribType]
- [Hom:hou.attribType]

::`geometry(self)` -> [Hom:hou.Geometry]:


#cppname: HOM_Prim::geometry
Return the [Hom:hou.Geometry] object containing this primitive.

::`number(self)` -> `int`:


#cppname: HOM_Prim::number
#replaces: Exp:pointlist, Exp:primlist
Return the number of this primitive. Primitives are numbered sequentially

http://www.sidefx.com/docs/houdini10.0/hom/hou/Prim (3 of 5) [12/7/2009 4:30:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Prim

starting from 0, and the primitives returned by [Hom:hou.Geometry#prims]


are in order by their number.

::`type(self)` -> [Hom:hou.primType] enum value:


#cppname: HOM_Prim::type
Return a [Hom:hou.primType] value containg the type of this primitive
(e.g. polygon, NURBS curve, metaball, etc).

::`vertices(self)` -> generator of [Hom:hou.Vertex]:


#cppname: HOM_Prim::vertices
Return a sequence of the vertices contained in this primitive.

If the primitive is a face (e.g. a polygon or NURBS curve), the result


corresponds to the order of the vertices in that face. If it is a surface
(e.g. a NURBS mesh), however, the primitive has a 2D array of vertices, and
this method returns all vertices in the 2D array, ordered by the rows.

See [Hom:hou.Surface#vertex] for more information about the relationship


between the 2D vertex array and the sequential vertex index, and for more
ways to access the vertices in a surface.

::`numVertices(self)` -> `int`:


#cppname: HOM_Prim::numVertices
A shortcut for `len(self.vertices())`. You probably don't need to call
this method.

::`vertex(self, index)` -> [Hom:hou.Vertex]:


#cppname: HOM_Prim::vertex
A shortcut for `self.vertices()[index]`. You probably don't need to
call this method.

This method supports negative indices to index from the end, just like
`self.vertices()[index]` would. Also, like Python's indexing operator,
it will raise IndexError when the index is out of range.

::`isSplineType(self)` -> `bool`:


#cppname: HOM_Prim::isSplineType
#replaces: Exp:isspline
#status: ni

::`boundingBox(self)` -> [Hom:hou.BoundingBox]:


#cppname: HOM_Prim::boundingBox
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Prim (4 of 5) [12/7/2009 4:30:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Prim

::`nearestToPosition(self, pos3)`:
#cppname: HOM_Prim::nearestToPosition
#replaces: Exp:xyzdist
Given a sequence of three floats containing a position, find the location
on this primitive that is closest to that position. Returns a tuple
containing the u value on this primitive, the v value on this primitive,
and the distance to this primitive.

::`closestPrim(self)` -> [Hom:hou.Prim] or `None`:


#cppname: HOM_Prim::closestPrim
#status: ni

::`minDistanceToPrim(self, prim)`:
#cppname: HOM_Prim::minDistanceToPrim
#replaces: Exp:primdist
#status: ni

::`primsSharingPoints(self, num_points)` -> `tuple` of [Hom:hou.Prim]:


#cppname: HOM_Prim::primsSharingPoints
#replaces: Exp:primneighbours
#status: ni

::`ourUVAtClosestLocationToPrim(self, prim)`:
#cppname: HOM_Prim::ourUVAtClosestLocationToPrim
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Prim (5 of 5) [12/7/2009 4:30:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PrimGroup

= hou.PrimGroup =
#type: homclass
#cppname: HOM_PrimGroup
#category: Geometry
#status: ni

@methods

::`geometry(self)` -> Geometry:


#cppname: HOM_PrimGroup::geometry
#status: ni

::`hasPrim(self, prim)`:
#cppname: HOM_PrimGroup::hasPrim
#status: ni

::`name(self)`:
#cppname: HOM_PrimGroup::name
#status: ni

::`prims(self)` -> tuple of Prims:


#cppname: HOM_PrimGroup::prims
#status: ni

@replaces

- [Exp:primlist]
- [Exp:hasprim]

http://www.sidefx.com/docs/houdini10.0/hom/hou/PrimGroup [12/7/2009 4:30:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Quadric

= hou.Quadric =
#type: homclass
#cppname: HOM_Quadric
#superclass: hou.Prim
#category: Geometry

"""A Quadric is a kind of geometry primitive (Prim object) that represents a


3-dimensional surface defined by a quadratic polynomial equation (e.g. a
sphere or tube)."""

@methods

::`transform(self)` -> [Hom:hou.Matrix3]:


#cppname: HOM_Quadric::transform
Return the 3x3 matrix associated with this quadric. This matrix determines
what type of quadric it is.

See [Wikipedia's Quadric page|http://en.wikipedia.org/wiki/Quadric] for


more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Quadric [12/7/2009 4:30:32 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopCacheWatermark

= hou.SopCacheWatermark =
#type: homclass
#cppname: HOM_SopCacheWatermark
#category: Geometry
#status: ni

@methods

::`check(self)`:
#cppname: HOM_SopCacheWatermark::check
#status: ni

::`destroy(self)`:
#cppname: HOM_SopCacheWatermark::destroy
#status: ni

::`enable(self, on, num_checks_before_unloading=1)`:


#cppname: HOM_SopCacheWatermark::enable
#status: ni

::`name(self)`:
#cppname: HOM_SopCacheWatermark::name
#status: ni

@replaces

- [Cmd:sopcache]

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopCacheWatermark [12/7/2009 4:30:32 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode

= hou.SopNode =
#type: homclass
#cppname: HOM_SopNode
#superclass: hou.Node
#category: Geometry

"""Represents a surface node."""

@methods

::`geometry(self)` -> [Hom:hou.Geometry]:


#cppname: HOM_SopNode::geometry
Return the geometry computed by this SOP node. If the SOP has not already
cooked, this method will cook the SOP.

The returned Geometry object is not frozen. See [Hom:hou.Geometry#freeze]


for more information on frozen Geometry objects.

::`curPoint(self)` -> Point:


#cppname: HOM_SopNode::curPoint
Return this node's current point. You would typically call this method
from an expression on a node that iterates over a set of points and
re-evaluates the parameter for each point.

This method lets you implement the Python equivalent of Hscript's local
variables. Many of Houdini's SOPs iterate over a set of points, and
for each point they store the current point and then evaluate a parameter.
If the parameter contains a local variable, Houdini looks up the SOP's
current point when evaluating that variable. For example, the point SOP
evaluates the `t` parameter for each point, and sets that point's position
according to the value of the parameter. If that parameter contains,
say, the local variable $TX, it will evaluate to the x position of the
current point.

This method gives you access to the [Hom:hou.Point] representation of


Houdini's current point. Using this point you could evaluate the position,
an attribute value, or do more complex operations like compute the
distance from the point to the origin.

Raises [Hom:hou.OperationFailed] if you call this method from outside


a SOP parameter expression, or if the SOP does not support local variables.

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode (1 of 8) [12/7/2009 4:30:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode

The following lists Python equivalents for some point-related Hscript


expression local variables. Note that you can also access local variables
from Python using [Hom:hou.lvar].
{{{
#!python
# $PT (Hscript expression) or lvar('PT') (Python):
pwd().curPoint().number()

# $NPT (Hscript expression) or lvar('NPT') (Python):


len(pwd().geometry().iterPoints())

# $TX (Hscript expression) or lvar('TX') (Python):


pwd().curPoint().position()[0]

# $WEIGHT (Hscript expression) or lvar('WEIGHT`) (Python):


pwd().curPoint().position()[3]

# $CR (Hscript expression) or lvar('CR') (Python):


pwd().curPoint().attribValue("Cd")[0]

# $ID (Hscript expression) or lvar('ID') (Python):


pwd().curPoint().attribValue("id")

# $LIFE (Hscript expression) or lvar('LIFE') (Python):


pwd().curPoint().attribValue("life")

# $VX (Hscript expression) or lvar('VX') (Python):


pwd().curPoint().attribValue("v")[0]
}}}

::`setCurPoint(self, point_or_none)`:
#cppname: HOM_SopNode::setCurPoint
Set this node's current point. You can only call this method from
a Python-defined SOP.

See [Hom:hou.SopNode#curPoint] for an explanation of a SOP's current point.


You would use this method to set the current point from inside a SOP
written in Python, before you evaluate a parameter containing a local
variable referring to the current point. See [Hom:hou.Geometry#globPoints]
for an example.

Note that you can set the current point to None. In this case,
subsequent calls to [Hom:hou.SopNode#curPoint] will raise

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode (2 of 8) [12/7/2009 4:30:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode

[Hom:hou.OperationFailed]. After a Python SOP is done cooking, Houdini


will automatically set the current point back to None.

Raises [Hom:hou.OperationFailed] if called from outside a Python-defined


SOP.

::`curPoint2(self)` -> Point:


#cppname: HOM_SopNode::curPoint2
#status: ni

::`curPrim(self)` -> Prim:


#cppname: HOM_SopNode::curPrim
Return this node's current primitive. You would typically call this method
from an expression on a node that iterates over a set of primitives and
re-evaluates the parameter for each primitive.

See [Hom:hou.SopNode#curPoint] for more information.

The following lists Python equivalents for some primitive-related Hscript


expression local variables. Note that you can also access local variables
from Python using [Hom:hou.lvar].
{{{
#!python
# $PR (Hscript expression) or lvar('PR') (Python):
pwd().curPrim().number()

# $NPR (Hscript expression) or lvar('NPR') (Python):


len(pwd().geometry().iterPrims())

# $NX (Hscript expression) or lvar('NX') (Python):


pwd().curPrim().attribValue("N")[0]
pwd().curPrim().normal()[0]

# $CR (Hscript expression) or lvar('CR') (Python):


pwd().curPrim().attribValue("Cd")[0]
}}}

::`curPrim2(self)` -> Prim:


#cppname: HOM_SopNode::curPrim2
#status: ni

::`setCurPrim(self, prim_or_none)`:
#cppname: HOM_SopNode::setCurPrim

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode (3 of 8) [12/7/2009 4:30:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode

Set this node's current primitive. You can only call this method from
a Python-defined SOP. See [Hom:hou.SopNode#setCurPoint] for more
information.

::`curVertex(self)` -> Vertex:


#cppname: HOM_SopNode::curVertex
Return this node's current vertex. You would typically call this method
from an expression on a node that iterates over a set of primitive
vertices and re-evaluates the parameter for each vertex.

See [Hom:hou.SopNode#curPoint] for more information.

Note that [Hom:hou.SopNode#curPrim] returns the primitive containing this


vertex returned by this method.

The following lists Python equivalents for some vertex-related Hscript


expression local variables. Note that you can also access local variables
from Python using [Hom:hou.lvar].
{{{
#!python
# $VTX (Hscript expression) or lvar('VTX') (Python):
pwd().curVertex().number()

# $NVTX (Hscript expression) or lvar('NVTX') (Python):


pwd().curPrim().numVertices()
}}}

::`curVertex2(self)` -> Vertex:


#cppname: HOM_SopNode::curVertex2
#status: ni

::`setCurVertex(self, vertex_or_none)`:
#cppname: HOM_SopNode::setCurVertex
Set this node's current primitive. You can only call this method from
a Python-defined SOP. See [Hom:hou.SopNode#setCurPoint] for more
information.

Note that setting the current vertex will also set the current primitive
to the primitive containing the vertex.

::`curPointBoundingBox(self)` -> BoundingBox:


#cppname: HOM_SopNode::curPointBoundingBox
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode (4 of 8) [12/7/2009 4:30:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode

::`curPointBoundingBox2(self)` -> BoundingBox:


#cppname: HOM_SopNode::curPointBoundingBox2
#status: ni

::`curPrimBoundingBox(self)` -> BoundingBox:


#cppname: HOM_SopNode::curPrimBoundingBox
#status: ni

::`curPrimBoundingBox2(self)` -> BoundingBox:


#cppname: HOM_SopNode::curPrimBoundingBox2
#status: ni

::`displayNode(self)` -> Node:


#cppname: HOM_SopNode::displayNode
If this is a subnet SOP, return the SOP inside the subnet with its display
flag on. Otherwise, return None.

::`renderNode(self)` -> [Hom:hou.Node]:


#cppname: HOM_SopNode::renderNode
If this is a subnet SOP, return the SOP inside the subnet with its render
flag on. Otherwise, return None.

::`isBypassed(self)` -> `bool`:


#cppname: HOM_SopNode::isBypassed
#replaces: Exp:opflag, Cmd:opget
Return whether this node's bypass flag is on.

::`bypass(self, on)`:
#cppname: HOM_SopNode::bypass
#replaces: Exp:opset
Turn this node's bypass flag on or off, making this node have no effect.

::`isDisplayFlagSet(self)` -> `bool`:


#cppname: HOM_SopNode::isDisplayFlagSet
#replaces: Exp:opflag, Cmd:opget
Return whether this node's display flag is on.

::`setDisplayFlag(self, on)`:
#cppname: HOM_SopNode::setDisplayFlag
#replaces: Exp:opset
Turn this node's display flag on or off.

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode (5 of 8) [12/7/2009 4:30:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode

::`isRenderFlagSet(self)` -> `bool`:


#cppname: HOM_SopNode::isRenderFlagSet
#replaces: Exp:opflag, Cmd:opget
Return whether this node's render flag is on.

::`setRenderFlag(self, on)`:
#cppname: HOM_SopNode::setRenderFlag
#replaces: Exp:opset
Turns this node's render flag on or off.

::`isHighlightFlagSet(self)` -> `bool`:


#cppname: HOM_SopNode::isHighlightFlagSet
#replaces: Exp:opflag, Cmd:opget
Return whether this node's highlight flag is on. When this flag is
turned on, Houdini displays portions of the geometry in yellow in
the viewport, to indicate the operations performed by this SOP.

::`setHighlightFlag(self, on)`:
#cppname: HOM_SopNode::setHighlightFlag
#replaces: Exp:opset
Turn this node's highlight flag on or off.

::`isTemplateFlagSet(self)` -> `bool`:


#cppname: HOM_SopNode::isTemplateFlagSet
#replaces: Exp:opflag, Cmd:opget
Returns whether this node's template flag is on. Templated SOPs are
display as wireframe in the viewport, and you cannot select geometry
from them.

::`setTemplateFlag(self, on)`:
#cppname: HOM_SopNode::setTemplateFlag
#replaces: Exp:opset
Turns this node's template flag on or off.

::`isSelectableTemplateFlagSet(self)` -> `bool`:


#cppname: HOM_SopNode::isSelectableTemplateFlagSet
#replaces: Exp:opflag, Cmd:opget
Return whether this node's selectable template flag is on. A selectable
template displays like the display SOP in the viewport, and you can
select it when choosing points, primitives, etc. Note that only the
display SOP will be included in the containing geometry object or
SOP subnet, however, so selectable templates are only visible while
working inside their SOP network.

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode (6 of 8) [12/7/2009 4:30:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode

::`setSelectableTemplateFlag(self, on)`:
#cppname: HOM_SopNode::setSelectableTemplateFlag
#replaces: Exp:opset
Turn this node's selectable template flag on or off.

::`isHardLocked(self)` -> `bool`:


#cppname: HOM_SopNode::isHardLocked
#replaces: Exp:opflag, Cmd:opget
Return whether this node is hard-locked. A hard-locked node stores
its data inside the node, and no longer responds to parameter or input
node changes.

::`setHardLocked(self, on)`:
#cppname: HOM_SopNode::setHardLocked
#replaces: Exp:opset
Turn this node's hard-lock flag on or off. Locking a node saves its
current cooked geometry into the node. If you unlock a hard-locked
node, it will discard its locked geometry data and recook, computing its
geometry from its inputs and parameters.

::`isSoftLocked(self)` -> `bool`:


#cppname: HOM_SopNode::isSoftLocked
#replaces: Exp:opflag, Cmd:opget
Return whether this node is soft-locked. A soft-locked node stores
position delta information
, preventing all but a small set of
manual modeling changes from being made.

::`setSoftLocked(self, on)`:
#cppname: HOM_SopNode::setSoftLocked
#replaces: Exp:opset
Turns this node's soft-lock flag on or off, allowing a subset of manual
modeling changes to be made to the locked node.

::`isUnloadFlagSet(self)` -> `bool`:


#cppname: HOM_SopNode::isUnloadFlagSet
#replaces: Exp:opflag, Cmd:opget
Returns whether this node's unload flag is on.

::`setUnloadFlag(self, on)`:
#cppname: HOM_SopNode::setUnloadFlag
#replaces: Exp:opset

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode (7 of 8) [12/7/2009 4:30:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode

Turns this node's unload flag on or off.

::`memorySizeInBytes(self)`:
#cppname: HOM_SopNode::memorySizeInBytes
#status: ni

::`createEditSopFromThisTo(self, sop_node, look_for_deforms=False)`:


#cppname: HOM_SopNode::createEditSopFromThisTo
#status: ni

@replaces
#replaces: Cmd:opsave
#replaces: Cmd:opset
#replaces: Cmd:sopcache
#replaces: Cmd:sopcreateedit

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNode (8 of 8) [12/7/2009 4:30:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface

= hou.Surface =
#type: homclass
#cppname: HOM_Surface
#superclass: hou.Prim
#category: Geometry

"""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."""

A [Hom:hou.Face], on the other hand, stores a sequence of vertices, and might


be a polygon or NURBS curve.

@methods

::`numCols(self)`:
#cppname: HOM_Surface::numCols
Return the number of columns in the 2D array of vertices.

::`numRows(self)`:
#cppname: HOM_Surface::numRows
Return the number of rows in the 2D array of vertices.

::`vertex(self, u_index, v_index)`:


#cppname: HOM_Surface::vertex
Return an element in the 2D array of vertices, given the u (column)
and v (row) indices into the array.

Negative indices are allowed, in which case Houdini will index starting
from the last vertex.

For non-negative indices, this method is roughly equivalent to writing


`surf.vertices()[v_index * surf.numCols() + u_index]`.

Raises [Hom:hou.OperationFailed] if the u or v indices are invalid.

{{{
#!python
# Use a grid SOP to create a NURBS grid with 3 rows and 2 columns.
geo = hou.node("/obj").createNode("geo").createNode("grid").geometry()

http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface (1 of 6) [12/7/2009 4:30:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface

grid_node = geo.sopNode()
grid_node.setDisplayFlag(True)
for name, value in ("type", "nurbs"), ("rows", 5), ("cols", 4):
grid_node.parm(name).set(value)

# Print out the x positions of all the vertices in the surface.


surf = geo.iterPrims()[0]
for v_index in surf.numRows():
for u_index in surf.numCols():
print surf.vertex(u_index, v_index).point().position()[0],
print
}}}

See also:
- [Hom:hou.Prim#vertices]
- [Hom:hou.Surface#verticesInCol]
- [Hom:hou.Surface#verticesInRow]
- [Hom:hou.Geometry#iterPrims]

::`verticesInCol(self, u_index)`:
#cppname: HOM_Surface::verticesInRow
Given a u (i.e. column) index, return a tuple containing all the vertices
in that column.

See also [Hom:hou.Prim#vertices].

::`verticesInRow(self, v_index)`:
#cppname: HOM_Surface::verticesInRow
Given a v (i.e. row) index, return a tuple containing all the vertices
in that row.

See also [Hom:hou.Prim#vertices].

::`addCol(self, after=-1)`:
#cppname: HOM_Surface::addCol
Add a column of vertices after the given u (i.e. column) index. You would
typically call this method from the code of a Python-defined SOP.

This method also adds one point per vertex added. The new points are
located at the origin until you move them.

The u (i.e. column) index `after` may be negative, in which case the
indexing starts from the end. By default, `after` is -1, meaning that

http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface (2 of 6) [12/7/2009 4:30:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface

the new column will go after the last column. Raises


[Hom:hou.OperationFailed] if the `after` index is invalid.

{{{
#!python

# This code will work from inside a Python SOP, but not from the Python
# shell.
def vertexPos(vertex):
return hou.Vector3(vertex.point().position())

# Build a NURBS surface.


geo = hou.pwd().geometry()
surf = geo.createNURBSSurface(10, 10)

# Add a new column, and set the new point positions to the average of
# the adjacent point positions.
surf.addCol(after=7)
for v_index in range(surf.numRows()):
vertex_before = surf.vertex(7, v_index)
vertex_after = surf.vertex(9, v_index)
surf.vertex(8, v_index).point().setPosition(
(vertexPos(vertex_before) + vertexPos(vertex_after)) * 0.5)
}}}

::`addRow(self, after=-1)`:
#cppname: HOM_Surface::addRow
Add a row of vertices after the given v (i.e. row) index. The new
vertices are located at the origin until you move them. You would
typically call this method from the code of a Python-defined SOP.

See [Hom:hou.Surface#addCol] for more information.

::`positionAt(self, u, v)` -> Vector4:


#cppname: HOM_Surface::positionAt
#replaces: Exp:primuv
Given normalized (i.e. from 0 to 1) u and v values, returns the position
of the surface at that parametric location.

See [Hom:hou.Point#position] for information about why the position is


a Vector4.

See the [surface_wires cookbook example|/hom/cookbook/surface_wires] for

http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface (3 of 6) [12/7/2009 4:30:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface

an example.

::`normalAt(self, u, v)`:
#cppname: HOM_Surface::normalAt
#replaces: Exp:normal
Given normalized (i.e. from 0 to 1) u and v values, returns the normal
of the surface at that parametric location. The normal is a vector that
is perpendicular to the surface at that location.

The normal vector is normalized (i.e. it is a unit vector, so its length


is 1).

See the [surface_wires cookbook example|/hom/cookbook/surface_wires] for


an example.

::`attribValueAt(self, attrib_name, u, v, du=0, dv=0)`:


#cppname: HOM_Surface::attribValueAt
#replaces: Exp:primuv, Exp:primduv
Return an attribute value at a normalized (u, v) parametric position on
the surface. If du and dv are both 0, returns the interpolated attribute
value; otherwise, returns the (partial) derivative of the attribute value.

Raises [Hom:hou.OperationFailed] if the attribute is not a point or vertex


attribute. If you want a primitive attribute value, it doesn't vary across
the surface, so use [Hom:hou.Prim#attribValue].

::`isClosedInU(self)`:
#cppname: HOM_Surface::isClosedInU
#replaces: Exp:iswrapu
Return whether the first and last columns of vertices are connected.

A grid, for example, is open in both U and V. A tube is open in one of


U or V and closed in the other. A torus is closed in both U and V.

::`isClosedInV(self)`:
#cppname: HOM_Surface::isClosedInV
#replaces: Exp:iswrapv
Return whether the first and last rows of vertices are connected.

See [Hom:hou.Surface#isClosedInU] for more information.

::`uDegree(self)`:
#cppname: HOM_Surface::uDegree

http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface (4 of 6) [12/7/2009 4:30:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface

#replaces: Exp:degree
#status: ni

::`vDegree(self)`:
#cppname: HOM_Surface::vDegree
#replaces: Exp:degree
#status: ni

::`curvature(self, u, v)`:
#cppname: HOM_Surface::curvature
#replaces: Exp:curvature
#status: ni

::`curveOnSurfaceLength(self, u_start, v_start, u_end, v_end)`:


#cppname: HOM_Surface::curveOnSurfaceLength
#replaces: Exp:surflen
#status: ni

::`knotValueU(self, knot_index)`:
#cppname: HOM_Surface::knotValueU
#replaces: Exp:spknot
#status: ni

::`knotValueV(self, knot_index)`:
#cppname: HOM_Surface::knotValueV
#replaces: Exp:spknot
#status: ni

::`parametricToUniformU(self, u)`:
#cppname: HOM_Surface::parametricToUniformU
#replaces: Exp:unituv
#status: ni

::`parametricToUniformV(self, v)`:
#cppname: HOM_Surface::parametricToUniformV
#replaces: Exp:unituv
#status: ni

::`uniformToParametricU(self, u)`:
#cppname: HOM_Surface::uniformToParametricU
#replaces: Exp:realuv
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface (5 of 6) [12/7/2009 4:30:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface

::`uniformToParametricV(self, v)`:
#cppname: HOM_Surface::uniformToParametricV
#replaces: Exp:realuv
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Surface (6 of 6) [12/7/2009 4:30:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vertex

= hou.Vertex =
#type: homclass
#cppname: HOM_Vertex
#category: Geometry

"""Existing inside a Geometry object, a Vertex object is contained in


exactly one Prim, and references exactly one Point."""

This setup allows points to be shared between primitives. For example, a


polygon contains its own list of vertices that are not shared with other
primitives, but vertices in different polygons may refer to the same point.
When that point moves, the corresponding vertices on all adjacent polygons
will also move, preventing polygon edges from separating.

Note that you can use [Hom:hou.Vertex#point] to retrieve a point from a vertex,
but there is no method to retrieve all the vertices referring to a point.
Houdini does not store this information internally, but you can derive it. The
best way to quickly retrieve this information is to build a dictionary mapping
all points to sets of vertices, and then reuse this dictionary in your
algorithm.

@methods

::`attribValue(self, name_or_attrib)` -> `int`, `float`, `str` or `tuple`:


#cppname: HOM_Vertex::attribValue
#replaces: Exp:vertex, Exp:vertexs
Return the value store in this vertex for a particular attribute. The
attribute may be specified by name or by [Hom:hou.Attrib] object.

Looking an attribute value using a [Hom:hou.Attrib] object is slightly


faster than looking it up by name. When looking up attribute values inside
a loop, look up the [Hom:hou.Attrib] object outside the loop, and pass it
into this method.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name.

::`floatAttribValue(self, name_or_attrib)` -> `float`:


#cppname: HOM_Vertex::floatAttribValue
Return the vertex attribute value for a particular floating point
attribute. The attribute may be specified by name or by [Hom:hou.Attrib]
object.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vertex (1 of 4) [12/7/2009 4:30:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vertex

Raises [Hom:hou.OperationFailed] if no attribute exists with this name


or the attribute is not float of size 1.

In most cases, you'll just use [Hom:hou.Vertex#attribValue] to access


attribute values. Houdini uses this method internally to implement
attribValue.

::`floatListAttribValue(self, name_or_attrib)` -> `tuple` of `float`:


#cppname: HOM_Vertex::floatListAttribValue
Return the vertex attribute value for a particular floating point
attribute. The attribute may be specified by name or by
[Hom:hou.Attrib] object. The return value is a list of floats.

It is valid to call this method when the attribute's size is 1. In this


case, a list with one element is returned.

See also [Hom:hou.Vertex#attribValue].

::`intAttribValue(self, name_or_attrib)` -> `int`:


#cppname: HOM_Vertex::intAttribValue
Return the vertex attribute value for a particular integer
attribute of size 1. The attribute may be specified by name or by
[Hom:hou.Attrib] object. See [Hom:hou.Vertex#floatAttribValue] for more
information.

::`intListAttribValue(self, name_or_attrib)` -> `tuple` of `int`:


#cppname: HOM_Vertex::intListAttribValue
Return the vertex attribute value for a particular integer attribute.
The attribute may be specified by name or by [Hom:hou.Attrib] object. The
return value is a list of ints. See [Hom:hou.Vertex#floatListAttribValue]
for more information.

::`stringAttribValue(self, name_or_attrib)` -> `str`:


#cppname: HOM_Vertex::stringAttribValue
Return the vertex attribute value for a particular string attribute. The
attribute may be specified by name or by [Hom:hou.Attrib] object. See
[Hom:hou.Vertex#floatAttribValue] for more information.

::`setAttribValue(self, name_or_attrib, attrib_value)`:


#cppname: HOM_Vertex::setAttribValue
Store an attribute value in this vertex. The attribute may be specified
by name or by [Hom:hou.Attrib] object, and must be an existing vertex
attribute in the geometry. You would typically call this method from the

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vertex (2 of 4) [12/7/2009 4:30:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vertex

code of a Python-defined SOP.

Raises [Hom:hou.OperationFailed] if no attribute exists with this name


or if the attribute's data type does not match the value passed in. If the
attribute's size is more than 1, the attribute value must be a sequence of
integers/floats, and the size of the sequence must match the attribute's
size.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

::`attribType(self)` -> [Hom:hou.attribType] enum value:


#cppname: HOM_Vertex::attribType
Return the enumerated value [Hom:hou.attribType#Vertex]. Points,
primitives, vertices, and geometry support the same set of methods for
querying their attributes, and this method is one of them.

See also:
- [Hom:hou.Point#attribType]
- [Hom:hou.Prim#attribType]
- [Hom:hou.Geometry#attribType]
- [Hom:hou.attribType]

::`point(self)` -> [Hom:hou.Point]:


#cppname: HOM_Vertex::point
Return the [Hom:hou.Point] object that this vertex refers to. Each
vertex refers to exactly one point.

::`prim(self)` -> [Hom:hou.Prim]:


#cppname: HOM_Vertex::prim
Return the [Hom:hou.Prim] object containing this vertex.

If the primitive is a face, use [Hom:hou.Prim#vertices] to access the other


vertices in the primitive. If it is a surface, use
[Hom:hou.Surface#vertex], [Hom:hou.Surface#numRows], and
[Hom:hou.Surface#numCols].

::`geometry(self)` -> `Geometry`:


#cppname: HOM_Vertex::geometry
Return the [Hom:hou.Geometry] object containing this vertex.

::`number(self)` -> `int`:


#cppname: HOM_Vertex::number
Return the number of this vertex. Vertices in the same primitive are

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vertex (3 of 4) [12/7/2009 4:30:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vertex

numbered sequentially starting from 0, and the vertices returned by


[Hom:hou.Prim#vertices] are in order by their number.

::`destroy(self)`:
#cppname: HOM_Vertex::destroy
#status: ni

::`normal(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_Vertex::normal
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vertex (4 of 4) [12/7/2009 4:30:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Volume

= hou.Volume =
#type: homclass
#cppname: HOM_Volume
#superclass: hou.Prim
#category: Geometry

"""A Volume is a kind geometry primitive (Prim object) storing a three


dimensional array of voxels."""

@methods

::`resolution(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_Volume::resolution
Return the x, y, and z dimensions of the volume. For example, a resolution
of (10, 20, 30) means the volume is 10 voxels in x by 20 voxels in y by
30 voxels in z.

::`sample(self, position)` -> `float`:


#cppname: HOM_Volume::sample
Given a sequence of three floats containing a 3D position, return the value
of the volume at that position. If the position is not in the middle of
a voxel, Houdini will interpolate using values from surrounding voxels.

See also [Hom:hou.Volume#voxel] and [Hom:hou.Volume#posToIndex].

::`gradient(self, position)` -> [Hom:hou.Vector3]:


#cppname: HOM_Volume::gradient
Given a sequence of three floats containing a 3D position, return a
vector which points in the direction of the greatest rate of increase
of the volume's value.

See [Wikipedia's gradient page|http://en.wikipedia.org/wiki/Gradient] for


more information.

::`voxel(self, index)` -> `float`:


#cppname: HOM_Volume::voxel
Given a sequence of three integers containing a voxel index, return the
value of the corresponding voxel.

{{{
#!pycon
>>> volume_sop = hou.node("/obj").createNode("geo").createNode("volume")

http://www.sidefx.com/docs/houdini10.0/hom/hou/Volume (1 of 4) [12/7/2009 4:30:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Volume

>>> volume_sop.parm("initialval1").set(0.3)
>>> volume = volume_sop.geometry().prims()[0]
>>> volume.resolution()
(10, 10, 10)
>>> volume.voxel((0, 0, 0))
0.3
}}}

::`setVoxel(self, index, value)`:


#cppname: HOM_Volume::setVoxel
Set the value of a voxel. You would typically call this method from the
code of a Python-defined SOP.

index:
A sequence of three integers containing a voxel index. Raises
[Hom:hou.OperationFailed] if any of the values in index are out
of range.

value:
A float containing the voxel's new value.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

::`allVoxels(self)` -> tuple of float:


#cppname: HOM_Volume::allVoxels
Return a tuple of floats containing the values of all voxels. It is faster
to call this method to retrieve all the voxels than it is to loop through
the voxel array in Python.

You can, for example, use Python's Numpy library to perform operations on
the voxel data and then store the result back into the volume from a Python
SOP using [Hom:hou.Volume#setAllVoxels]. Note that Numpy allows you to
reshape the flat tuple of floats to behave like a 3D matrix of floats.

This method can be approximately implemented as follows (though this Python


implementation is much slower):
{{{
#!python
def allVoxels(self):
result = []
xres, yres, zres = self.resolution()
for z in range(zres):
for y in range(yres):

http://www.sidefx.com/docs/houdini10.0/hom/hou/Volume (2 of 4) [12/7/2009 4:30:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Volume

for x in range(xres):
result.append(self.voxel((x, y, z)))
return tuple(result)
}}}

See also [Hom:hou.Geometry#pointFloatAttribValues] and


[Hom:hou.Geometry#primFloatAttribValues].

::`setAllVoxels(self, values)`:
#cppname: HOM_Volume::setAllVoxels
Set the value of a voxel. You would typically call this method from the
code of a Python-defined SOP.

Raises [Hom:hou.OperationFailed] if the sequence of values is not exactly


the same as `self.resolution()[0] * self.resolution()[1] *
self.resolution()[2]`.

Raises [Hom:hou.GeometryPermissionError] if this geometry is not modifiable.

See also [Hom:hou.Volume#allVoxels].

::`posToIndex(self, position)` -> `tuple` of `int`:


#cppname: HOM_Volume::posToIndex
Given a sequence of three floats containing a 3D position, return a tuple
of three ints containing the corresponding index into the voxel array.

Note that the returned index will be invalid if the position is outside
the volume. Use [Hom:hou.Volume#isValidIndex] to determine if the index is
valid.

::`indexToPos(self, index)` -> [Hom:hou.Vector3]:


#cppname: HOM_Volume::indexToPos
Given a sequence of three ints containing an index into the voxel array,
return the corresponding 3D position of the middle of that voxel.

::`isValidIndex(self, index)` -> `bool`:


#cppname: HOM_Volume::isValidIndex
Return whether or sequence of three ints containing an index into the voxel
array is valid.

This method can approximately be implemented as follows:


{{{
#!python

http://www.sidefx.com/docs/houdini10.0/hom/hou/Volume (3 of 4) [12/7/2009 4:30:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Volume

def isValidIndex(self, index):


for i, maximum in zip(index, self.resolution()):
if i < 0 or i >= maximum:
return False
return True
}}}

::`volumeAverage(self)` -> `float`:


#cppname: HOM_Volume::volumeAverage
Return the average value of all voxels.

::`volumeMin(self)` -> `float`:


#cppname: HOM_Volume::volumeMin
Return the minimum value of all voxels.

::`volumeMax(self)` -> `float`:


#cppname: HOM_Volume::volumeMax
Return the maximum value of all voxels.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Volume (4 of 4) [12/7/2009 4:30:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/attribType

= hou.attribType =
#type: hommodule
#cppname: HOM_attribType
#category: Geometry

"""Enumeration of geometry attribute types."""

* hou.attribType.Point
* hou.attribType.Prim
* hou.attribType.Vertex
* hou.attribType.Global

Note that global attributes are also known as detail attributes.

The type of data (e.g. int, float, string) is called the attribute data type,
can corresponds to [Hom:hou.attribData].

See [Hom:hou.Geometry#addAttrib] and [Hom:hou.Attrib] for more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/attribType [12/7/2009 4:30:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/geometryType

= hou.geometryType =
#type: hommodule
#cppname: HOM_geometryType
#category: Geometry
#status: nd

"""Enumeration of geometry component types."""

* hou.geometryType.Points
* hou.geometryType.Vertices
* hou.geometryType.Edges
* hou.geometryType.Breakpoints
* hou.geometryType.Primitives
* hou.geometryType.PointGroups
* hou.geometryType.PrimitiveGroups

http://www.sidefx.com/docs/houdini10.0/hom/hou/geometryType [12/7/2009 4:30:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/primType

= hou.primType =
#type: hommodule
#cppname: HOM_primType
#category: Geometry
#status: nd

* hou.primType.Face
* hou.primType.Surface
* hou.primType.Quadric
* hou.primType.Polygon
* hou.primType.NURBSCurve
* hou.primType.BezierCurve
* hou.primType.Mesh
* hou.primType.NURBSSurface
* hou.primType.BezierSurface
* hou.primType.Sphere
* hou.primType.Tube
* hou.primType.Mataball
* hou.primType.Volume

http://www.sidefx.com/docs/houdini10.0/hom/hou/primType [12/7/2009 4:30:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/FileTypeInfo

= hou.FileType =
#type: homclass
#cppname: HOM_FileType
#category: IO
#status: ni

::`description(self)` -> `str`:


#cppname: HOM_FileType::description
#status: ni

::`extension(self)`:
#cppname: HOM_FileType::extension
#status: ni

::`__init__(self, extension, description)`:


#cppname: HOM_FileType::__init__
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/FileTypeInfo [12/7/2009 4:30:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/fileReferences

= hou.fileReferences =

#type: homfunction
#cppname: hom::fileReferences
#category: IO
#status: nd

@usage
`fileReferences()` -> tuple of Parm and string tuples

@replaces
- [Cmd:fdependls]

http://www.sidefx.com/docs/houdini10.0/hom/hou/fileReferences [12/7/2009 4:30:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/findDirectories

= hou.findDirectories =
#type: homfunction
#cppname: hom::findDirectories
#category: IO

"""Search the houdini path for the specified directory, returning a tuple of
all the matches. The directory name specified should be relative to the
houdini directory."""

@usage
`findDirectories(directory_name)` -> tuple of strings

If the directory cannot be found in the houdini path, OperationFailed is


raised.

@related

- [Hom:hou.findDirectory]
- [Hom:hou.findFile]
- [Hom:hou.findFiles]
- [Hom:hou.houdiniPath]

http://www.sidefx.com/docs/houdini10.0/hom/hou/findDirectories [12/7/2009 4:30:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/findDirectory

= hou.findDirectory =
#type: homfunction
#cppname: hom::findDirectory
#category: IO

"""Search the houdini path for a specified directory, returning the first
match found. The directory name specified should be relative to the houdini
directory."""

@usage
`findDirectory(directory_name)` -> string

If the directory cannot be found in the houdini path, OperationFailed is


raised.

@related

- [Hom:hou.findDirectories]
- [Hom:hou.findFile]
- [Hom:hou.findFiles]
- [Hom:hou.houdiniPath]

http://www.sidefx.com/docs/houdini10.0/hom/hou/findDirectory [12/7/2009 4:30:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/findFile

= hou.findFile =
#type: homfunction
#cppname: hom::findFile
#category: IO

"""Search the houdini path for a specified file, returning the first match
found. The filename specified should be relative to the houdini directory."""

@usage
`findFile(file_name)` -> string

If the file cannot be found in the houdini path, OperationFailed is raised.


Directories are not found, for directories use [Hom:hou.findDirectory]
instead.

@related

- [Hom:hou.findFiles]
- [Hom:hou.findDirectory]
- [Hom:hou.findDirectories]
- [Hom:hou.houdiniPath]

@replaces

- [Exp:findfile]

http://www.sidefx.com/docs/houdini10.0/hom/hou/findFile [12/7/2009 4:30:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/findFiles

= hou.findFiles =
#type: homfunction
#cppname: hom::findFiles
#category: IO

"""Search the houdini path for the specified file, returning a tuple of all
the matches. The filename specified should be relative to the houdini
directory."""

@usage
`findFiles(file_name)` -> tuple of strings

If the file cannot be found on the houdini path, OperationFailed is raised.


Directories are not found, for directories use [Hom:hou.findDirectories]
instead.

@related

- [Hom:hou.findFile]
- [Hom:hou.findDirectory]
- [Hom:hou.findDirectories]
- [Hom:hou.houdiniPath]

@replaces

- [Exp:findfiles]

http://www.sidefx.com/docs/houdini10.0/hom/hou/findFiles [12/7/2009 4:30:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/homeHoudiniDirectory

= hou.homeHoudiniDirectory =
#type: homfunction
#cppname: homeHoudiniDirectory
#category: IO

"""Return the path to the Houdini directory in your $HOME directory."""

@usage
`homeHoudiniDirectory()` -> str

Return the directory in your $HOME directory where Houdini stores user-specific
settings. On many platforms, this directory is `$HOME/houdiniX.Y`, where `X`
is the Houdini major version and `Y` is the minor version. Note that on the
Mac, though, this directory might be in a different location.

See [Hom:hou.houdiniPath] for more information about how Houdini searches for
files.

@related
- [Hom:hou.houdiniPath]
- [Hom:hou.applicationVersion]
- [Hom:hou.findFile]
- [Hom:hou.findFiles]
- [Hom:hou.findDirectory]
- [Hom:hou.findDirectories]

http://www.sidefx.com/docs/houdini10.0/hom/hou/homeHoudiniDirectory [12/7/2009 4:30:42 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/houdiniPath

= hou.houdiniPath =
#type: homfunction
#cppname: houdiniPath
#category: IO

"""Return the contents of the Houdini path as a tuple of strings."""

@usage
`houdiniPath()` -> bool

Houdini uses the Houdini path when searching for various files, like otls,
shelf tools, preferences, desktops, icons, etc. By adjusting the HOUDINI_PATH
environment variable, you can add entries to the path that are specific to the
current user, job, or studio.

See the output of `hconfig -ap` for more information on the current value of
Houdini path and how to change it.

@related
- [Hom:hou.findFile]
- [Hom:hou.findFiles]
- [Hom:hou.findDirectory]
- [Hom:hou.findDirectories]

http://www.sidefx.com/docs/houdini10.0/hom/hou/houdiniPath [12/7/2009 4:30:42 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/knownFileTypes

= hou.knownFileTypes =
#type: hommodule
#cppname: HOM_knownFileTypes
#category: IO
#status: ni

@functions

::`channelInput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::channelInput
#status: ni

::`channelOutput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::channelOutput
#status: ni

::`geometryInput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::geometryInput
#status: ni

::`geometryOutput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::geometryOutput
#status: ni

::`imageInput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::imageInput
#status: ni

::`imageOutput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::imageOutput
#status: ni

::`lUTInput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::lUTInput
#status: ni

::`lUTOutput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::lUTOutput
#status: ni

::`scriptInput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::scriptInput

http://www.sidefx.com/docs/houdini10.0/hom/hou/knownFileTypes (1 of 2) [12/7/2009 4:30:43 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/knownFileTypes

#status: ni

::`scriptOutput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::scriptOutput
#status: ni

::`simDataInput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::simDataInput
#status: ni

::`simDataOutput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::simDataOutput
#status: ni

::`simInput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::simInput
#status: ni

::`simOutput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::simOutput
#status: ni

::`volumetricInput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::volumetricInput
#status: ni

::`volumetricOutput()` -> tuple of FileTypes:


#cppname: HOM_knownFileTypes::volumetricOutput
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/knownFileTypes (2 of 2) [12/7/2009 4:30:43 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/readFile

= hou.readFile =

#type: homfunction
#cppname: hom::readFile
#category: IO

"""Read a file, returning the contents in a string. Supports regular files,


opdef: and oplib: paths, and http URLs."""

@usage
`readFile(file_path) -> string`

Opdef paths can be specified with the string "opdef:/node?section"


(e.g. "opdef:/Object/subnet1?my_section"). Oplib paths can be specified with
"oplib:/operator?operator" (e.g. "oplib:/Cop2/grain?Cop2/grain").

If the file does not exist or an error occurs while reading, this function
raises hou.OperationFailed.

http://www.sidefx.com/docs/houdini10.0/hom/hou/readFile [12/7/2009 4:30:43 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/CompositorViewer

= hou.CompositorViewer =
#type: homclass
#cppname: HOM_CompositorViewer
#superclass: hou.PathBasedPaneTab
#category: Images
#status: nd

@methods

::`currentState(self)` -> `str`:


#cppname: HOM_CompositorViewer::currentState
#status: nd

::`enterViewState(self, wait_for_exit=False)`:
#cppname: HOM_CompositorViewer::enterViewState
#status: nd

::`modalImageViewer(self)` -> [Hom:hou.ModalImageViewer]:


#cppname: HOM_CompositorViewer::modalImageViewer
#status: ni

::`setCurrentState(self, state, wait_for_exit=False)`:


#cppname: HOM_CompositorViewer::setCurrentState
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/CompositorViewer [12/7/2009 4:30:44 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode

= hou.CopNode =

#type: homclass
#cppname: HOM_CopNode
#superclass: hou.Node
#category: Images

""" Represents a compositing node."""

@methods

::`bypass(self, on)`:
#cppname: HOM_CopNode::bypass
#replaces: Cmd:opset

Turns the node's bypass flag on or off. When the bypass flag is
on, the node will have no effect on the scene. The value of the
`on` argument must be True or False.

Raises [Hom:hou.PermissionError] if the node is unwritable.

::`components(self, plane)` -> `tuple of strings`:


#cppname: HOM_CopNode::components

Returns a tuple of component names for the specified plane in


the node's image sequence. The value of the `plane` argument must
be a plane name.

Raises ValueError if `plane` is None or empty.


Raises [Hom:hou.OperationFailed] if the node could not be cooked or
opened for processing.
Raises [Hom:hou.OperationFailed] if the given plane does not exist.

::`getPixelByUV(self, plane, u, v, component=None, interpolate=True)` -> `tuple of floats`:


#cppname: HOM_CopNode::getPixelByUV
#replaces: Exp:pic, Exp:picni

Returns plane values for a single pixel in the node's image. The
plane is defined by the `plane` argument which must be set to the
plane's name. The pixel is defined by (`u`, `v`) coordinates where
`u` and `v` are values between 0.0 and 1.0. If the optional
`component` argument is specified, then the value for that particular

http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode (1 of 7) [12/7/2009 4:30:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode

component is returned. Otherwise, all of the plane's component


values are returned. The value of `component` should be the
component's name (i.e. "r", "g", "b", etc.).

If the (`u`, `v`) coordinates do not fall exactly on a pixel, then


the return values are calculated by linear blending of the values
for the surrounding pixels. This can be disabled by setting the
`interpolate` argument to False, in which case the values of the
pixel located immediately to the bottom-left of (`u`, `v`) are returned.

Note that the returned values are for the node's image at the
current frame.

Raises ValueError if either `u` or `v` is outside of the 0.0-1.0 range.


Raises ValueError if `plane` is None or empty.
Raises [Hom:hou.OperationFailed] if the node could not be cooked or
opened for processing.
Raises [Hom:hou.OperationFailed] if the given plane does not exist.
Raises [Hom:hou.OperationFailed] if the given component does not exist
in the plane.

::`getPixelHSVByUV(self, u, v, interpolate=True)` -> `tuple of floats`:


#cppname: HOM_CopNode::getPixelHSVByUV
#replaces: Exp:pic, Exp:picni

Returns a 3-tuple containing the hue, saturation and value for


a single pixel in the node's image. The pixel is defined by
(`u`, `v`) coordinates where `u` and `v` are values between 0.0 and 1.0.

If the (`u`, `v`) coordinates do not fall exactly on a pixel, then


the return values are calculated by linear blending of the values
for the surrounding pixels. This can be disabled by setting the
`interpolate` argument to False, in which case the values of the
pixel located immediately to the bottom-left of (`u`, `v`) are returned.

Note that the returned hue, saturation and value are for the
node's image at the current frame.

Raises ValueError if either `u` or `v` is outside of the 0.0-1.0 range.


Raises [Hom:hou.OperationFailed] if the node could not be cooked or
opened for processing.

::`getPixelLuminanceByUV(self, u, v, interpolate=True)` -> `float`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode (2 of 7) [12/7/2009 4:30:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode

#cppname: HOM_CopNode::getPixelLuminanceByUV
#replaces: Exp:pic, Exp:picni

Returns the luminance value for a single pixel in the node's image.
The pixel is defined by (`u`, `v`) coordinates where `u` and `v`
are values between 0.0 and 1.0.

If the (`u`, `v`) coordinates do not fall exactly on a pixel, then


the luminance is calculated by linear blending of the luminance values
for the surrounding pixels. This can be disabled by setting the
`interpolate` argument to False, in which case the luminance of the
pixel located immediately to the bottom-left of (`u`, `v`) is returned.

Note that the returned luminance value is for the node's image
at the current frame.

Raises ValueError if either `u` or `v` is outside of the 0.0-1.0 range.


Raises [Hom:hou.OperationFailed] if the node could not be cooked or
opened for processing.

::`imageBounds(self, plane="C")` -> `tuple of ints`:


#cppname: HOM_CopNode::imageBounds
#replaces: Exp: imgbounds

Returns the x and y boundaries of the given plane in the form


of (xmin, ymin, xmax, ymax). The value of the `plane` argument
is the plane name. By default, the image bounds of the color plane
is returned.

Note that the image bounds is not the same as the image resolution.
For example, the image bounds for a Font COP is the bounding rectangle
around the displayed letters while the resolution is the size of the
node's image.

Note that the returned image bounds is for the current frame.

Raises ValueError if `plane` is None or empty.


Raises [Hom:hou.OperationFailed] if the node could not be cooked or
opened for processing.
Raises [Hom:hou.OperationFailed] if the given plane does not exist.

::`isBypassed(self)` -> `bool`:


#cppname: HOM_CopNode::isBypassed

http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode (3 of 7) [12/7/2009 4:30:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode

#replaces: Exp:opflag, Cmd:opget

Returns True if the node's bypass flag is turned on. Returns False
otherwise.

::`isDisplayFlagSet(self)` -> `bool`:


#cppname: HOM_CopNode::isDisplayFlagSet
#replaces: Exp:opflag, Cmd:opget

Returns True if the node's display flag is turned on. Returns False
otherwise.

::`isRenderFlagSet(self)` -> `bool`:


#cppname: HOM_CopNode::isRenderFlagSet
#replaces: Exp:opflag, Cmd:opget

Returns True if the node's render flag is turned on. Returns False
otherwise.

::`isSingleImage(self)` -> `bool`:


#cppname: HOM_CopNode::isSingleImage
#replaces: Exp:seqanim

Returns True if the node has a single image. Returns False if the
node has an image sequence.

::`planes(self)` -> `tuple of strings`:


#cppname: HOM_CopNode::planes

Returns a tuple of plane names in the node's image sequence.

Raises [Hom:hou.OperationFailed] if the node could not be cooked or


opened for processing.

::`saveImage(self, file_name, frame_range=())`:


#cppname: HOM_CopNode::saveImage
#replaces: Cmd:opsave

Saves the node's cooked image sequence to disk. For multiple images,
make sure that the `file_name` argument contains $F so that the
sequence is written to multiple files.

The optional `frame_range` argument can be specified to write

http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode (4 of 7) [12/7/2009 4:30:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode

only a subset of frames in the image sequence. `frame_range` must


be a 2-tuple or a 3-tuple, where the first element is the start frame,
the second element is the end frame and the third element is the
frame increment. If `frame_range` is not given, then every frame in
the image sequence is saved to disk.

Raises ValueError if the frame increment in `frame_range` is 0.


Raises [Hom:hou.InvalidSize] if the size of `frame_range` is not
0, 2 or 3.
Raises [Hom:hou.OperationFailed] if the node could not be cooked or
opened for processing.
Raises [Hom:hou.OperationFailed] if the image could not be saved to disk.

::`sequenceEndFrame(self)` -> `float`:


#cppname: HOM_CopNode::sequenceEndFrame
#replaces: Exp:seqend

Returns the last frame in the node's image sequence.

Raises [Hom:hou.OperationFailed] if the node could not be cooked or


opened for processing.

::`sequenceFrameLength(self)` -> `float`:


#cppname: HOM_CopNode::sequenceFrameLength
#replaces: Exp:seqlength

Returns the frame length of the node's image sequence.

Raises [Hom:hou.OperationFailed] if the node could not be cooked or


opened for processing.

::`sequenceStartFrame(self)` -> `float`:


#cppname: HOM_CopNode::sequenceStartFrame
#replces: Exp:seqstart

Returns the start frame in the node's image sequence.

Raises [Hom:hou.OperationFailed] if the node could not be cooked or


opened for processing.

::`setDisplayFlag(self, on)`:
#cppname: HOM_CopNode::setDisplayFlag
#replaces: Cmd:opset

http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode (5 of 7) [12/7/2009 4:30:46 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode

Turns the node's display flag on or off. When the display flag is
on, the node's image will appear in the image viewport.
The value of the `on` argument must be True or False.

Raises [Hom:hou.PermissionError] if the node is unwritable.

::`setRenderFlag(self, on)`:
#cppname: HOM_CopNode::setRenderFlag
#replaces: Cmd:opset

Turns the node's render flag on or off. The render flag controls
which node in a compositing network will be rendered to [mplay]
or to disk. The value of the `on` argument must be True or False.

Raises [Hom:hou.PermissionError] if the node is unwritable.

::`xRes(self)`:
#cppname: HOM_CopNode::xRes
#replaces: Cmd:res

Returns the x-resolution of the node's image for the current frame.

Raises [Hom:hou.OperationFailed] if the node could not be cooked or


opened for processing.

::`yRes(self)`:
#cppname: HOM_CopNode::yRes
#replaces: Cmd:res

Returns the y-resolution of the node's image for the current frame.

Raises [Hom:hou.OperationFailed] if the node could not be cooked or


opened for processing.

@replaces

- [Exp:imgbounds]
- [Exp:pic]
- [Exp:picni]
- [Exp:opflag]
- [Cmd:opget]

http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode (6 of 7) [12/7/2009 4:30:46 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode

- [Cmd:opsave]
- [Cmd:opset]
- [Exp:res]
- [Exp:seqanim]
- [Exp:seqend]
- [Exp:seqlength]
- [Exp:seqstart]

http://www.sidefx.com/docs/houdini10.0/hom/hou/CopNode (7 of 7) [12/7/2009 4:30:46 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HistogramViewer

= hou.HistogramViewer =
#type: homclass
#cppname: HOM_HistogramViewer
#category: Images
#status: ni

@methods

::`setType(self, type)`:
#cppname: HOM_HistogramViewer::setType
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/HistogramViewer [12/7/2009 4:30:46 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ImageTimelineViewer

= hou.ImageTimelineViewer =
#type: homclass
#cppname: HOM_ImageTimelineViewer
#category: Images
#status: ni

@methods

::`setGridLevel(self, level)`:
#cppname: HOM_ImageTimelineViewer::setGridLevel
#status: ni

::`setPreviewRate(self, rate)`:
#cppname: HOM_ImageTimelineViewer::setPreviewRate
#status: ni

::`setUnits(self, units)`:
#cppname: HOM_ImageTimelineViewer::setUnits
#status: ni

::`showAllCops(self)`:
#cppname: HOM_ImageTimelineViewer::showAllCops
#status: ni

::`showDisplayedCops(self)`:
#cppname: HOM_ImageTimelineViewer::showDisplayedCops
#status: ni

::`showExtendRegions(self, on)`:
#cppname: HOM_ImageTimelineViewer::showExtendRegions
#status: ni

::`showFrameBoxes(self, on)`:
#cppname: HOM_ImageTimelineViewer::showFrameBoxes
#status: ni

::`showTimebar(self, on)`:
#cppname: HOM_ImageTimelineViewer::showTimebar
#status: ni

::`showTimeSensitiveCops(self)`:
#cppname: HOM_ImageTimelineViewer::showTimeSensitiveCops

http://www.sidefx.com/docs/houdini10.0/hom/hou/ImageTimelineViewer (1 of 2) [12/7/2009 4:30:46 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ImageTimelineViewer

#status: ni

@replaces

- [Cmd:imgviewtime]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ImageTimelineViewer (2 of 2) [12/7/2009 4:30:46 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ImageViewer

= hou.ImageViewer =
#type: homclass
#cppname: HOM_ImageViewer
#category: Images
#status: ni

@methods

::`colorCorrectionMode(self)`:
#cppname: HOM_ImageViewer::colorCorrectionMode
#status: ni

::`enable(self, on)`:
#cppname: HOM_ImageViewer::enable
#status: ni

::`setBlackPoint(self, color)`:
#cppname: HOM_ImageViewer::setBlackPoint
#status: ni

::`setBrightness(self, brightness)`:
#cppname: HOM_ImageViewer::setBrightness
#status: ni

::`setColorCorrectionMode(self, mode)`:
#cppname: HOM_ImageViewer::setColorCorrectionMode
#status: ni

::`setContrast(self, contrast)`:
#cppname: HOM_ImageViewer::setContrast
#status: ni

::`setGamma(self, gamma)`:
#cppname: HOM_ImageViewer::setGamma
#status: ni

::`setLUTFile(self, file_name)`:
#cppname: HOM_ImageViewer::setLUTFile
#status: ni

::`setShift(self, shift)`:
#cppname: HOM_ImageViewer::setShift

http://www.sidefx.com/docs/houdini10.0/hom/hou/ImageViewer (1 of 2) [12/7/2009 4:30:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ImageViewer

#status: ni

::`setWhitePoint(self, color)`:
#cppname: HOM_ImageViewer::setWhitePoint
#status: ni

::`showBGImages(self, on)`:
#cppname: HOM_ImageViewer::showBGImages
#status: ni

::`showFullImage(self)`:
#cppname: HOM_ImageViewer::showFullImage
#status: ni

::`showImagePortion(self, u1, v1, u2, v2)`:


#cppname: HOM_ImageViewer::showImagePortion
#status: ni

::`showTransparency(self, on)`:
#cppname: HOM_ImageViewer::showTransparency
#status: ni

@replaces

- [Cmd:imgview2d]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ImageViewer (2 of 2) [12/7/2009 4:30:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ModalImageViewer

= hou.ModalImageViewer =
#type: homclass
#cppname: HOM_ModalImageViewer
#category: Images
#status: ni

@methods

::`displayedArrayIndex(self)`:
#cppname: HOM_ModalImageViewer::displayedArrayIndex
#status: ni

::`displayedPlane(self)`:
#cppname: HOM_ModalImageViewer::displayedPlane
#status: ni

::`histogramViewer(self)` -> HistogramViewer:


#cppname: HOM_ModalImageViewer::histogramViewer
#status: ni

::`imageViewer(self)` -> ImageViewer:


#cppname: HOM_ModalImageViewer::imageViewer
#status: ni

::`setDisplayedArrayIndex(self, index)`:
#cppname: HOM_ModalImageViewer::setDisplayedArrayIndex
#status: ni

::`setDisplayedPlane(self, string)`:
#cppname: HOM_ModalImageViewer::setDisplayedPlane
#status: ni

::`setLinkViewports(self, on)`:
#cppname: HOM_ModalImageViewer::setLinkViewports
#status: ni

::`setZoomFactor(self, factor)`:
#cppname: HOM_ModalImageViewer::setZoomFactor
#status: ni

::`showAllComponents(self)`:
#cppname: HOM_ModalImageViewer::showAllComponents

http://www.sidefx.com/docs/houdini10.0/hom/hou/ModalImageViewer (1 of 3) [12/7/2009 4:30:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ModalImageViewer

#status: ni

::`showGuides(self, on)`:
#cppname: HOM_ModalImageViewer::showGuides
#status: ni

::`showHandles(self, on)`:
#cppname: HOM_ModalImageViewer::showHandles
#status: ni

::`showLabels(self, on)`:
#cppname: HOM_ModalImageViewer::showLabels
#status: ni

::`showOnlyComponent(self, component_index)`:
#cppname: HOM_ModalImageViewer::showOnlyComponent
#status: ni

::`showPreviews(self, on)`:
#cppname: HOM_ModalImageViewer::showPreviews
#status: ni

::`useHistogramMode(self)`:
#cppname: HOM_ModalImageViewer::useHistogramMode
#status: ni

::`useImageMode(self)`:
#cppname: HOM_ModalImageViewer::useImageMode
#status: ni

::`useTimelineMode(self)`:
#cppname: HOM_ModalImageViewer::useTimelineMode
#status: ni

@replaces

- [Cmd:imgview2d]
- [Cmd:imgview]
- [Cmd:imgviewhist]
- [Cmd:imgviewtime]
- [Cmd:setcomp]
- [Cmd:setplane]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ModalImageViewer (2 of 3) [12/7/2009 4:30:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ModalImageViewer

http://www.sidefx.com/docs/houdini10.0/hom/hou/ModalImageViewer (3 of 3) [12/7/2009 4:30:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Mplay

= hou.Mplay =
#type: homclass
#cppname: HOM_Mplay
#superclass: hou.ModalImageViewer
#category: Images
#status: ni

@methods

::`alignAudioToPlaybar(self, audio_time, frame)`:


#cppname: HOM_Mplay::alignAudioToPlaybar
#status: ni

::`appendSequence(self, file_pattern, buffered=True)`:


#cppname: HOM_Mplay::appendSequence
#status: ni

::`appendSequenceRange(self, file_pattern, start_frame, end_frame, buffered=True)`:


#cppname: HOM_Mplay::appendSequenceRange
#status: ni

::`fitImageToWindow(self)`:
#cppname: HOM_Mplay::fitImageToWindow
#status: ni

::`fitWindowToImage(self)`:
#cppname: HOM_Mplay::fitWindowToImage
#status: ni

::`loadAudio(self, audio_file)`:
#cppname: HOM_Mplay::loadAudio
#status: ni

::`loadedSequencePatterns(self)` -> tuple of strings:


#cppname: HOM_Mplay::loadedSequencePatterns
#status: ni

::`loadSequence(self, file_pattern, start_frame=None, end_frame=None, cache=True)`:


#cppname: HOM_Mplay::loadSequence
#status: ni

::`prependSequence(self, file_pattern, buffered=True)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/Mplay (1 of 3) [12/7/2009 4:30:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Mplay

#cppname: HOM_Mplay::prependSequence
#status: ni

::`prependSequenceRange(self, file_pattern, start_frame, end_frame, buffered=True)`:


#cppname: HOM_Mplay::prependSequenceRange
#status: ni

::`removeZoomAndCenter(self)`:
#cppname: HOM_Mplay::removeZoomAndCenter
#status: ni

::`setAudioFps(self, fps)`:
#cppname: HOM_Mplay::setAudioFps
#status: ni

::`setAudioScrubeRate(self, rate)`:
#cppname: HOM_Mplay::setAudioScrubeRate
#status: ni

::`setProfile(self, profile)`:
#cppname: HOM_Mplay::setProfile
#status: ni

::`setVolume(self, volume)`:
#cppname: HOM_Mplay::setVolume
#status: ni

::`sustainAudio(self, on)`:
#cppname: HOM_Mplay::sustainAudio
#status: ni

::`synchronizeToFps(self, on)`:
#cppname: HOM_Mplay::synchronizeToFps
#status: ni

::`unloadAudio(self)`:
#cppname: HOM_Mplay::unloadAudio
#status: ni

@replaces

- [Cmd:loadaudio]
- [Cmd:appendseq]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Mplay (2 of 3) [12/7/2009 4:30:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Mplay

- [Cmd:appendseq]
- [Cmd:mplayhome]
- [Cmd:mplayfit]
- [Cmd:seqls]
- [Cmd:loadsequence]
- [Cmd:prependseq]
- [Cmd:mplayprofile]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Mplay (3 of 3) [12/7/2009 4:30:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/pixelColourInFileByUV

= hou.pixelColorInFileByUV =

#type: homfunction
#cppname: hom::pixelColorInFileByUV
#category: Images
#status: ni

@usage
`pixelColorInFileByUV(u, v, interpolate=True)` -> Color

@replaces
- [Exp:tex]
- [Exp:texni]

http://www.sidefx.com/docs/houdini10.0/hom/hou/pixelColourInFileByUV [12/7/2009 4:30:49 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/BaseKeyframe

= hou.BaseKeyframe =
#type: homclass
#cppname: HOM_BaseKeyframe
#category: Keyframes

"""Abstract base class for all keyframe class."""

@methods

::`asCode(self, brief=False, save_keys_in_frames=False, function_name=None)` -> `str`:


#cppname: HOM_BaseKeyframe::asCode

Returns a script of Python statements that can be executed to create


the keyframe. To run the script, use either Python's `exec`
or `execfile` functions.

`brief`:
When <<brief>> is True, the output script omits commands for
setting unused values, slopes and accelerations. This parameter
only applies to non-string keyframes. The value of <<brief>> must
be either True or False.

`save_keys_in_frames`:
When <<save_keys_in_frames>> is True, `asCode` outputs commands
for setting channel and key times in samples (frames) instead
of seconds. The value of <<save_keys_in_frames>> must be either
True or False.

`function_name`:
If <<function_name>> is specified, then the output script
is wrapped in a Python function definition with the given name.
<<function_name>> must be a non-zero length string consisting of
only alphanumeric and underscore characters. Any invalid characters
are internally converted to underscores.

The function returns a reference to the newly created keyframe


object.

Here is an example of saving the output to a file and then loading


it back into Houdini:
{{{
#!python
# Get a reference to the target keyframe.
tx_parm = hou.parm("/obj/geo1/tx")
key = tx_parm.keyframes()[0]

# Execute asCode and write the output script to file.


script = key.asCode()
f = open("create_key.py", "w")
f.write(script)
f.close()

# Execute the script. The new keyframe will be stored


# in the 'hou_keyframe' variable.
execfile("create_key.py")

# Commit the keyframe back into the node parameter.


tx_parm.setKeyframe(hou_keyframe)
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/BaseKeyframe (1 of 4) [12/7/2009 4:30:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/BaseKeyframe

Here is an example of saving the output into a function and then


calling it in Houdini:
{{{
#!python
# Get a reference to the target keyframe.
tx_parm = hou.Node("/obj/geo1").Parm("tx")
key = tx_parm.keyframes()[0]

# Execute asCode and write the function definition to file.


func = key.asCode(function_name="createKeyframe")
f = open("keylib.py", "w")
f.write(func)
f.close()

# Call the function definition.


import keylib
hou_keyframe = keylib.createKeyframe()

# Commit the keyframe back into the node parameter.


tx_parm.setKeyframe(hou_keyframe)
}}}

::`evaluatedType(self)` -> [Hom:hou.parmData] enum value:


#cppname: HOM_BaseKeyframe::evaluatedType

Returns the type that the keyframe evaluates to.

::`expression(self)` -> `str`:


#cppname: HOM_BaseKeyframe::expression

Returns the keyframe's expression. For example, in cases where the keyframe has had two values set the interpolating function is returned e.g. "bezier()", "spline()" etc.

This function raises [hou.KeyframeValueNotSet] if an expression has not been set.

See `setExpression()` and `isExpressionSet()`.

::`expressionLanguage(self)` -> [Hom:hou.exprLanguage] enum value:


#cppname: HOM_BaseKeyframe::expressionLanguage

Returns the keyframe's expression's language.

This function raises [Hom:hou.KeyframeValueNotSet] if an expresion language has not ben set.

See `setExpression()`, and `isExpressionLanguageSet()`.

::`frame(self)` -> `double`:


#cppname: HOM_BaseKeyframe::frame

Returns the keyframe's frame number.

This function raises [Hom:hou.KeyframeValueNotSet] if the frame or time has not been set.

See `setFrame()` and `setTime()`.

::`getReferencedParm(self)` -> [Hom:hou.Parm]:


#cppname: HOM_BaseKeyframe::getReferencedParm
#status: ni

::`isExpressionLanguageSet(self)` -> `bool`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/BaseKeyframe (2 of 4) [12/7/2009 4:30:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/BaseKeyframe

#cppname: HOM_BaseKeyframe::isExpressionLanguageSet

Returns whether the keyframe expression's language is set.

See `setExpression()` and `expressionLanguage()`.

::`isExpressionSet(self)` -> `bool`:


#cppname: HOM_BaseKeyframe::isExpressionSet

Returns whether the keyframe's expression is set.

See `setExpression()` and `expression()`.

::`isLocked(self)` -> `bool`:


#cppname: HOM_BaseKeyframe::isLocked
#status: ni

::`isParmReference(self)` -> `bool`:


#cppname: HOM_BaseKeyframe::isParmReference
#status: ni

::`isTimeDependent(self)` -> `bool`:


#cppname: HOM_BaseKeyframe::isTimeDependent
#status: ni

::`isTimeSet(self)` -> `bool`:


#cppname: HOM_BaseKeyframe::isTimeSet

Returns whether the keyframe's time is set.

See `setTime()` and `time()`.

::`Keyframe(self)`:
#cppname: HOM_BaseKeyframe::Keyframe
#status: ni

::`lock(self, value=None)`:
#cppname: HOM_BaseKeyframe::lock
#status: ni

::`moveToIntegerKeyframes(self, mode)`:
#cppname: HOM_BaseKeyframe::moveToIntegerKeyframes
#status: ni

::`setExpression(self, expression, language=None)`:


#cppname: HOM_BaseKeyframe::setExpression

Sets the keyframe's expression and language.

This function raises [Hom:hou.TypeError] if `language` is not a value from [Hom:hou.exprLanguage].

See `expression()`, `expressionLanguage()`, `isExpressionSet()`, `isExpressionLanguageSet()`.

::`setFrame(self, frame)`:
#cppname: HOM_BaseKeyframe::setFrame

Sets the keyframe's frame number. Using the number of frames per second ([Hom:hou.fps]), setting the frame number also sets the time. For example, with an fps of 24, then setting the frame number to 49 will set the time to 2 seconds.

See `frame()`.

http://www.sidefx.com/docs/houdini10.0/hom/hou/BaseKeyframe (3 of 4) [12/7/2009 4:30:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/BaseKeyframe

::`setTime(self, time)`:
#cppname: HOM_BaseKeyframe::setTime

Sets the keyframe's time in seconds. Using the number of frames per second ([Hom:hou.fps]), setting the time also sets the frame number. For example, with an fps of 24, then setting the time to 2 seconds will set the frame number to 49.

See `time()`.

::`time(self)` -> `double`:


#cppname: HOM_BaseKeyframe::time

Returns the keyframe's time in seconds.

This function raises [hou.KeyframeValueNotSet] if the time or frame has not been set.

See `setTime()` and `setFrame()`.

@replaces

- [Cmd:chkey]
- [Cmd:chkeyls]
- [Cmd:chkey]
- [Cmd:chround]
- [Exp:chsraw]
- [Exp:lock]
- [Cmd:opscript]

http://www.sidefx.com/docs/houdini10.0/hom/hou/BaseKeyframe (4 of 4) [12/7/2009 4:30:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Keyframe

= hou.Keyframe =
#type: homclass
#cppname: HOM_Keyframe
#superclass: hou.BaseKeyframe
#category: Keyframes

"""Class representing the default keyframe type, a numerical keyframe."""

@methods

::`accel(self)` -> `double`:


#cppname: HOM_Keyframe::accel

Returns the acceleration leaving the keyframe.

This function raises [Hom:hou.KeyframeValueNotSet] if the acceleration has not been set.

::`evaluatedType(self)` -> [Hom:hou.parmData] enum value:


#cppname: HOM_Keyframe::evaluatedType
#status: ni

::`inAccel(self)` -> `double`:


#cppname: HOM_Keyframe::inAccel

Returns the acceleration entering the keyframe.

This method raises [Hom:hou.KeyframeValueNotSet] if the acceleration has


not been set or it is tied.

::`inSlope(self)` -> `double`:


#cppname: HOM_Keyframe::inSlope

Returns the slope entering the keyframe.

This method raises [Hom:hou.KeyframeValueNotSet] if the slope has not been set or the slope is tied.

::`interpretAccelAsRatio(self, on)`:
#cppname: HOM_Keyframe::interpretAccelAsRatio

Sets whether Houdini should interpret the acceleration values entering


and leaving the keyframe as a single ratio. When set to True, the
ratio of the in-acceleration to out-acceleration is always maintained.
If, for example, the in-acceleration is made to be twice as large
using the Channel Editor, then the out-acceleration will automatically
be adjusted to be twice as large as well. This is the default behaviour

http://www.sidefx.com/docs/houdini10.0/hom/hou/Keyframe (1 of 4) [12/7/2009 4:30:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Keyframe

for Houdini keyframes.

::`inValue(self)` -> `double`:


#cppname: HOM_Keyframe::inValue

Returns the value entering the keyframe.

This method raises [Hom:hou.KeyframeValueNotSet] if the value


has not been set or the value is tied.

::`isAccelInterpretedAsRatio(self)` -> `bool`:


#cppname: HOM_Keyframe::isAccelInterpretedAsRatio

Returns True if the acceleration values entering and leaving the


keyframe are interpreted as a ratio by Houdini.

::`isAccelSet(self)` -> `bool`:


#cppname: HOM_Keyframe::isAccelSet

Returns True if the acceleration entering or leaving the keyframe has


been set.

::`isAccelTied(self)` -> `bool`:


#cppname: HOM_Keyframe::isAccelTied

Returns True if the acceleration entering the keyframe has not been set.

::`isSlopeSet(self)` -> `bool`:


#cppname: HOM_Keyframe::isSlopeSet

Returns True if the slope entering or leaving the keyframe has been set.

::`isSlopeTied(self)` -> `bool`:


#cppname: HOM_Keyframe::isSlopeTied

Returns True if the slope entering the keyframe has not been set.

::`isValueSet(self)` -> `bool`:


#cppname: HOM_Keyframe::isValueSet

Returns True if the value entering or leaving the keyframe has been set.

::`isValueTied(self)` -> `bool`:


#cppname: HOM_Keyframe::isValueTied

Returns True if the value entering the keyframe has not been set.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Keyframe (2 of 4) [12/7/2009 4:30:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Keyframe

::`setAccel(self, accel)`:
#cppname: HOM_Keyframe::setAccel

Sets the acceleration leaving the keyframe.

::`setInAccel(self, in_accel)`:
#cppname: HOM_Keyframe::setInAccel

Sets the acceleration entering the keyframe. Sets the acceleration


leaving the keyframe, if not already set. Unties the acceleration.

::`setInSlope(self, in_slope)`:
#cppname: HOM_Keyframe::setInSlope

Sets the slope entering the keyframe. Sets the slope leaving the keyframe, if not already set. Unties the slope.

::`setInValue(self, in_value)`:
#cppname: HOM_Keyframe::setInValue

Sets the value entering the keyframe. Sets the value leaving the keyframe, if not already set. Unties the value.

::`setSlope(self, slope)`:
#cppname: HOM_Keyframe::setSlope

Sets the slope leaving the keyframe.

::`setValue(self, value)`:
#cppname: HOM_Keyframe::setValue

Sets the value leaving the keyframe.

::`slope(self)` -> `double`:


#cppname: HOM_Keyframe::slope

Returns the slope leaving the keyframe.

This method raises [Hom:hou.KeyframeValueNotSet] if the slope


has not been set.

::`unsetInAccel(self)`:
#cppname: HOM_Keyframe::unsetInAccel

Unsets the acceleration entering the keyframe and untie the acceleration.

::`unsetInSlope(self)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/Keyframe (3 of 4) [12/7/2009 4:30:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Keyframe

#cppname: HOM_Keyframe::unsetInSlope

Unsets the slope entering the keyframe and untie the slope.

::`unsetInValue(self)`:
#cppname: HOM_Keyframe::unsetInValue

Unsets the value entering the keyframe and untie the values.

::`value(self)` -> `double`:


#cppname: HOM_Keyframe::value

Returns the value leaving the keyframe.

This method raises [Hom:hou.KeyframeValueNotSet] if the value


has not been set.

@replaces

- [Cmd:chkey]
- [Cmd:chkeyls]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Keyframe (4 of 4) [12/7/2009 4:30:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/StringKeyframe

= hou.StringKeyframe =
#type: homclass
#cppname: HOM_StringKeyframe
#superclass: hou.BaseKeyframe
#category: Keyframes
#status: nd

@methods

::`evaluatedType(self)` -> hou.parmData enum value:


#cppname: HOM_StringKeyframe::evaluatedType
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/StringKeyframe [12/7/2009 4:30:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/infoAboutParmKeyframeFile

= hou.infoAboutParmKeyframeFile =

#type: homfunction
#cppname: hom::infoAboutParmKeyframeFile
#category: Keyframes
#status: ni

@usage
`infoAboutParmKeyframeFile(chn_or_bchn_file_name)`

@replaces
- [Cmd:chread]

http://www.sidefx.com/docs/houdini10.0/hom/hou/infoAboutParmKeyframeFile [12/7/2009 4:30:52 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/loadParmKeyframes

= hou.loadParmKeyframes =

#type: homfunction
#cppname: hom::loadParmKeyframes
#category: Keyframes
#status: ni

@usage
`loadParmKeyframes(chn_or_bchn_file_name, start_frame=None, end_frame=None, delete_existing_animation_outside_range=False, node_renaming_regular_expression=None)`

@replaces
- [Cmd:chread]

http://www.sidefx.com/docs/houdini10.0/hom/hou/loadParmKeyframes [12/7/2009 4:30:52 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/saveParmKeyframes

= hou.saveParmKeyframes =

#type: homfunction
#cppname: hom::saveParmKeyframes
#category: Keyframes
#status: ni

@usage
`saveParmKeyframes(parm_list, chn_or_bchn_file_name)`

@replaces
- [Cmd:chwrite]

http://www.sidefx.com/docs/houdini10.0/hom/hou/saveParmKeyframes [12/7/2009 4:30:53 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setDefaultSegmentFunction

= hou.setDefaultSegmentFunction =

#type: homfunction
#cppname: hom::setDefaultSegmentFunction
#category: Keyframes
#status: ni

@usage
`setDefaultSegmentFunction(function_name)`

@replaces
- [Cmd:chaneditor]

http://www.sidefx.com/docs/houdini10.0/hom/hou/setDefaultSegmentFunction [12/7/2009 4:30:53 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Gallery

= hou.Gallery =
#type: homclass
#cppname: HOM_Gallery
#category: Materials
#status: nd

@methods

::`createEntry(self, entry_name, node=None)` -> [Hom:hou.GalleryEntry]:


#cppname: HOM_GalleryEntry::createEntry
#status: nd

::`deleteEntry(self, entry_name)`:
#cppname: HOM_GalleryEntry::deleteEntry
#status: nd

::`galleryEntries(self, name_pattern=None, label_pattern=None, keyword_pattern=None, category=None, node_type=None)` -> tuple of [Hom:hou.GalleryEntry]:


#cppname: HOM_Gallery::galleryEntries
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/Gallery [12/7/2009 4:30:53 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GalleryEntry

= hou.GalleryEntry =
#type: homclass
#cppname: HOM_GalleryEntry
#category: Materials
#status: nd

@methods

::`applyToNode(self, node)`:
#cppname: HOM_GalleryEntry::applyToNode
#status: nd

::`bestNodeType(self)` -> NodeType or None:


#cppname: HOM_GalleryEntry::bestNodeType
#status: nd

::`canApplyToNode(self, node)` -> bool:


#cppname: HOM_GalleryEntry::canApplyToNode
#status: nd

::`canCreateChildNode(self, parent)` -> bool:


#cppname: HOM_GalleryEntry::canCreateChildNode
#status: nd

::`categories(self)` -> tuple of strings:


#cppname: HOM_GalleryEntry::categories
#status: nd

::`createChildNode(self, parent)` -> Node:


#cppname: HOM_GalleryEntry::createChildNode
#status: nd

::`description(self)` -> string:


#cppname: HOM_GalleryEntry::description
#status: nd

::`helpURL(self)` -> string:


#cppname: HOM_GalleryEntry::helpURL
#status: nd

::`icon(self)` -> string:


#cppname: HOM_GalleryEntry::icon

http://www.sidefx.com/docs/houdini10.0/hom/hou/GalleryEntry (1 of 4) [12/7/2009 4:30:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GalleryEntry

#status: nd

::`keywords(self)` -> tuple of strings:


#cppname: HOM_GalleryEntry::keywords
#status: nd

::`label(self)` -> `str`:


#cppname: HOM_GalleryEntry::label
#status: nd

::`name(self)` -> string:


#cppname: HOM_GalleryEntry::name
#status: nd

::`nodeTypeCategory(self)` -> NodeTypeCategory:


#cppname: HOM_GalleryEntry::nodeTypeCategory
#status: nd

::`nodeTypeNames(self)` -> tuple of strings:


#cppname: HOM_GalleryEntry::nodeTypeNames
#status: nd

::`requiredHDAFile(self)` -> string:


#cppname: HOM_GalleryEntry::requiredHDAFile
#status: nd

::`script(self)` -> string:


#cppname: HOM_GalleryEntry::script
#status: nd

::`setCategories(self, categories)`:
#cppname: HOM_GalleryEntry::setCategories
#status: nd

::`setContentsFromNode(self, node)`:
#cppname: HOM_GalleryEntry::setContentsFromNode
#status: nd

::`setDescription(self, description)`:
#cppname: HOM_GalleryEntry::setDescription
#status: nd

::`setEqual(self, entry)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/GalleryEntry (2 of 4) [12/7/2009 4:30:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GalleryEntry

#cppname: HOM_GalleryEntry::setEqual
#status: nd

::`setHelpURL(self, helpurl)`:
#cppname: HOM_GalleryEntry::setHelpURL
#status: nd

::`setIcon(self, icon)`:
#cppname: HOM_GalleryEntry::setIcon
#status: nd

::`setKeywords(self, keywords)`:
#cppname: HOM_GalleryEntry::setKeywords
#status: nd

::`setLabel(self, label)`:
#cppname: HOM_GalleryEntry::setLabel
#status: nd

::`setName(self, name)`:
#cppname: HOM_GalleryEntry::setName
#status: nd

::`setNodeTypeCategory(self, category)`:
#cppname: HOM_GalleryEntry::setNodeTypeCategory
#status: nd

::`setNodeTypeNames(self, nodetypes)`:
#cppname: HOM_GalleryEntry::setNodeTypeNames
#status: nd

::`setRequiredHDAFile(self, hda_file)`:
#cppname: HOM_GalleryEntry::setRequiredHDAFile
#status: nd

::`setScript(self, script)`:
#cppname: HOM_GalleryEntry::setScript
#status: nd

::`setScriptFromNode(self, node)`:
#cppname: HOM_GalleryEntry::setScriptFromNode
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/GalleryEntry (3 of 4) [12/7/2009 4:30:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GalleryEntry

http://www.sidefx.com/docs/houdini10.0/hom/hou/GalleryEntry (4 of 4) [12/7/2009 4:30:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ShopNode

= hou.ShopNode =
#type: homclass
#cppname: HOM_ShopNode
#superclass: hou.Node
#category: Materials

"""The base class for all SHOP nodes in Houdini. An instance of this class
corresponds to exactly one instance of a node in Houdini."""

See [Hom:hou.Node] for more information.

@methods

::`definingVopNetNode(self)` -> [Hom:hou.VopNetNode] or None:


#cppname: HOM_ShopNode::definingVopNetNode
If this SHOP is defined by a VOP network, return the
[Hom:hou.VopNetNode] that defines it. Otherwise, return None.

::`shaderName(self, as_otl_path=True)` -> `str`:


#cppname: HOM_ShopNode::shaderName
Return the name of the shader inside this SHOP. If `as_otl_path` is True,
returns an `opdef:` path to the SHOP type.

::`shaderString(self, render_type=None)` -> `str`:


#cppname: HOM_ShopNode::shaderString
#replaces: Exp:shopstring
Return the shader string generated by this shader for the given render type.
This string is written to the file that is read in by the renderer.

render_type:
A string representing the renderer. If this string is empty or is
`"*"`, Houdini uses the default render type for this shader. Possible
render types include `"VMantra"` (Mantra), `"RIB"` (RenderMan), `"MI"`
(MentalRay), `"OGL"` (OpenGL), `"OGL2"` (OpenGL 2), and `"I3D"` (Image
3D).

You can use [Hom:hou.ShopNodeType#renderMask] to determine the render


types supported by this SHOP's type.
You can also use [Hom:hou.ShopNodeTypeCategory#renderers] to get
all the possible render types. Note that some SHOP types,
http://www.sidefx.com/docs/houdini10.0/hom/hou/ShopNode (1 of 3) [12/7/2009 4:30:55 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ShopNode

like the properties SHOP or the switch SHOP, have a render mask of
`"*"` to indicate that they will work with any shader type.

If you pass in an unknown or unsupported render type, this method returns


an empty string.

{{{
#!pycon
>>> for node_type_name in ("v_plastic", "ri_matte", "mib_illum_phong"):
... hou.node("/shop").createNode(node_type_name)

<hou.ShopNode of type v_plastic at /shop/v_plastic1>


<hou.ShopNode of type ri_matte at /shop/ri_matte1>
<hou.ShopNode of type mib_illum_phong at /shop/mib_illum_phong1>

>>> for shop in hou.node("/shop").children():


... for render_type in shop.type().renderMask().split():
... print shop.name(), "supports", render_type
... print " shader_string:", shop.shaderString(render_type)
... print
v_plastic1 supports VMantra
shader_string: opdef:/Shop/v_plastic

v_plastic1 supports OGL


shader_string: /shop/v_plastic1

ri_matte1 supports RIB


shader_string: "matte"

ri_matte1 supports OGL


shader_string: /shop/ri_matte1

mib_illum_phong1 supports MI
shader_string: "base.mi/mib_illum_phong" ( "ambience" 0 0 0, "ambient" 1 1 1, "diffuse" 1 1 1, "specular" 1 1 1, "exponent" 20, "mode" 4, "lights" [""] )

mib_illum_phong1 supports OGL


shader_string /shop/mib_illum_phong1
}}}

::`shaderType(self)` -> [Hom:hou.shaderType] enum value:


#cppname: HOM_ShopNode::shaderType
http://www.sidefx.com/docs/houdini10.0/hom/hou/ShopNode (2 of 3) [12/7/2009 4:30:55 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ShopNode

Returns a hou.shaderType indicating the type of this shader.

Note that this method is a shortcut for `self.type().shaderType()`,


which calls [Hom:hou.ShopNodeType#shaderType].

::`supportedRenderers(self)` -> tuple of `str`:


#cppname: HOM_ShopNode::supportedRenderers
Returns a list of strings describing the renderers this shader supports.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ShopNode (3 of 3) [12/7/2009 4:30:55 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/galleries

= hou.galleries =
#type: hommodule
#cppname: HOM_galleries
#category: Materials
#status: nd

@functions

::`createGalleryEntry(gallery_path, entry_name, node)` -> [Hom:hou.Gallery] or `None`:


#cppname: HOM_galleries::createGalleryEntry
#status: nd

::`galleries()` -> tuple of [Hom:hou.Gallery]:


#cppname: HOM_galleries::galleries
#status: nd

::`galleryEntries(name_pattern=None, label_pattern=None, keyword_pattern=None, category=None, node_type=None)` -> tuple of [Hom:hou.GalleryEntry]:


#cppname: HOM_galleries::galleryEntries
#replaces: Cmd:oppresetls
Return a tuple of [Hom:hou.GalleryEntry] objects matching the search
criteria. The result is the intersection of the matches against
all the parameters. If you call this function with no parameters, it
returns all the gallery entries.

Unless a parameter is None, the results are filtered by the following:

`name_pattern`:
gallery entry names matching this pattern

`label_pattern`:
gallery entry label names matching this pattern

`keyword_pattern`:
gallery entries that have a keyword matching this pattern

`category`:
gallery entries in a category matching this pattern

`node_type`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/galleries (1 of 3) [12/7/2009 4:30:56 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/galleries

gallery entries that can be applied to this node type

This example prints all the gallery entries starting with a "b" that have
the Material keyword.
{{{
#!python
>>> hou.galleries.galleryEntries("b*", keyword_pattern="Material")
(<hou.GalleryEntry "basic_surface">, <hou.GalleryEntry "bumpy_glass">, ...)
}}}

This example prints the name and description of all the entries in the
Metals category:
{{{
#!python
>>> for entry in hou.galleries.galleryEntries(category="Metals"):
... print "%s: %s" % (entry.name(), entry.description())
chrome: Very bright metal with mirror reflections
aged_metal: Aged metal material with ray traced or environment mapped reflections
...
}}}

This example prints the gallery entry names for the lsystem SOP.
{{{
#!python
>>> node_type = hou.nodeType(hou.sopNodeTypeCategory(), "lsystem")
>>> for entry in hou.galleries.galleryEntries(node_type=node_type):
... print entry.name()
planta
plantb
plantc
...
sympodial_tree
ternary_tree
wheel
}}}

::`installGallery(gallery_path)` -> [Hom:hou.Gallery] or `None`:


#cppname: HOM_galleries::installGallery
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/galleries (2 of 3) [12/7/2009 4:30:56 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/galleries

http://www.sidefx.com/docs/houdini10.0/hom/hou/galleries (3 of 3) [12/7/2009 4:30:56 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/shaderType

= hou.shaderType =
#type: hommodule
#cppname: HOM_shaderType
#category: Materials

"""Enumeration of SHOP shader types."""

Each SHOP type defines a particular type of shader. For example, it might be
a surface shader or a displacement shader. This enumeration contains all
the possible shader types.

Use [Hom:hou.ShopNodeType#shaderType] to determine what type of shader


a particular SHOP type is.

* hou.shaderType.Surface
* hou.shaderType.SurfaceShadow
* hou.shaderType.Displacement
* hou.shaderType.Geometry
* hou.shaderType.Interior
* hou.shaderType.Light
* hou.shaderType.LightShadow
* hou.shaderType.Atmosphere
* hou.shaderType.Lens
* hou.shaderType.Output
* hou.shaderType.Background
* hou.shaderType.Photon
* hou.shaderType.MentalRayEmitter
* hou.shaderType.MentalRayPhotonVolume
* hou.shaderType.MentalRayEnvironment
* hou.shaderType.MentalRayContour
* hou.shaderType.MentalRayContourStore
* hou.shaderType.MentalRayContourContrast
* hou.shaderType.MentalRayTexture
* hou.shaderType.Image3D
* hou.shaderType.BSDF
* hou.shaderType.CVEX
* hou.shaderType.Mutable
* hou.shaderType.Properties

http://www.sidefx.com/docs/houdini10.0/hom/hou/shaderType [12/7/2009 4:30:56 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkBox

= hou.NetworkBox =
#type: homclass
#cppname: HOM_NetworkBox
#category: Node Organization

"""Represents a network box."""

To create a network box, use the [Hom:hou.Node#createNetworkBox] method on


the node inside which you want to create the box. To get an existing
network box, use the [Hom:hou.Node#findNetworkBox] method on the node
containing the network box. To get a list of all network boxes in a network,
use the [Hom:hou.Node#networkBoxes] method on the containing node.

@methods

::`addNode(self, node)`:
#cppname: HOM_NetworkBox::addNode

Adds a node to the network box.

::`asCode(self, brief=False, recurse=False, save_box_contents=False, save_channels_only=False, save_creation_commands=False, save_keys_in_frames=False, save_parm_values_only=False, save_spare_parms=False, function_name=None) -> string`:
#cppname: HOM_NetworkBox::asCode

Prints the Python code necessary to recreate a network box.

See [Hom:hou.Node#asCode] for information on the keyword arguments.

::`color(self)` -> [Hom:hou.Color]:


#cppname: HOM_NetworkBox::color

Returns the color of this network box.

::`destroy(self, destroy_contents=False)`:
#cppname: HOM_NetworkBox::destroy

Remove and delete the network box, optionally deleting the nodes it contains.

::`fitAroundContents(self)`:
#cppname: HOM_NetworkBox::fitAroundContents

Resizes the network box to fit its contents.

::`isMinimized(self)` -> `bool`:


#cppname: HOM_NetworkBox::isMinimized

Returns whether the network box is minimized.

::`isPicked(self)` -> `bool`:


#cppname: HOM_NetworkBox::isPicked

Returns whether the network box is selected.

::`move(self, vector2)`:
#cppname: HOM_NetworkBox::move

Moves the network box by the increments in the given [Hom:hou.Vector2].


Use `setPosition()` to set the box's absolute position.

::`name(self)` -> `str`:


#cppname: HOM_NetworkBox::name

Return the name of the network box.

http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkBox (1 of 3) [12/7/2009 4:30:57 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkBox

::`nodes(self)` -> `tuple` of [Hom:hou.Node]:


#cppname: HOM_NetworkBox::nodes

Returns the nodes inside the network box.

::`parent(self)` -> Node:


#cppname: HOM_NetworkBox::parent

Returns the node which contains the network box.

::`position(self)` -> [Hom:hou.Vector2]:


#cppname: HOM_NetworkBox::position

Return the position of this network box.

::`removeAllNodes(self)`:
#cppname: HOM_NetworkBox::removeAllNodes

Removes all nodes from the network box.

::`removeNode(self, node)`:
#cppname: HOM_NetworkBox::removeNode

Removes the given node from the network box.

::`resize(self, vector2)`:
#cppname: HOM_NetworkBox::resize

Resizes a network box by the increments in the given [Hom:hou.Vector2].


Use `setSize()` to set the box's absolute size.

::`setColor(self, color)`:
#cppname: HOM_NetworkBox::setColor

Set the color of this network box to the given [Hom:hou.Color].

::`setMinimized(self, on)`:
#cppname: HOM_NetworkBox::setMinimized

Minimizes or restores the network box.

::`setName(self, name)`:
#cppname: HOM_NetworkBox::setName

Sets the name of the network box.

::`setPicked(self, on)`:
#cppname: HOM_NetworkBox::setPicked

Selectsor deselects the network box.

::`setPosition(self, vector2)`:
#cppname: HOM_NetworkBox::setPosition

Sets the position of this network box to the given [Hom:hou.Vector2].


Use `move()` to move the box relative to its current position.

::`setSize(self, size)`:
#cppname: HOM_NetworkBox::setSize

Sets the size of this network box to the given [Hom:hou.Vector2].


Use `resize()` to set the box's size relative to its current size.

::`size(self)` -> [Hom:hou.Vector2]:


http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkBox (2 of 3) [12/7/2009 4:30:57 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkBox

#cppname: HOM_NetworkBox::size

Returns the size of this network box.

::`subnetIndirectInputs(self)` -> `tuple` of [Hom:hou.SubnetIndirectInput]:


#cppname: HOM_NetworkBox::subnetIndirectInputs
#status: ni

@replaces

- [Cmd:nbcolor]
- [Cmd:nbget]
- [Cmd:nblocate]
- [Cmd:nbls]
- [Cmd:nblsop]
- [Cmd:nbname]
- [Cmd:nbop]
- [Cmd:nbrm]
- [Cmd:nbset]
- [Cmd:nbsize]
- [Cmd:opscript]

http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkBox (3 of 3) [12/7/2009 4:30:57 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeBundle

= hou.NodeBundle =
#type: homclass
#cppname: HOM_NodeBundle
#category: Node Organization

"""A named set of nodes whose contents can be from different networks. A
bundle's contents may be fixed or may be determined from a pattern, and
the contents may be filtered by node type."""

Unlike node groups, the nodes in a bundle may be from different node networks.
For example, the same bundle may contain `/obj/geo1` and `/obj/subnet1/geo2`.
Node groups are primarily used to organize and display very large networks,
while node bundles are normally used to track which objects are lit by
a light, which objects are visible in a scene, etc.

There are two types of node bundles: regular and smart. You can add and remove
individual nodes to and from a regular bundle. The nodes in a smart bundle,
on the other hand, are determined from a pattern stored in the bundle.
As nodes matching the pattern are created or deleted in Houdini, the contents
of the bundle will update automatically. You can use
[Hom:hou.NodeBundle#pattern] to determine if the bundle is a smart bundle
or a regular one.

When a node matches the pattern in a smart bundle, that node and its children
will be added to the bundle. For example, if the pattern in `"/obj/*"` and
`/obj/box_object1` is a geometry object, all the nodes inside
`/obj/box_object1` will be added to the bundle, recursively. Carets (`^`) in
the pattern can be used to remove nodes; for example, `"/obj/* ^/obj/geo1"`
will match everything in `/obj` except for `/obj/geo1`.

A bundle may also have a filter to specify what types of nodes may be in
the bundle. See [Hom:hou.nodeTypeFilter] for the possible filters. If
you try to add a node to a regular bundle but the node does not match the
filter, Houdini will fail to add the node. For smart bundles, the filter
is applied after doing any pattern matching. For example, if the pattern
is `"/obj/*"` and the filter is `hou.nodeTypeFilter.Obj`, the bundle will
contain only the objects in `/obj`, without any SOPs, etc. inside them.
Because the pattern is applied recursively, however, any objects inside object
subnets will also be in the bundle.

To specify a bundle in a node parameter that expects a list of nodes, prefix


the bundle name with `@`. For example, you can enter `@bundle1` in the

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeBundle (1 of 5) [12/7/2009 4:30:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeBundle

light mask parameter of an object so it is lit by the nodes inside the bundle
named `bundle1`.

You can view and edit node bundles in Houdini's Bundle List pane. Use
[Hom:hou.nodeBundle_] and [Hom:hou.nodeBundles] to access existing node
bundles, and [Hom:hou.addNodeBundle] to create a new bundle.

@methods

::`name(self) -> str`:


#cppname: HOM_NodeBundle::name
#replaces: Cmd:opbls
Return the name of the bundle.

::`setName(self, name)`:
#cppname: HOM_NodeBundle::setName
#replaces: Cmd:opbname
Change the name of the bundle.

Raises [Hom:hou.OperationFailed] if the name contains non-alphanumeric


characters other than `_`, or if a bundle with that name already exists.

::`destroy(self)`:
#cppname: HOM_NodeBundle::destroy
#replaces: Cmd:opbrm
Remove this bundle.

::`pattern(self)` -> `str` or `None`:


#cppname: HOM_NodeBundle::pattern
#replaces: Cmd:opbls
Return None if this bundle is a regular bundle, or a string pattern if
the bundle is a smart bundle.

See the class documentation for more information on smart bundles. Note
that if a node matches the pattern, all its subchildren will be in the
bundle, as long as they match the filter. For example, if the pattern is
`"/obj/*"` and the filter is hou.nodeTypeFilter.NoFilter, the bundle will
contain all nodes under `/obj`, recursively.

::`setPattern(self, pattern_or_none)`:
#cppname: HOM_NodeBundle::setPattern
#replaces: Cmd:opbop
Change the pattern of this bundle.

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeBundle (2 of 5) [12/7/2009 4:30:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeBundle

Setting the pattern to None changes the bundle into a regular bundle. In
this case, the bundle's contents are unchanged, but Houdini will no
longer do pattern matching to determine the bundle's contents.

If the pattern is a string, the bundle becomes a smart bundle and its
contents immediately change to match the pattern. The bundle's contents
will update as nodes are created and deleted in Houdini.

See [Hom:hou.NodeBundle#pattern] and the class documentation for more


information.

::`filter(self)` -> [Hom:hou.nodeTypeFilter] enum value:


#cppname: HOM_NodeBundle::filter
#replaces: Cmd:opbls
Return the bundle's filter. For smart bundles, the filter is applied
after matching nodes to the pattern, and nodes whose types do not match
the filter are removed from the bundle.

See [Hom:hou.nodeTypeFilter] for the possible filters.


`hou.nodeTypeFilter.NoFilter` is a special value to indicate that there
is no filtering.

See the class documentation for more information about


filtering.

::`setFilter(self, node_type_filter)`:
#cppname: HOM_NodeBundle::setFilter
Set this bundle's filter to a [Hom:hou.nodeTypeFilter] enumerated value.
Use `hou.nodeTypeFilter.NoFilter` to clear the filter.

See [Hom:hou.NodeBundle#filter] and the class documentation for more


information.

::`nodes(self)` -> tuple of [Hom:hou.Node]:


#cppname: HOM_NodeBundle::nodes
#replaces: Cmd:opbls, Exp:opblist
Return a tuple of the nodes in this bundle.

::`containsNode(self, node)` -> `bool`:


#cppname: HOM_NodeBundle::containsNode
#replaces: Exp:opexist
Return True if the node is in the bundle and False otherwise. `node` must

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeBundle (3 of 5) [12/7/2009 4:30:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeBundle

be a [Hom:hou.Node] object.

This method is a shortcut for `node in bundle.nodes()`. For bundles with


many nodes, this method will be slightly faster.

::`addNode(self, node)`:
#cppname: HOM_NodeBundle::addNode
#replaces: Cmd:opbop
Add a node to the bundle.

Raises [Hom:hou.OperationFailed] if this bundle is a smart bundle, since


the contents of smart bundles are automatically determined by their pattern.

::`removeNode(self, node)`:
#cppname: HOM_NodeBundle::removeNode
#replaces: Cmd:opbop
Remove a node from the bundle.

Raises [Hom:hou.OperationFailed] if this bundle is a smart bundle, since


the contents of smart bundles are automatically determined by their pattern.

::`clear(self)`:
#cppname: HOM_NodeBundle::clear
#replaces: Cmd:opbop
Remove all nodes from the bundle.

Raises [Hom:hou.OperationFailed] if this bundle is a smart bundle, since


the contents of smart bundles are automatically determined by their pattern.

::`isSelected(self)` -> `bool`:


#cppname: HOM_NodeBundle::isSelected
#replaces: Cmd:opbls
Return True if the bundle is selected in the bundle list pane and
False otherwise.

::`setSelected(self, on, clear_all_selected=false)`:


#cppname: HOM_NodeBundle::setSelected
Select this bundle in the bundle list pane. If `clear_all_selected` is
True, only this bundle will remain selected. Otherwise, this bundle will
be added to the existing selection.

::`asCode(self)` -> `str`:


#cppname: HOM_NodeBundle::asCode

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeBundle (4 of 5) [12/7/2009 4:30:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeBundle

#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeBundle (5 of 5) [12/7/2009 4:30:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeGroup

= hou.NodeGroup =
#type: homclass
#cppname: HOM_NodeGroup
#category: Node Organization
"""Represents a node group."""

In Houdini, a node group contains a set of nodes from the same network.
Each group is named, and you can edit a group's contents from the network
view pane by selecting __Viewing Controls > Show Groups__ from its right-mouse
menu.

A node bundle, on the other hand, may contain nodes from multiple networks,
and corresponds to a [Hom:hou.NodeBundle] object. You can edit a node bundle
from the bundle list pane.

@methods

::`name(self)` -> `str`:


#cppname: HOM_NodeGroup::name
Returns the name of this group.

::`parent(self)` -> [Hom:hou.Node]:


#cppname: HOM_NodeGroup::parent
Returns the network node containing this group.

::`nodes(self)` -> tuple of [Hom:hou.Node]:


#cppname: HOM_NodeGroup::nodes
#replaces: Cmd:opgls
Return a tuple containing the nodes in this group.

::`addNode(self, node)`:
#cppname: HOM_NodeGroup::addNode
#replaces: Cmd:opgop
Add a [Hom:hou.Node] to this group.

If the node is already in the group, this method does nothing. If the node
is not in the correct network for this group, raises
[Hom:hou.OperationFailed].

::`removeNode(self, node)`:
#cppname: HOM_NodeGroup::removeNode
#replaces: Cmd:opgop

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeGroup (1 of 2) [12/7/2009 4:30:59 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeGroup

Remove a [Hom:hou.Node] from this group.

Raises [Hom:hou.OperationFailed] if the node is not in the group.

::`clear(self)`:
#cppname: HOM_NodeGroup::clear
#replaces: Cmd:opgop
Remove all nodes from this group.

::`destroy(self)`:
#cppname: HOM_NodeGroup::destroy
#replaces: Cmd:opgrm
Delete this group. Does not delete the nodes that were contained in it.

::`asCode(self, save_creation_commands=False, function_name=None)` -> `str`:


#cppname: HOM_NodeGroup::asCode
#replaces: Cmd:opscript
Returns the Python code necessary to recreate this group.

save_creation_commands:
Generate a creation script for the node group. If set to False (the
default), the generated script assumes that the node group already
exists. When set to True, the script will begin by creating the node
group.

function_name:
If a function_name is specified, the output will be wrapped in a Python
function.

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeGroup (2 of 2) [12/7/2009 4:30:59 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/addNodeBundle

= hou.addNodeBundle =
#type: homfunction
#cppname: hom::addNodeBundle
#category: Node Organization

"""Create a new node bundle with the specified name."""

@usage
`addNodeBundle(name)` -> [Hom:hou.NodeBundle]

See [Hom:hou.NodeBundle] for more information about node bundles.

Raises [Hom:hou.OperationFailed] if the name is not alphanumeric or


a bundle with that name already exists.

@replaces
- [Cmd:opbadd]

http://www.sidefx.com/docs/houdini10.0/hom/hou/addNodeBundle [12/7/2009 4:31:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeBundle_

= hou.nodeBundle =
#type: homfunction
#cppname: hom::nodeBundle
#category: Node Organization

"""Given a node bundle name, return the corresponding NodeBundle object,


or None if there is not one with that name."""

@usage
`nodeBundle(name)` -> [Hom:hou.NodeBundle] or `None`

See [Hom:hou.NodeBundle] for more information.

@replaces
- [Cmd:opbls]
- [Cmd:opglob]

http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeBundle_ [12/7/2009 4:31:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeBundles

= hou.nodeBundles =
#type: homfunction
#cppname: hom::nodeBundles
#category: Node Organization

"""Return a tuple containing all the node bundles in the current session."""

@usage
`nodeBundles()` -> `tuple` of [Hom:hou.NodeBundle]

See [Hom:hou.NodeBundle] for more information.

@replaces
- [Cmd:opbls]

http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeBundles [12/7/2009 4:31:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeTypeFilter

= hou.nodeTypeFilter =
#type: hommodule
#cppname: HOM_nodeTypeFilter
#category: Node Organization

"""Enumeration of available node type filters."""

These filters are used by node bundles to limit the nodes in the bundle
based on type.

hou.nodeTypeFilter.NoFilter:
Any node

hou.nodeTypeFilter.Sop:
Any SOP

hou.nodeTypeFilter.Pop:
Any POP

hou.nodeTypeFilter.Popnet:
Any POP Network

hou.nodeTypeFilter.Chop:
Any CHOP

hou.nodeTypeFilter.Chopnet:
Any CHOP Network

hou.nodeTypeFilter.Cop:
Any COP

hou.nodeTypeFilter.Copnet:
Any COP Network

hou.nodeTypeFilter.Vop:
Any VOP

hou.nodeTypeFilter.Vopnet:
Any VOP Network

hou.nodeTypeFilter.Rop:
Any ROP

http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeTypeFilter (1 of 3) [12/7/2009 4:31:01 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeTypeFilter

hou.nodeTypeFilter.Shop:
Any SHOP

hou.nodeTypeFilter.Obj:
Any Object

hou.nodeTypeFilter.ObjBone:
Object: Bone Only

hou.nodeTypeFilter.ObjCamera:
Object: Camera Only

hou.nodeTypeFilter.ObjFog:
Object: Fog Only

hou.nodeTypeFilter.ObjGeometry:
Object: Geometry Only

hou.nodeTypeFilter.ObjGeometryOrFog:
Object: Geometry and Fog Only

hou.nodeTypeFilter.ObjLight:
Object: Light Only

hou.nodeTypeFilter.ObjMuscle:
Object: Muscle Only

hou.nodeTypeFilter.ObjSubnet:
Object: Muscle Only

hou.nodeTypeFilter.ShopAtmosphere:
Shop: Atmosphere Only

hou.nodeTypeFilter.ShopCVEX:
Shop: CVEX Only

hou.nodeTypeFilter.ShopDisplacement:
Shop: Displacement Only

hou.nodeTypeFilter.ShopImage3D:
Shop: Image3D Only

http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeTypeFilter (2 of 3) [12/7/2009 4:31:01 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeTypeFilter

hou.nodeTypeFilter.ShopInterior:
Shop: Interior Only

hou.nodeTypeFilter.ShopLight:
Shop: Light Only

hou.nodeTypeFilter.ShopLightShadow:
Shop: Light Shadow Only

hou.nodeTypeFilter.ShopShopMaterial:
Shop: Material Only

hou.nodeTypeFilter.ShopPhoton:
Shop: Photon Only

hou.nodeTypeFilter.ShopProperties:
Shop: Properties Only

hou.nodeTypeFilter.ShopSurface:
Shop: Surface Only

http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeTypeFilter (3 of 3) [12/7/2009 4:31:01 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/selectedNodeBundles

= hou.selectedNodeBundles =
#type: homfunction
#cppname: hom::selectedNodeBundles
#category: Node Organization

"""Return a tuple containing all the node bundles that are selected in the
bundle list pane."""

@usage
`selectedNodeBundles()` -> `tuple` of [Hom:hou.NodeBundle]

This function is a shortcut for


`[bundle for bundle in hou.nodeBundles() if bundle.isSelected]`.

See [Hom:hou.NodeBundle] for more information about bundles.

@replaces
- [Cmd:opbls]

http://www.sidefx.com/docs/houdini10.0/hom/hou/selectedNodeBundles [12/7/2009 4:31:01 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeTypeCategory

= hou.NodeTypeCategory =
#type: homclass
#cppname: HOM_NodeTypeCategory
#category: Node type categories

"""Represents a category of node types, such as surface


nodes (SOPs) or particle nodes (POPs)."""

Use [Hom:hou.nodeTypeCategories] to get a dict of node type category names to


NodeTypeCategory objects. You can use [Hom:hou.objNodeTypeCategory],
[Hom:hou.sopNodeTypeCategory], etc. to directly access a particular node type
category.

See also [Hom:hou.NodeType] and [Hom:hou.Node].

{{{
#!pycon
# Get the names of all the node type categories.
>>> hou.nodeTypeCategories().keys()
['Shop', 'Cop2', 'CopNet', 'Particle', 'ChopNet', 'Object', 'Driver', 'Pop',
'Chop', 'Sop', 'Manager', 'Vop', 'Director', 'Dop', 'VopNet']
}}}

@methods

::`loadDSO(self, dso_path)`:
#cppname: HOM_NodeTypeCategory::loadDSO
Loads the HDK custom operator identified by the given file path for this
node type category. It will use the HOUDINI_DSO_PATH environment variable
to find it if necessary.

::`name(self)` -> `str`:


#cppname: HOM_NodeTypeCategory::name
#replaces: Cmd:optype, Exp:optypeinfo
Returns the name of this node type category.

::`nodeTypes(self)` -> `dict` of `str` to [Hom:hou.NodeType]:


#cppname: HOM_NodeTypeCategory::nodeTypes
#replaces: Cmd:opadd, Cmd:otglob
Return a dict mapping node type names to node types in this category.

For example, if this node type category is SOPs, the keys in the dictionary

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeTypeCategory (1 of 3) [12/7/2009 4:31:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeTypeCategory

would be "box", "sphere", "polyextrude", "subdivide", etc.

Note that the node types in this category may not all be instances of
the same class. For example, most node types in the SOP node type category
are instances of [Hom:hou.SopNodeType], but some, like SHOP networks, CHOP
networks, etc. are not.

{{{
#!python
# Access the box SOP's node type.
hou.sopNodeTypeCategory().nodeTypes()['box']
}}}

{{{
#!python
def findNodeTypes(node_type_category, pattern):
'''Return a list of node types in a particular node type category
whose names match a pattern.'''
import fnmatch

return [node_type
for node_type_name, node_type in node_type_category.nodeTypes().items()
if fnmatch.fnmatch(node_type_name, pattern)]
}}}

See also [Hom:hou.nodeType_].

::`scriptDirName(self)`:
#cppname: HOM_NodeTypeCategory::scriptDirName
#replaces: Cmd:optype, Exp:optypeinfo
#status: ni

::`viewerStates(self, viewer_type)` -> `tuple` of [Hom:hou.ViewerState]:


#cppname: HOM_NodeTypeCategory::viewerStates
#status: nd

@related
- [Hom:hou.nodeTypeCategories]
- [Hom:hou.objNodeTypeCategory]
- [Hom:hou.sopNodeTypeCategory]
- [Hom:hou.popNodeTypeCategory]
- [Hom:hou.dopNodeTypeCategory]
- [Hom:hou.cop2NodeTypeCategory]

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeTypeCategory (2 of 3) [12/7/2009 4:31:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeTypeCategory

- [Hom:hou.shopNodeTypeCategory_]
- [Hom:hou.vopNodeTypeCategory]
- [Hom:hou.ropNodeTypeCategory]
- [Hom:hou.chopNodeTypeCategory]
- [Hom:hou.popNetNodeTypeCategory]
- [Hom:hou.cop2NetNodeTypeCategory]
- [Hom:hou.vopNetNodeTypeCategory]
- [Hom:hou.chopNetNodeTypeCategory]
- [Hom:hou.managerNodeTypeCategory]
- [Hom:hou.rootNodeTypeCategory]

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeTypeCategory (3 of 3) [12/7/2009 4:31:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ShopNodeTypeCategory

= hou.ShopNodeTypeCategory =
#type: homclass
#cppname: HOM_ShopNodeTypeCategory
#superclass: hou.NodeTypeCategory
#category: Node type categories
#status: ni

Be careful not to confuse this function with the function


[Hom:hou.shopNodeTypeCategory_].

@methods

::`addShadersToMenu(self, renderer)` -> void:


#cppname: HOM_ShopNodeTypeCategory::addShadersToMenu
#replaces: Cmd:shopvisible
#status: ni

::`removeShadersFromMenu(self, renderer)` -> void:


#cppname: HOM_ShopNodeTypeCategory::removeShadersFromMenu
#replaces: Cmd:shopvisible
#status: ni

::`renderers(self)` -> tuple of strings:


#cppname: HOM_ShopNodeTypeCategory::renderers
#replaces: Cmd:shopvisible
#status: ni

See also [Hom:hou.ShopNode#shaderString] and


[Hom:hou.ShopNodeType#renderMask].

http://www.sidefx.com/docs/houdini10.0/hom/hou/ShopNodeTypeCategory [12/7/2009 4:31:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/chopNetNodeTypeCategory

= hou.chopNetNodeTypeCategory =

#type: homfunction
#cppname: channelContainerNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini channel container


(chopnet) nodes."""

@usage
`chopNetNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/chopNetNodeTypeCategory [12/7/2009 4:31:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/chopNodeTypeCategory

= hou.chopNodeTypeCategory =

#type: homfunction
#cppname: channelNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini channel (chop)


nodes."""

@usage
`chopNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/chopNodeTypeCategory [12/7/2009 4:31:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/cop2NetNodeTypeCategory

= hou.cop2NetNodeTypeCategory =

#type: homfunction
#cppname: compositeContainerNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini composite container


(copnet) nodes."""

@usage
`cop2NetNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/cop2NetNodeTypeCategory [12/7/2009 4:31:04 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/cop2NodeTypeCategory

= hou.cop2NodeTypeCategory =

#type: homfunction
#cppname: compositeNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini composite (cop)


nodes."""

@usage
`cop2NodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/cop2NodeTypeCategory [12/7/2009 4:31:04 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/dopNodeTypeCategory

= hou.dopNodeTypeCategory =

#type: homfunction
#cppname: dynamicNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini dynamic (dop)


nodes."""

@usage
`dopNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/dopNodeTypeCategory [12/7/2009 4:31:05 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/managerNodeTypeCategory

= hou.managerNodeTypeCategory =

#type: homfunction
#cppname: managerNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini manager nodes. The


manager nodes are /obj, /out, /part, /ch, /shop, /img, and /vex."""

@usage
`managerNodeTypeCategory()` -> NodeTypeCategory

Note that some container node types, like the shop network node type,
are called managers in Houdini. The node type category for an instance
of those nodes will be the same as other nodes in that same network. For
example, a shop network in objects will be in the objects node type
category, while a shop network in a sop network will be in the geometry
node type category.

http://www.sidefx.com/docs/houdini10.0/hom/hou/managerNodeTypeCategory [12/7/2009 4:31:05 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeTypeCategories

= hou.nodeTypeCategories =
#type: homfunction
#cppname: hom::nodeTypeCategories
#category: Node type categories

"""Return a dictionary where the keys are the category names (e.g. "Object",
"Sop") and the values are hou.NodeTypeCategory objects."""

@usage
`nodeTypeCategories()` -> dict of `str` to [Hom:hou.NodeTypeCategory]

http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeTypeCategories [12/7/2009 4:31:06 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/objNodeTypeCategory

= hou.objNodeTypeCategory =

#type: homfunction
#cppname: objectNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini object nodes. For


example, if /obj/model is an object then
hou.node("/obj/model").type().category() is
hou.objectNodeTypeCategory()."""

@usage
`objNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/objNodeTypeCategory [12/7/2009 4:31:06 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/popNetNodeTypeCategory

= hou.popNetNodeTypeCategory =

#type: homfunction
#cppname: particleContainerNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini particle container


(popnet) nodes."""

@usage
`popNetNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/popNetNodeTypeCategory [12/7/2009 4:31:06 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/popNodeTypeCategory

= hou.popNodeTypeCategory =

#type: homfunction
#cppname: particleNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini particle (pop)


nodes."""

@usage
`popNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/popNodeTypeCategory [12/7/2009 4:31:07 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/rootNodeTypeCategory

= hou.rootNodeTypeCategory =

#type: homfunction
#cppname: rootNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini root (/) node. There
is only one instance of the root node, and it has its own node type
category."""

@usage
`rootNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/rootNodeTypeCategory [12/7/2009 4:31:07 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ropNodeTypeCategory

= hou.ropNodeTypeCategory =

#type: homfunction
#cppname: outputNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini output (rop)


nodes."""

@usage
`ropNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/ropNodeTypeCategory [12/7/2009 4:31:08 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/shopNodeTypeCategory_

= hou.shopNodeTypeCategory =
#type: homfunction
#cppname: shaderNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory object corresponding to shader (SHOP) nodes."""

@usage
`shopNodeTypeCategory()` -> [Hom:hou.NodeTypeCategory]

Be careful not to confuse this function with the class


[Hom:hou.ShopNodeTypeCategory].

http://www.sidefx.com/docs/houdini10.0/hom/hou/shopNodeTypeCategory_ [12/7/2009 4:31:08 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/sopNodeTypeCategory

= hou.sopNodeTypeCategory =

#type: homfunction
#cppname: geometryNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini geometry (sop)


nodes."""

@usage
`sopNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/sopNodeTypeCategory [12/7/2009 4:31:08 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vopNetNodeTypeCategory

= hou.vopNetNodeTypeCategory =

#type: homfunction
#cppname: vexBuilderContainerNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini vex builder


container (vopnet) nodes."""

@usage
`vopNetNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/vopNetNodeTypeCategory [12/7/2009 4:31:09 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vopNodeTypeCategory

= hou.vopNodeTypeCategory =

#type: homfunction
#cppname: vexBuilderNodeTypeCategory
#category: Node type categories

"""Return the NodeTypeCategory instance for Houdini vex builder (vop)


nodes."""

@usage
`vopNodeTypeCategory()` -> NodeTypeCategory

http://www.sidefx.com/docs/houdini10.0/hom/hou/vopNodeTypeCategory [12/7/2009 4:31:09 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

= hou.Node =
#type: homclass
#cppname: HOM_Node
#category: Nodes

"""The base class for all nodes in Houdini (objects, SOPs, COPs, etc.) An
instance of this class corresponds to exactly one instance of a node in
Houdini."""

Each node has a unique path that defines its location in the tree of nodes.
The node path hierarchy is similar to the hierarchy of folders and files in a
file system. Some nodes, called networks, may contain other nodes inside them,
much like a file folder would, while other nodes may not. For example, an
object node instance and a SOP subnetwork node instance may contain SOP nodes,
but a box SOP instance may not.

TIP:
Be careful not to confuse nodes with node types. A node is an instance
of a node type. For example suppose `/obj/geo1/box1` is a box SOP. It has
its own unique name (box1) and its own copies of parameter values. It is
an instance of the box SOP node type. This node type defines what
parameters are common to all box SOP node instances, as well as the
algorithm that each BOX SOP performs. The class that represents a node
type is [Hom:hou.NodeType].

You cannot create instances of `hou.Node` using `hou.Node.__init__`.


Instead, you look up Node objects corresponding to existing Houdini nodes
with [Hom:hou.node_]. To create a new Houdini node instance inside another
node, use [Hom:hou.Node#createNode]. To delete a Houdini node, use
[Hom:hou.Node#destroy].

Note that a Node object internally stores a reference to the corresponding


Houdini node, and that their lifetimes are different. If a Python node object
is deleted because its reference count in Python goes to zero, the Houdini node
will be unaffected. On the other hand, if you have a Node object in a Python
variable and the Houdini node is deleted, the Python variable will still exist,
and Python will not crash. Instead, if you later call a method on that
Python Node object, Houdini will raise a [Hom:hou.ObjectWasDeleted] exception.

Be careful not to confuse this class with the function [Hom:hou.node_].

@methods

::`name(self)` -> `str`:


#cppname: HOM_Node::name
#replaces: Cmd:opname, Exp:opname, Exp:optypeinfo
Return this node's name. See also [Hom:hou.Node#path].

::`setName(self, name, unique_name=False)`:


#cppname: HOM_Node::setName
#replaces: Cmd:opname, Exp:opname
Set the name of this node. Raises [Hom:hou.OperationFailed] if the new
name contains characters other than letters, numbers, periods, dashes, or
underscores. Raises [Hom:hou.OperationFailed] if the node could not be
renamed (for example, another node already exists with the name, the node
is the root node or top-level manager (e.g. /obj), or the node is inside
a locked asset). If the unique_name parameter is set to True, the
supplied name may be changed to ensure that it doesn't match the name of
any existing node.

::`digitsInName(self)` -> `int`:


#cppname: HOM_Node::digitsInName
#replaces: Exp:opdigits
Return the value of the last set of digits inside the node's name, or
0 if there are no digits.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (1 of 22) [12/7/2009 4:31:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

For example, the result is `102` for a node named `geo102`, and `34` for
a node named `light12to34`.

::`path(self)` -> `str`:


#cppname: HOM_Node::path
#replaces: Exp:opfullpath, Exp:opinputpath, Exp:opoutputpath
Return the full path (i.e. starting with `/`) of this node in the network.

::`relativePathTo(self, base_node)` -> `str`:


#cppname: HOM_Node::relativePathTo
#replaces: Exp:oprelativepath
Return a relative path to another node object from this node.

{{{
#!pycon
>>> box1 = hou.node("/obj/box_object1/box1")
>>> sphere1 = hou.node("/obj/sphere_object1/sphere1")
>>> box1.relativePathTo(sphere1)
'../../sphere_object1/sphere1'
>>> hou.node("/obj").relativePathTo(box1)
'box_object1/box1'
>>> box1.relativePathTo(box1)
'.'
}}}

::`node(self, node_path)` -> [Hom:hou.Node] or `None`:


#cppname: HOM_Node::node
#replaces: Cmd:opfind, Exp:chsop, Exp:opexist, Exp:opfullpathfrom
Return the node at the given path, or None if no such node exists. If
you pass in a relative path (i.e. the path does not start with `/`),
searches are performed relative to this node.

For example, to get the parent node of a node in the the variable `n`, use
`n.node("..")`. To get a child node named `geo5`, use `n.node("geo5")`.
To get a sibling node named `light3`, use `n.node("../light3")`.

Note that the return value may be an instance of a subclass of Node. For
example, if the node being found is an object node, the return value
will be a [Hom:hou.ObjNode] instance.

If the path is an absolute path (i.e. it starts with `/`), this


method is a shortcut for `hou.node(node_path)`. Otherwise, it is
a shortcut for `hou.node(self.path() + "/" + node_path)`. See also
[Hom:hou.node_].

::`parent(self)` -> [Hom:hou.Node]:


#cppname: HOM_Node::parent
Return the node that contains this node.

This method is a shortcut for `self.node("..")`. Note that this method


returns None if the node is the root (i.e. `/`).

{{{
#!pycon
>>> hou.node("/obj/box_object1").parent()
<hou.Node at /obj>
>>> print hou.node("/").parent()
None
}}}

::`children(self)` -> `tuple` of [Hom:hou.Node]:


#cppname: HOM_Node::children
#replaces: Cmd:opfind, Cmd:opls, Exp:opnchildren
Return a list of nodes that are children of this node. Using the file
system analogy, a node's children are like the contents of a
folder/directory.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (2 of 22) [12/7/2009 4:31:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

To find the number of children nodes, use `len(node.children())`.

The order of the children in the result is the same as the user defined
ordering in Houdini. To see this order, switch the network view pane
into list mode, and ensure that the list order is set to __user defined__.
To reorder nodes, drag and drop them in the list.

{{{
#!python
def pc(node):
'''Print the names of the children of a particular node. This function
can be handy when working interactively in the Python shell.'''
for child in node.children():
print child.name()

def ls():
'''Print the names of the nodes under the current node.'''
pc(hou.pwd())
}}}

The following expression evaluates to a list of children of a particular


node type:
{{{
#!python
[c for c in node.children() if c.type() == node_type]
}}}

::`allSubChildren(self, top_down=True)` -> tuple of [Hom:hou.Node]:


#cppname: HOM_Node::allSubChildren
#replaces: Cmd:oprmtype, Cmd:opfind
Recursively return all sub children of this node. For example,
`hou.node("/").allSubChildren()` will return all the nodes in the hip
file.

top_down:
If True, this function will do a top-down traversal, placing a node
in the returned tuple before its children. If False, it will do
a bottom-up traversal, placing children before their parents.

Note that a tuple is returned, not a generator. This means that it is


safe to delete or create nodes while looping through the return value.

The following function deletes all children of a particular type that


appear anywhere inside a given node:
{{{
#!python
def removeSubChildrenOfType(node, node_type):
'''Recursively delete all children of a particular type.'''
for child in allSubChildren(node):
if child.type() == node_type:
child.destroy()
}}}

This code, for example, removes all the visibility SOPs anywhere under /obj:
{{{
#!pycon
>>> removeSubChildrenOfType(hou.node("/obj"), hou.sopNodeTypeCategory().nodeTypes()['visibility'])
}}}

::`reorderChildrenAfter(self, children_nodes, after_node=None)`:


#cppname: HOM_Node::reorderChildrenAfter
#replaces: Cmd:oporder
#status: ni

::`reorderChildrenBefore(self, children_nodes, before_node=None)`:


#cppname: HOM_Node::reorderChildrenBefore
#replaces: Cmd:oporder
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (3 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

#status: ni

::`reorderChildrenToBeginning(self, children_nodes)`:
#cppname: HOM_Node::reorderChildrenToBeginning
#replaces: Cmd:oporder
#status: ni

::`reorderChildrenToEnd(self, children_nodes)`:
#cppname: HOM_Node::reorderChildrenToEnd
#replaces: Cmd:oporder
#status: ni

::`glob(self, pattern)` -> tuple of [Hom:hou.Node]:


#cppname: HOM_Node::glob
#replaces: Cmd:opglob, Cmd:opfind
Return a tuple of children nodes name matches the pattern.

The pattern may contain multiple pieces, separated by spaces. An asterisk


(`*`) in a pattern piece will match any character. By default, Houdini
will add the nodes from each pattern piece to those already matched.
However, if the pattern piece begins with a caret (`^`), Houdini will
remove the matches for that piece from the result.

This method returns an empty tuple if you pass in an empty pattern.

{{{
#!pycon
>>> obj = hou.node("/obj")
>>> obj.createNode("geo", "geo1")
<hou.ObjNode of type geo at /obj/geo1>
>>> obj.createNode("geo", "geo2")
<hou.ObjNode of type geo at /obj/geo2>
>>> obj.createNode("geo", "grid")
<hou.ObjNode of type geo at /obj/grid>
>>> obj.createNode("geo", "garbage")
<hou.ObjNode of type geo at /obj/garbage>
>>> obj.createNode("geo", "box")
<hou.ObjNode of type geo at /obj/box>

>>> def names(nodes):


... return [node.name() for node in nodes]

>>> names(obj.glob("g*"))
['geo1', 'geo2', 'grid', 'garbage']
>>> names(obj.glob("ge* ga*"))
['geo1', 'geo2', 'garbage']
>>> names(obj.glob("g* ^ga*"))
['geo1', 'geo2', 'grid']
}}}

See also [Hom:hou.Node#recursiveGlob].

::`recursiveGlob(self, pattern, filter=hou.nodeTypeFilter.NoFilter)` -> tuple of [Hom:hou.Node]:


#cppname: HOM_Node::recursiveGlob
#replaces: Cmd:opglob, Cmd:opfind
Like [Hom:hou.Node#glob], return a tuple of children nodes whose name
matches the pattern. However, any matching child will have all its chidren
added, recursively. As well, the result may be filtered by node type.

Houdini first matches children nodes against the pattern, then recursively
adds the subchildren of matching children, and then applies the filter.

`pattern`:
Child node names will be matched against this string pattern. See
[Hom:hou.Node#glob] and [Hom:hou.NodeBundle] for information about the
pattern syntax. Note that if a child node matches the pattern, all of
its subchildren will be added to the result (subject to filtering),
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (4 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

regardless of the pattern.

`filter`:
A [Hom:hou.nodeTypeFilter] enumeration value to limit matched nodes
to a particular type (e.g. object nodes, geometry object nodes,
surface shader SHOPs, etc.).

The pattern and filter behaviour is very similar to that used by node
bundles in Houdini. See [Hom:hou.NodeBundle] for more information.

Raises [Hom:hou.OperationFailed] if the pattern is invalid.

::`createNode(self, node_type_name, node_name=None, run_init_scripts=True, load_contents=True)` -> [Hom:hou.Node]:


#cppname: HOM_Node::createNode
#replaces: Cmd:opadd
Create a new node of type `node_type_name` as a child of this node.

`node_name`:
The name of the new node. If not specified, Houdini appends a number
to the node type name, incrementing that number until a unique node
name is found. If you specify a name and a node already exists with
that name, Houdini will append a number to create a unique name.

`run_init_scripts`:
If True, the initialization script associated with the node type will
be run on the new node.

`load_contents`:
If True, any subnet contents will be loaded for custom subnet
operators.

Raises [Hom:hou.OperationFailed] if this node cannot contain children.


Raises [Hom:hou.PermissionError] if this node is inside a locked asset.

{{{
#!pycon
>>> obj = hou.node("/obj")

# Let Houdini choose a name based on the node type name.


>>> obj.createNode("geo")
<hou.ObjNode of type geo at /obj/geo1>

# Let Houdini choose a unique name.


>>> obj.createNode("geo")
<hou.ObjNode of type geo at /obj/geo2>

# Give the node a specific name.


>>> obj.createNode("geo", "foo")
<hou.ObjNode of type geo at /obj/foo>

# Let Houdini create a unique name from our suggested name. Also, don't
# run the geometry object init scripts so the contents are empty.
>>> obj.createNode("geo", "geo1", run_init_scripts=False)
<hou.ObjNode of type geo at /obj/geo3>
>>> obj.node("geo1").children()
(<hou.SopNode of type file at /obj/geo1/file1>,)
>>> obj.node("geo3").children()
()
}}}

::`destroy(self)`:
#cppname: HOM_Node::destroy
#replaces: Cmd:oprm
Delete this node.

If you call methods on a Node instance after it has been destroyed, Houdini
will raise [Hom:hou.ObjectWasDeleted].
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (5 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

Raises [Hom:hou.OperationFailed] if you try to delete a node inside a


locked asset.

::`isCurrent(self)` -> `bool`:


#cppname: HOM_Node::isCurrent
#replaces: Cmd:opget, Exp:opflag
Return a boolean to indicate of the node is the last selected node in its
network.

Each network (i.e. node containing children) stores its own list of
selected nodes, and the last selected node has special meaning. For
example, it is the node displayed in unpinned parameter panes.

See also [Hom:hou.selectedNodes] to get a tuple of all the selected nodes


in all networks in Houdini. The last node in this list also has special
meaning in Houdini, and corresponds to the global current node.

::`setCurrent(self, on, clear_all_selected=False)`:


#cppname: HOM_Node::setCurrent
#replaces: Cmd:opset
Set or unset this node as the last selected one.

Each network (i.e. node containing children) stores its own list of
selected nodes, and the last selected node has special meaning. For
example, it is the node displayed in unpinned parameter panes.

If `on` is True, this node will become the last selected node. If it
is False and this node was the last selected one, it will be unselected
and the second-last selected node will become the last selected node.

If `clear_all_selected` is true, Houdini will unselect every node in


this network before performing the operation.

See also [Hom:hou.Node#setSelected] and [Hom:hou.selectedNodes].

::`isSelected(self)` -> `bool`:


#cppname: HOM_Node::isSelected
#replaces: Cmd:opget, Exp:opflag
Return whether this node is selected.

See also [Hom:hou.selectedNodes].

::`setSelected(self, on, clear_all_selected=False)`:


#cppname: HOM_Node::setSelected
#replaces: Cmd:opset, Exp:opselect
Select or deselect this node, optionally deselecting all other selected
nodes in this network.

::`selectedChildren(self, include_hidden=False)` -> `tuple` of [Hom:hou.Node]:


#cppname: HOM_Node::selectedChildren
#replaces: Cmd:opget
Return a tuple containing the children of this node that are selected.
Note that the last selected node has special meaning, and can also be
retrieved with [Hom:hou.Node#isCurrent].

`include_hidden`:
If False, hidden nodes are not included in the result, even if they
are selected.

The following example will print the names of all selected objects in
`/obj`:
{{{
#!python
for n in hou.node("/obj").selectedChildren():
print n.name()
}}}
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (6 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

To find the total number of selected children nodes, use


`len(node.selectedChildren())`.

::`type(self)` -> [Hom:hou.NodeType]:


#cppname: HOM_Node::type
#replaces: Cmd:optype, Exp:optype
Return the [Hom:hou.NodeType] object for this node.

For example, all camera node instances share the same node type.

::`changeNodeType(self, new_node_type, keep_name=True, keep_parms=True, keep_network_contents=True)` -> [Hom:hou.Node]:


#cppname: HOM_Node::changeNodeType
#replaces: Cmd:opchangetype
Changes the node to a new type.

`Keep_name`, `keep_parms`, and `keep_network_contents` indicate that the


node should keep the same name, parameter values, and contents,
respectively, after its type has changed.

::`childTypeCategory(self)` -> [Hom:hou.NodeTypeCategory]:


#cppname: HOM_Node::childTypeCategory
Return the [Hom:hou.NodeTypeCategory] corresponding to the children of
this node. For example, if this node is a geometry object, the children
are SOPs. If it is an object subnet, the children are objects.

::`parm(self, parm_path)` -> [Hom:hou.Parm] or `None`:


#cppname: HOM_Node::parm
#replaces: Exp:chexist
Return the parameter at the given path, or `None` if the parameter
doesn't exist.

::`evalParm(self, parm_path)` -> `int`, `float`, or `str`:


#cppname: HOM_Node::evalParm
#replaces: Exp:ch, Exp:chs
Evaluates the specified parameter and returns the result.

::`parms(self)` -> `tuple` of [Hom:hou.Parm]:


#cppname: HOM_Node::parms
#replaces: Cmd:opparm
Return a list of the parameters on this node.

::`findParms(self, pattern)` -> tuple of Parms:


#cppname: HOM_Node::findParms
#status: ni

::`__getitem__(self, parm_name)`:
#cppname: HOM_Node::__getitem__
#status: ni

::`__setitem__(self, parm_name, value)`:


#cppname: HOM_Node::__setitem__
#status: ni

::`parmTuple(self, parm_path)` -> [Hom:hou.ParmTuple] or `None`:


#cppname: HOM_Node::parmTuple
Return the parm tuple at the given path, or `None` if it doesn't exist.

This method is similar to `parm()`, except it returns a


[Hom:hou.ParmTuple] instead of a [Hom:hou.Parm].

::`evalParmTuple(self, parm_path)` -> `tuple` of `int`, `float`, or `str`:


#cppname: HOM_Node::evalParmTuple
Evaluates the specified parameter tuple and returns the result.

::`parmTuples(self)` -> `tuple` of [Hom:hou.ParmTuple]:


#cppname: HOM_Node::parmTuples
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (7 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

Return a list of all parameter tuples on this node.

This method is similar to `parms()`, except it returns a list of


[Hom:hou.ParmTuple] instead of [Hom:hou.Parm].

::`parmsInFolder(self, folder_names, folder_style)` -> `tuple` of [Hom:hou.Parm]:


#cppname: HOM_Node::parmsInFolder
Return a list of parameters in a folder on this node. Returns all
parameters in the folder and its subfolders (if any).

folder_names:
A sequence of folder name strings. For example, to get a list of the
parameters in the Shading folder of the Render folder, use
`("Render", "Shading")`.

If this sequence is empty, the method returns all parameters on the


node, the same as if you called `parms()`.

folder_style:
A member of [Hom:hou.folderType] describing how the folder is
rendered.

Raises [Hom:hou.OperationFailed] if the folder specified by `folder_names`


does not exist.

See also [Hom:hou.Parm#containingFolders]


and [Hom:hou.Parm#containingFolderSetParmTuples]

::`parmTuplesInFolder(self, folder_names)` -> tuple of [Hom:hou.ParmTuple]:


#cppname: HOM_Node::parmTuplesInFolder

Return a list of the parameter tuples in a folder on this node.


This method is similar to `parmsInFolder()`, except it returns a list of
[Hom:hou.ParmTuple] instead of [Hom:hou.Parm]. See `parmsInFolder()`
above for information about the arguments.

See also [Hom:hou.Parm#containingFolders]


and [Hom:hou.Parm#containingFolderSetParmTuples]

::`parmToNodeReferences(self, max_hierarchy_depth=None)` -> `dict` of [Hom:hou.Parm] to [Hom:hou.Node]:


#cppname: HOM_Node::parmToNodeReferences
#replaces: Cmd:opdepend
#status: ni

::`expressionLanguage(self)` -> [Hom:hou.exprLanguage] enum value:


#cppname: HOM_Node::expressionLanguage
Return the node's default expression language.

When you enter an expression in a parameter that does not already contain
an expression, the node's expression language is used to determine how
that expression should be evaluated. You can change a node's expression
language in the parameter dialog in the GUI.

Changing the node's expression language will not change the language in
parameters already containing expressions (i.e. parameters with keyframes).

Note that if a parameter already contains an expression and you change that
expression in the GUI, the expression language will not change, regardless
of the value of the node's expression language. To change the language of an
existing expression in a parameter from Python, use
[Hom:hou.Parm#setExpression], as in
`parm.setExpression(parm.expression(), language)`.

::`setExpressionLanguage(self, language)`:
#cppname: HOM_Node::setExpressionLanguage
Set the node's default expression language.
See `expressionLanguage()` for more information.
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (8 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

::`parmAliases(self, recurse=False)` -> dict of [Hom:hou.Parm] to `str`:


#cppname: HOM_Node::parmAliases
#replaces: Cmd:chalias
Return a dictionary of parameter aliases on the node's parameters. The
keys in the dictionary are the parameters that have aliases and the values
are the alias names.

recurse:
Return the parameter aliases for this node _and its children_.

::`clearParmAliases(self)`:
#cppname: HOM_Node::clearParmAliases
#replaces: Cmd:chalias
Removes all alias names from parameters on the node.

::`spareParms(self)` -> tuple of [Hom:hou.Parm]:


#cppname: HOM_Node::spareParms
#replaces: Cmd:opspare
Return a list of the spare (user-defined) parameters on this node.

::`addSpareParmTuple(self, parm_template, in_folder=(), create_missing_folders=False)` -> [Hom:hou.ParmTuple]:


#cppname: HOM_Node::addSpareParmTuple
#replaces: Cmd:opspare
Add a spare parameter tuple to the end of the parameters on the node. If
`in_folder` is not an empty sequence, this method adds the parameters to
the end of the parameters in a particular folder.

parm_template:
A [Hom:hou.ParmTemplate] subclass instance that specifies the type
of parameter tuple, the default value, range, etc.

in_folder:
A sequence of folder names specifying which folder will hold the
parameter. If this parameter is an empty sequence (e.g. `()`), Houdini
will not put the parameter inside a folder. If it is, for example,
`("Misc", "Controls")`, Houdini puts it inside the "Controls" folder
that's inside the "Misc" folder. If it is, for example, `("Misc",)`,
Houdini puts it inside the "Misc" folder.

create_missing_folders:
If True, and the folder location specified by `in_folder` does not
exist, this method creates the missing containing folders.

See also the `removeSpareParmTuple()` and `addSpareParmFolder()` methods.

::`removeSpareParmTuple(self, parm_tuple)`:
#cppname: HOM_Node::removeSpareParmTuple
Removes the specified spare parameter tuple.

See also `addSpareParmTuple()`.

::`addSpareParmFolder(self, folder_name, in_folder=(), parm_name=None, create_missing_folders=False)`:


#cppname: HOM_Node::addSpareParmFolder
Adds a folder to the spare parameters.

Note that all the folders in a set correspond to one parameter. If this
is the first folder to go in the set, parm_name will be used as the
parameter name. Otherwise, parm_name will be ignored and the parameter
name of the first folder in the set is used.

If this is the first folder in the set and parm_name is None, it will
default to 'sparefolder0'. If parm_name is already in use, a unique name
will be automatically generated.

If `create_missing_folders` is True, this method will create the folders in


in_folder that don't exist. So, this method can be used to add spare folders
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (9 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

and a spare parameter at the same time.

See also the `removeSpareParmFolder()` and `addSpareParmTuple()` methods.

::`removeSpareParmFolder(self, folder)`:
#cppname: HOM_Node::removeSpareParmFolder
Removes an empty folder from the spare parameters.

`folder` is a sequence of folder names. So, to remove


the Output folder, use `("Output",)` instead of `"Output"`.

See also `addSpareParmFolder()`.

::`replaceSpareParmTuple(self, parm_tuple_name, parm_template)`:


#cppname: HOM_Node::replaceSpareParmTuple
Replace an existing spare parameter tuple with a new one. The old
parameter tuple is removed and the new one is added in its place.

parm_tuple_name:
The name of the spare parameter tuple to replace. Raises
[Hom:hou.OperationFailed] if no parameter tuple exists with this name,
or if it is the name of a non-spare parameter.

parm_template:
A [Hom:hou.ParmTemplate] describing the new parameter tuple.

The new parameter tuple may or may not have the same name as the old one.
By providing a parameter tuple with the same name, you can modify an
existing spare parameter tuple.

Note that you cannot replace non-spare parameter tuples. However, you can
change the visibility of non-spare parameters using
[Hom:hou.ParmTuple#hide].

To change a parameter for all instances of digital asset, use


[Hom:hou.HDADefinition#replaceParmTuple].

::`inputs(self)` -> `tuple` of [Hom:hou.Node]:


#cppname: HOM_Node::inputs
#replaces: Cmd:opgetinput, Exp:opinputs, Exp:opninputs, Exp:icl, Exp:icn, Exp:icr, Exp:ics
Return a tuple of the nodes connected to this node's inputs.

This method is a shortcut for `[connection.outputNode() for connection in


self.inputConnections()]`.

::`outputs(self)` -> `tuple` of [Hom:hou.Node]:


#cppname: HOM_Node::outputs
#replaces: Exp:opoutput, Cmd:opdepend, Exp:opnoutputs
Return a tuple of the nodes connected to this node's outputs.

This method is a shortcut for `[connection.inputNode() for connection in


self.outputConnections()]`.

::`inputConnections(self)` -> `tuple` of [Hom:hou.NodeConnection]:


#cppname: HOM_Node::inputConnections
#replaces: Cmd:opgetinput
Return a tuple of NodeConnection objects for the connections coming into
the top of this node. If nothing is wired into this node, return an empty
tuple.

To get a list of the connected nodes themselves, use [Hom:hou.Node#inputs].

Note that this method is a shortcut for `[connectors[0] for


connectors in self.inputConnectors() if len(connectors) != 0]`.

{{{
#!pycon
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (10 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

>>> cookie = hou.node("/obj").createNode("geo").createNode("cookie")


>>> cookie.setInput(1, cookie.parent().createNode("box"))
>>> cookie.inputConnections()
(<hou.NodeConnection from grid1 output 0 to cookie input 1>,)
>>> cookie.inputConnectors()
((), (<hou.NodeConnection from grid1 output 0 to cookie input 1>,))
}}}

See also [Hom:hou.Node#inputConnectors].

::`outputConnections(self)` -> `tuple` of [Hom:hou.NodeConnection]:


#cppname: HOM_Node::outputConnections
Return a tuple of NodeConnection objects for the connections going out of
the bottom of this node. If nothing is wired into the output of this
node, return an empty tuple.

To get a list of the connected nodes themselves, use


[Hom:hou.Node#outputs].

Note that this method is a shortcut for: `reduce(lambda a, b: a+b,


self.outputConnectors(), ())`. Since most nodes have only one output
connector, though, this method is usually equivalent to
`self.outputConnectors()[0]`.

{{{
#!pycon
>>> box = hou.node("/obj").createNode("geo").createNode("box")
>>> box.parent().createNode("xform").setFirstInput(box)
>>> box.parent().createNode("subdivide").setFirstInput(box)
>>> box.outputConnections()
(<hou.NodeConnection from box1 output 0 to xform1 output 0>, <hou.NodeConnection from box1 output 0 to subdivide1 input 0>)
}}}

See also [Hom:hou.node#outputConnectors].

::`inputConnectors(self)` -> `tuple` of `tuple` of [Hom:hou.NodeConnection]:


#cppname: HOM_Node::inputConnectors
#replaces: Cmd:opdepend, Cmd:opgetinput, Exp:opinput
Return a tuple of tuples of [Hom:hou.NodeConnection] objects. The length
of the result tuple is equal to the number of input connectors on this
node. Each subtuple contains exactly one node connection if something is
wired into the connector; otherwise it is the empty tuple.

See also [Hom:hou.NodeConnector] and [Hom:hou.Node#inputConnections].

::`outputConnectors(self)` -> `tuple` of `tuple` of [Hom:hou.NodeConnection]:


#cppname: HOM_Node::outputConnectors
#replaces: Exp:opgetinput, Exp:opninputs, Exp:icl, Exp:icn, Exp:icr, Exp:ics, Cmd:opdepend
Return a a tuple of tuples of [Hom:hou.NodeConnection] objects. The length
of the result tuple is equal to the number of output connectors on this
node. Each subtuple contains all the connections going out of that
connector, and is empty if nothing is wired to that connector.

{{{
#!python
>>> split = hou.node("/obj").createNode("dopnet").createNode("split")
>>> split.parent().createNode("rbdsolver").setFirstInput(split)
>>> split.parent().createNode("gravity").setFirstInput(split, 1)
>>> split.parent().createNode("merge").setFirstInput(split, 1)
>>> split.outputConnectors()
((<hou.NodeConnection from split1 output 0 to rbdsolver1 input 0>,), (<hou.NodeConnection from split1 output 1 to gravity2 input 0>, <hou.NodeConnection from split1 output 1 to merge1 input 0>), (), ())
}}}

See also [Hom:hou.NodeConnection] and [Hom:hou.Node#outputConnections].

::`indirectInputs(self)` -> `tuple` of [Hom:hou.SubnetIndirectInput]:


#cppname: HOM_Node::indirectInputs
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (11 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

#replaces: Cmd:opdepend
Return the hou.SubnetIndirectInput objects of a subnet.

Raises [Hom:hou.InvalidNodeType] if this node is not a subnetwork.

::`inputAncestors(self)` -> `tuple` of [Hom:hou.Node]:


#cppname: HOM_Node::inputAncestors
Return a tuple of all input ancestors of this node. If include_ref_inputs
is False, then reference inputs are not traversed. If follow_subnets is
True, then instead of treating subnetwork nodes as a single node, we also
traverse its children starting with its display node.

See also the `inputs()` method.

::`extraInputs(self)` -> `tuple` of [Hom:hou.Node]:


#cppname: HOM_Node::extraInputs
#replaces: Cmd:opdepend
#status: ni

::`extraOutputs(self)` -> `tuple` of [Hom:hou.Node]:


#cppname: HOM_Node::extraOutputs
#replaces: Cmd:opdepend
#status: ni
Return this node's extra output nodes.

When a parameter in node A has a channel reference to a parameter in node


B, node A becomes an extra output of node B. Note, though, that node B
is not an extra input of node A.

{{{
#!pycon
>>> a = hou.node("/obj").createNode("geo")
>>> b = hou.node("/obj").createNode("geo")
>>> a.parm("tx").set(b.parm("tx"))
>>> b.extraOutputs()
(<hou.ObjNode of type geo at /obj/geo2>,)
}}}

::`setInput(self, input_index, node_to_become_input, output_index=0)`:


#cppname: HOM_Node::setInput
#replaces: Cmd:opwire, Cmd:opunwire
If `node_to_become_input` is not None, connect the output connector of
another node to an input connector of this node. Otherwise, disconnect
anything connected to the input connector.

input_index:
The index of this node's input connector.

node_to_become_input:
If `None` this method disconnects everything from the input connector.
If a [Hom:hou.Node] or a [Hom:hou.SubnetIndirectInput], this method
connects its output to this node's input connector.

output_index:
The index of the other node's output connector.

Raises [Hom:hou.InvalidInput] if `output_index` is invalid. Raises


[Hom:hou.OperationFailed] if `node_to_become_input` is not in the same
network as this node. Raises [Hom:hou.PermissionError] if the node is
inside a locked asset.

::`setFirstInput(self, node_to_become_input, output_index=0)`:


#cppname: HOM_Node::setFirstInput
#replaces: Cmd:opwire
A shortcut for `self.setInput(node_to_become_input, 0)`. See
[Hom:hou.Node#setInput] for more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (12 of 22) [12/7/2009 4:31:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

::`setNextInput(self, node_to_become_input, output_index=0)`:


#cppname: HOM_Node::setNextInput
#replaces: Cmd:opwire
Connect the output connector from another node into the first unconnected
input connector of this node.

This method is roughly equivalent to:


{{{
#!python
for input_index, conectors in enumerate(self.inputConnectors()):
if len(connectors) == 0:
self.setInput(input_index, node_to_become_input, output_index)
raise hou.InvalidInput("All inputs are connected")
}}}

Raises [Hom:hou.InvalidInput] if all inputs are connected. See


[Hom:hou.Node#setInput] for more information.

::`insertInput(self, input_index, node_to_become_input, output_index=0)`:


#cppname: HOM_Node::insertInput
Insert an input wire. In other words, for each input connector after
input_index, shift the contents of that input connector to the next
one, and then call [Hom:hou.Node#setInput]. See [Hom:hou.Node#setInput]
for the meanings of the parameters.

::`collapseIntoSubnet(self, child_nodes, subnet_name=None)` -> [Hom:hou.Node]:


#cppname: HOM_Node::collapseIntoSubnet
#replaces: Cmd:opcollapse
Given a sequence of children nodes of this node, collapse them into a
subnetwork. In other words, create a subnet inside this node's network
and move the specified children of this network inside that subnet.

child_nodes:
The children nodes of this node that will go in the new subnet.

subnet_name:
The name for the new subnet node, or None if you want Houdini to
automatically choose a name.

Raises [Hom:hou.OperationFailed] if a node inside `child_nodes` is not


a child of this network, or if `child_nodes` is an empty sequence.

This example function takes a single node and replaces it with a subnet,
moving the node into the subnet..
{{{
#!python
def collapseSingleNodeIntoSubnet(node, subnet_name=None):
node.parent().collapseIntoSubnet((node,), subnet_name=None)
}}}

::`extractAndDelete(self)`:
#cppname: HOM_Node::extractAndDelete
#replaces: Cmd:opextract
Move the children of this subnet node to become siblings of this node, and
then delete this node. The method is the opposite of
`collapseIntoSubnet()`.

Raises [Hom:hou.InvalidNodeType] if this node is not a subnetwork.

::`createDigitalAsset(self, name=None, hda_file_name=None, description=None, min_num_inputs=None, max_num_inputs=None, compress_contents=False, comment=None, version=None, save_as_embedded=False, ignore_external_references=False)` -> `Node`:
#cppname: HOM_Node::createDigitalAsset
Create a digital asset from this node. You would typically call this
method on subnet nodes.

name:
The name of the node type that the new digital asset will define.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (13 of 22) [12/7/2009 4:31:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

hda_file_name:
The name of the otl file where Houdini will save the digital asset.
If `None` Houdini will use `$HOME/houdiniX.Y/otls/OPcustom.otl`.

description:
The name that will appear in the tab menu. If None, Houdini will use
the name for the description.

min_num_inputs:
The minimum number of inputs that need to be wired into instances of
the digital asset. See [Hom:hou.HDADefinition#minNumInputs] for more
information.

max_num_inputs:
The number of input connectors available on instances of the digital
asset for input connections. See [Hom:hou.HDADefinition#minNumInputs]
for more information.

compress_contents:
Whether or not the contents of this digital asset are compressed inside
the otl file. See [Hom:hou.HDAOptions#compressContents] for more
information.

comment:
A user-defined comment string. See [Hom:hou.HDADefinition#comment]
for more information.

version:
A user-defined version string. See [Hom:hou.HDADefinition#version]
for more information.

save_as_embedded:
Whether or not the digital asset's definition will be saved with the
hip file instead of an otl file. When this parameter is True, Houdini
ignores the `hda_file_name` parameter. Setting this parameter to True
is equivalent to setting this parameter to False and setting the
`hda_file_name` parameter to "Embedded".

ignore_external_references:
If True, Houdini will not generate warnings if the contents of this
digital asset reference nodes outside the asset.

::`allowEditingOfContents(self, propagate=False)`:
#cppname: HOM_Node::allowEditingOfContents
#replaces: Cmd:otsync
Unlocks a digital asset so its contents can be edited.

To use this function, you must have permission to modify the HDA.

::`matchCurrentDefinition(self)`:
#cppname: HOM_Node::matchCurrentDefinition
#replaces: Cmd:otsync
If this node is an unlocked digital asset, change its contents to match
what is stored in the definition and lock it. The parameter values are
unchanged.

If this node is locked or is not a digital asset, this method has no


effect.

See also [Hom:hou.Node#matchesCurrentDefinition] and


[Hom:hou.Node#isLocked].

::`matchesCurrentDefinition(self)` -> `bool`:


#cppname: HOM_Node::matchesCurrentDefinition
#replaces: Cmd:otsync
Return whether the contents of the node match its type definition. A
locked digital asset instance will always match its definition, but
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (14 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

an unlocked one may not.

::`isLocked(self)` -> `bool`:


#cppname: HOM_Node::isLocked
If this node is an instance of a digital asset, return whether or not it
is locked. Otherwise, return False.

To differentiate between unlocked digital assets and nodes that are


not instances of digital assets, check if the node's type has a definition:
{{{
#!python
def isUnlockedAsset(node):
return not node.isLocked() and node.type().definition() is not None
}}}

See [Hom:hou.HDADefinition#updateFromNode] for an example of how to


save and lock all unlocked digital asset instances.

::`isInsideLockedHDA(self)` -> `bool`:


#cppname: HOM_Node::isInsideLockedHDA
Return whether this node is inside a locked digital asset. If this node is
not inside a locked HDA, the node may deviate from the OTL definition.

::`hdaModule(self)` -> [Hom:hou.HDAModule]:


#cppname: HOM_Node::hdaModule
This method is a shortcut for `self.type().hdaModule() to reduce the length
of expressions in Python parameters and button callbacks. See
[Hom:hou.NodeType#hdaModule] for more information.

::`comment(self)` -> `str`:


#cppname: HOM_Node::comment
#replaces: Cmd:opcomment
Return the node's comment string.

::`setComment(self, comment)`:
#cppname: HOM_Node::setComment
#replaces: Cmd:opcomment
Sets the comment associated with this node.
See also `appendComment()`.

::`appendComment(self, comment)`:
#cppname: HOM_Node::appendComment
#replaces: Cmd:opcomment
Appends the given text to the comment associated with this node.

::`color(self)` -> [Hom:hou.Color]:


#cppname: HOM_Node::color
#replaces: Cmd:opcolor
Return the color of this node's tile in the network editor.

::`setColor(self, color)`:
#cppname: HOM_Node::setColor
#replaces: Cmd:opcolor
Sets the color of this node's tile in the network editor to the
given [Hom:hou.Color].

::`position(self)` -> [Hom:hou.Vector2]:


#cppname: HOM_Node::position
#replaces: Cmd:oplocate
Return the position of this node's tile in the network editor graph as
a `Vector2`. See also `move()` and `setPosition()`.

::`setPosition(self, vector2)`:
#cppname: HOM_Node::setPosition
#replaces: Cmd:oplocate
Sets the position of this node's tile in the network editor graph.
Raises [Hom:hou.InvalidInput] if the node cannot have the given position.
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (15 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

::`move(self, vector2)`:
#cppname: HOM_Node::move
#replaces: Cmd:oplocate
Moves this node's tile in the network editor graph by the increments in
the given [Hom:hou.Vector2].

To position a node absolutely, use `setPosition()`.

To get the node's current graph position, use `position()`.

Raises [Hom:hou.InvalidInput] if the node cannot move to the position


specified.

::`moveToGoodPosition(self, relative_to_inputs=True, move_inputs=True, move_outputs=True, move_unconnected=True)` -> [Hom:hou.Vector2]:


#cppname: HOM_Node::moveToGoodPosition
#replaces: Cmd:opautoplace
Moves a node to a well-spaced position near its inputs or outputs and
returns the new position of the node.

::`layoutChildren(self, child_nodes=(), horizontal_spacing=-1.0, vertical_spacing=-1.0)`:


#cppname: HOM_Node::layoutChildren
#replaces: Cmd:oplayout
Automatically position all or some children of this node in the network
editor.

child_nodes:
A sequence of child nodes to position. If this sequence is empty,
this method will reposition all children of this node.

horizontal_spacing:
A fraction of the width and height of a tile that affects the space
between nodes with common inputs. If this parameter is -1, Houdini
uses the default spacing.

vertical_spacing:
A fraction of the width and height of a tile that affects the space
between a node and its output nodes. If this parameter is -1, Houdini
uses the default spacing.

::`size(self)` -> [Hom:hou.Vector2]:


#cppname: HOM_Node::size
Return the size of this node's tile in the network editor graph as a
`Vector2`.

::`isHidden(self)`:
#cppname: HOM_Node::isHidden
#replaces: Cmd:opget, Exp:opflag
Return whether the node is hidden in the network editor. Note that Houdini
also uses the term "exposed" to refer to nodes that are not hidden.

If a visible node is connected to a hidden node, the network editor will


display dashed lines for the wire going from the visible node to the hidden
node.

See also [Hom:hou.Node#hide].

::`hide(self, on)`:
#cppname: HOM_Node::hide
#replaces: Cmd:opset
Hide or show a node in the network editor. See [Hom:hou.Node#isHidden]
for more information about hidden nodes.

::`cook(self, force=False, frame_range=())`:


#cppname: HOM_Node::cook
#replaces: Cmd:opcook
Asks or forces the node to re-cook.
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (16 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

frame_range:
The frames at which to cook the object. This should be a tuple of 2 or 3
ints giving the start frame, end frame, and optionally a frame
increment, in that order. If you supply a two-tuple `(start, end)`, the
increment is `1`.

::`errors(self)` -> `str`:


#cppname: HOM_Node::errors
Return the text of any errors from the last cook of this node,
or the empty string (`""`) if there were no errors.

::`warnings(self)` -> `str`:


#cppname: HOM_Node::warnings
Return the text of any warnings from the last cook of this node,
or the empty string (`""`) if there were no warnings.

::`networkBoxes(self)` -> tuple of [Hom:hou.NetworkBox]:


#cppname: HOM_Node::networkBoxes
#replaces: Cmd:nbls
Return a list of the network boxes inside this node.

::`findNetworkBox(self, name)` -> [Hom:hou.NetworkBox]:


#cppname: HOM_Node::findNetworkBox
#replaces: Cmd:nbls
Return a network box with the given name inside this node, or `None` if
no network box with the given name exists.

::`findNetworkBoxes(self, pattern)` -> `tuple` of [Hom:hou.NetworkBox]:


#cppname: HOM_Node::findNetworkBoxes
#replaces: Cmd:nbglob
Return a list of network boxes inside this node whose names match a
pattern.

::`createNetworkBox(self, name=None)` -> [Hom:hou.NetworkBox]:


#cppname: HOM_Node::createNetworkBox
#replaces: Cmd:nbadd
Creates a network box inside this network. Raises [Hom:hou.OperationFailed]
if this node is not a network.

If you don't specify a `name`, Houdini gives the box a default name.

::`copyNetworkBox(self, network_box_to_copy, new_name=None, channel_reference_original=False)` -> [Hom:hou.NetworkBox]:


#cppname: HOM_Node::copyNetworkBox
#replaces: Cmd:nbcp
Copies a network box and returns the copy.

If `new_name` is given, the network box will be copied to a new network box
named new_name (a different name will be generated if there is already a
network box with that name).

If `channel_reference_original` is `True`, all operators created by the copy


will have their animatable parameters set to reference the original
operators.

Raises [Hom:hou.OperationFailed] if this node is not a network or if the


node child type does not match the network box's node type.

::`addNodeGroup(self, name=None)` -> [Hom:hou.NodeGroup]:


#cppname: HOM_Node::addNodeGroup
#replaces: Cmd:opgadd
Add a node group to the node and return the new group.

If a group of the given name already exists then this function simply
returns the existing group without adding a new one. If the name of the
group is None or an empty string, then a unique default name is
automatically chosen.
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (17 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

This function can only be called on nodes that are networks. If it is called
on a node that is not a network, then it raises [Hom:hou.OperationFailed].

To remove a node group, use [Hom:hou.NodeGroup#destroy].

::`nodeGroup(self, name)` -> [Hom:hou.NodeGroup]:


#cppname: HOM_Node::nodeGroup
#replaces: Cmd:opgls
Return a node group contained by the node with the given name, or `None` if
the group does not exist.

::`nodeGroups(self)` -> tuple of [Hom:hou.NodeGroup]:


#cppname: HOM_Node::nodeGroups
#replaces: Cmd:opgls
Return the list of node groups in this node.

::`runInitScripts(self)`:
#cppname: HOM_Node::runInitScripts
Runs the initialization script associated with this node's type.

::`deleteScript(self)` -> `str`:


#cppname: HOM_Node::deleteScript
#replaces: Cmd:opdelscript
Return the script that will run when this node is deleted.

::`setDeleteScript(self, script_text, language=hou.scriptLanguage.Python)`:


#cppname: HOM_Node::setDeleteScript
Sets the script that will run when this node is deleted.

::`fileReferencePatterns(self, recurse=False, ignore_unused_subnet_branches=False)` -> tuple of Parm and file_name tuples:


#cppname: HOM_Node::fileReferencePatterns
#status: ni

::`fileReferences(self, recurse=False, ignore_unused_subnet_branches=False)` -> tuple of Parm and file_name tuples:


#cppname: HOM_Node::fileReferences
#replaces: Cmd:opextern
#status: ni

::`referencedNodes(self, max_hierarchy_depth=None)` -> tuple of Nodes:


#cppname: HOM_Node::referencedNodes
#replaces: Cmd:opdepend
#status: ni

::`info(self, verbose=False)` -> `str`:


#cppname: HOM_Node::info
#replaces: Cmd:opinfo
#status: ni

::`loadPresets(self, presets)`:
#cppname: HOM_Node::loadPresets
#replaces: Cmd:oppresetload
#status: ni

::`saveToGallery(self, presets_name, dir_name=None)` -> [Hom:hou.GalleryEntry]:


#cppname: HOM_Node::saveToGallery
#replaces: Cmd:oppresetsave
#status: ni

::`saveOldStylePresetsFile(self, presets_file_name)`:
#cppname: HOM_Node::saveOldStylePresetsFile
#replaces: Cmd:oppresetsavefile
#status: ni

::`loadOldStylePresetsFile(self, presets_file_name)`:
#cppname: HOM_Node::loadOldStylePresetsFile
#replaces: Cmd:oppresetloadfile
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (18 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

#status: ni

::`saveCompiledCookCodeToFile(self, file_name)`:
#cppname: HOM_Node::saveCompiledCookCodeToFile
Saves compiled VEX code to a disk file (on nodes that support this).

::`saveCookCodeToFile(self, file_name, skip_header=False)`:


#cppname: HOM_Node::saveCookCodeToFile
Saves VEX/RSL source code to a disk file (on nodes that support this).

::`sessionId(self)`:
#cppname: HOM_Node::sessionId
#replaces: Exp:opid
#status: nd

::`creationTime(self)` -> datetime.datetime:


#cppname: HOM_Node::creationTime
#replaces: Cmd:opstat
#status: ni

::`modificationTime(self)` -> datetime.datetime:


#cppname: HOM_Node::modificationTime
#replaces: Cmd:opstat
#status: ni

::`creator(self)` -> Node:


#cppname: HOM_Node::creator
#replaces: Cmd:opstat
#status: nd

::`creatorState(self)` -> `str`:


#cppname: HOM_Node::creatorState
#status: nd

::`setCreatorState(self, state)`:
#cppname: HOM_Node::setCreatorState
#status: nd

::`isBuiltExplicitly(self)` -> `bool`:


#cppname: HOM_Node::creator
Return whether this node was built explicitly (defaults to True). Most
nodes are built explicitly, but some are implicitly created by Houdini.
For example, if you select geometry from multiple SOPs and then perform
an operation, Houdini will put down an implicit merge SOP before performing
that operation. When reselecting geometry in SOPs, Houdini will
automatically delete any SOPs that were created implicitly.

::`setBuiltExplicitly(self, built_explicitly)`:
#cppname: HOM_Node::setBuiltExplicitly()
Set whether this node was built explicitly (default value is True). If
set to False, this node will not show up in various menus and in the
Network View pane's list mode. This flag is typically used for
intermediate utility nodes that one is unlikely to want to change its
parameters.

::`motionEffectsNetworkPath(self)` -> `str`:


#cppname: HOM_Node::motionEffectsNetworkPath
Return a node path representing the location for storing clips. This
location may or may not exist. To find or create such a network, use
[Hom:hou.Node#findOrCreateMotionEffectsNetwork].

::`findOrCreateMotionEffectsNetwork(self, create=True)` -> [Hom:hou.ChopNetNode]:


#cppname: HOM_Node::findOrCreateMotionEffectsNetwork
Return a CHOP network node suitable for storing Motion Effects. By
default, if the node doesn't exist, it will be created.

See also [Hom:hou.Parm#storeAsClip] and


http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (19 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

[Hom:hou.Node#motionEffectsNetworkPath].

::`stampValue(self, parm_name, default_value)`:


#cppname: HOM_Node::stampValue
#replaces: Exp:stamp, Exp:stamps
#status: ni

::`saveChildrenToFile(self, nodes, network_boxes, file_name)`:


#cppname: HOM_Node::saveChildrenToFile
#replaces: Cmd:opwrite
Given sequences of children nodes and network boxes, save a file containing
those items. You can load this file using
[Hom:hou.Node#loadChildrenFromFile].

nodes:
A sequence of [Hom:hou.Node]s that are children of this node.

network_boxes:
A sequence of [Hom:hou.NetworkBox]es that are contained in this node.
Note that the contents of the network boxes are not automatically
saved, so it is up to you to put them in the list of nodes.

file_name:
The name of the file to write the contents to. You can use any
extension for this file name.

Raises [Hom:hou.OperationFailed] if any of the nodes or network boxes


are node children of this node, or if the file could not be written to.
Raises [Hom:hou.PermissionError] if you do not have permission to read
the contents of this node.

::`loadChildrenFromFile(self, file_name)`:
#cppname: HOM_Node::loadChildrenFromFile
#replaces: Cmd:opread
Load the contents of a file saved with [Hom:hou.Node#saveChildrenToFile]
into the contents of this node.

Raises [Hom:hou.OperationFailed] if the file does not exist or it is not


the correct type of file. Raises [Hom:hou.PermissionError] if this
node is a locked instance of a digital asset.

::`asCode(self, brief=False, recurse=False, save_channels_only=False, save_creation_commands=False, save_keys_in_frames=False, save_outgoing_wires=False, save_parm_values_only=False, save_spare_parms=True, function_name=None)` -> `str`:
#cppname: HOM_Node::asCode
#replaces: Cmd:opscript
Prints the Python code necessary to recreate a node.

brief:
Do not set values if they are the parameter's default. Applies to the
contents of the node if either recurse or save_box_contents is True.

recurse:
Recursively apply to the entire operator hierarchy.

save_box_contents:
Script the contents of the node.

save_channels_only:
Only output channels. Applies to the contents of the node if either
recurse or save_box_contents is True.

save_creation_commands:
Generate a creation script for the node. If set to False (the
default), the generated script assumes that the network box already
exists. When set to True, the script will begin by creating the
network box.

save_keys_in_frames:
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (20 of 22) [12/7/2009 4:31:17 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

Output channel and key times in samples (frames) instead of seconds.


Applies to the contents of the node if either recurse or
save_box_contents is True.

save_parm_values_only:
Evaluate parameters, saving their values instead of the expressions.
Applies to the contents of the node if either recurse or
save_box_contents is True.

save_spare_parms:
Save spare parameters as well. When save_creation_commands is True,
commands for creating spare parameters will also be output. Applies to
the contents of the node if either recurse or save_box_contents is
True.

function_name:
If a function_name is specified, the output will be wrapped in a Python
function.

::`asXML(self, recurse=True, output_non_default_parms=True)`:


#cppname: HOM_Node::asXML
#replaces: Cmd:opscript
#status: ni

::`permissions(self)` -> `int`:


#cppname: HOM_Node::permissions
#replaces: Cmd:opstat
#status: ni

::`setPermissions(self, permissions)`:
#cppname: HOM_Node::setPermissions
#status: ni

::`addPermissions(self, permissions)`:
#cppname: HOM_Node::addPermissions
#replaces: Cmd:opchmod
#status: ni

::`removePermissions(self, permissions)`:
#cppname: HOM_Node::removePermissions
#status: ni

::`_getArgumentAutoComplete(self, method_name, arguments)` -> tuple of `str`:


#cppname: HOM_Node::_getArgumentAutoComplete
This method is used internally by Houdini to perform autocompletion in
the interactive Python shell.

::`__eq__(self, node)` -> `bool`:


#cppname: HOM_Node::operator==(HOM_Node*)
Implements `==` between `Node` objects.

For example, hou.root() == hou.node("/") will return `True`.

There can be multiple Python `Node` objects for the same Houdini node.
Two identical calls to `hou.node()` will return different Python `Node`
objects, with each representing the same Houdini node. Comparing these nodes
using `==` (which calls `__eq__`) will return `True`, while comparing them
using `is` (the object identity test) will return false.

You can compare a node to `None`. This behavior is useful because


`hou.node()` returns `None` if the node doesn't exist. Comparing an node
to anything other than another node or `None` raises `TypeError`.

::`__ne__(self, node)` -> `bool`:


#cppname: HOM_Node::operator!=(HOM_Node*)
Implements `!=` between `Node` objects. See `__eq__()`.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (21 of 22) [12/7/2009 4:31:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Node

http://www.sidefx.com/docs/houdini10.0/hom/hou/Node (22 of 22) [12/7/2009 4:31:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeConnection

= hou.NodeConnection =
#type: homclass
#cppname: HOM_NodeConnection
#category: Nodes

"""Represents a connection (wire) between two Nodes."""

Each node has zero or more input connectors and zero or more output connectors.
These connectors are numbered starting from zero, and they act as receptacles
for connections. A connection goes from a particular connector in an output
node to a particular connector in an input node.

Note that some nodes, like the merge SOP, appear to have a single input
connector that can have multiple connections going into it. Internally,
however, there are many input connectors that are simply displayed as one in
the network editor, and each input connector has at most one input. For
these special connectors, it is not possible to have gaps in the inputs
(for example, it is not possible for the first and third connector of
a merge SOP to be connected and the second to be disconnected). In the
general case, however, whether or not a connector is connected is independent
of the other connectors.

Because input connectors may be unconnected, it is not possible to use


[Hom:hou.Node#inputs] to determine which input a node is connected to.
Instead, use [Hom:hou.Node#inputConnections]. See also
[Hom:hou.Node#inputConnectors].

An output connector may have multiple connections coming out of it. Most
nodes have only one output connector. However, some nodes, like the
split DOP, do have multiple output connectors. See also
[Hom:hou.Node#outputs], [Hom:hou.Node#outputConnections], and
[Hom:hou.Node#outputConnectors].

@methods

::`outputNode(self)` -> [Hom:hou.Node]:


#cppname: HOM_NodeConnection::outputNode
A connection goes from an output node into an input node. Return the
output node.

::`outputIndex(self)` -> `int`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeConnection (1 of 2) [12/7/2009 4:31:18 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeConnection

#cppname: HOM_NodeConnection::outputIndex
A connection goes from an output node into an input node. Return the
index of the connector on the output node.

See the class documentation for more information.

::`inputNode(self)` -> [Hom:hou.Node]:


#cppname: HOM_NodeConnection::inputNode
A connection goes from an output node into an input node. Return the
input node.

::`inputIndex(self)` -> `int`:


#cppname: HOM_NodeConnection::inputIndex
A connection goes from an output node into an input node. Return the
index of the connector on the input node.

See the class documentation for more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeConnection (2 of 2) [12/7/2009 4:31:18 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType

= hou.NodeType =
#type: homclass
#cppname: HOM_NodeType
#category: Nodes

"""A NodeType specifies the information common to all instances of a type


of node, such as the parameter set, algorithm, minimum number of inputs, etc.
For example, the geometry object and subdivide SOP are node types. `/obj/geo1`
and `/obj/geo2`, on the other hand, are Nodes that are instances of the
geometry object node type."""

Note that a digital asset defines a node type. The nodes contained inside the
asset's definition implement the node type's algorithm, and you can customize
the parameters in the node type using the __Type Properties__ dialog,

You can get a NodeType object from a Node object with [Hom:hou.Node#type].
For example, if `/obj/geo1` is a geometry object,
`hou.node("/obj/geo1").type()` will return the NodeType corresponding to all
geometry objects.

All the node types in Houdini are organized into categories, and a node type is
uniquely identified by its category and node type name. For example, objects,
SOPs, POPs, etc. are node type categories. You can also access a NodeType
object from a category with [Hom:hou.NodeTypeCategory#nodeTypes]. Similarly,
you can call [Hom:hou.nodeType_] with the category and node type name.

See also [Hom:hou.Node] and [Hom:hou.NodeTypeCategory].

@methods

::`name(self)` -> `str`:


#cppname: HOM_NodeType::name
#replaces: Cmd:optype, Exp:optypeinfo
Return the name of this node type. For example, for the geometry
object type, the name is "geo". The name and the node type category
together uniquely identify a node type.

::`nameWithCategory(self)` -> `str`:


#cppname: HOM_NodeType::nameWithCategory
Return the name of the node type, prefixed with the name of the node
type category. For example, for the geometry object, this function
returns `"Object/geo"`. The category name and type name together

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType (1 of 6) [12/7/2009 4:31:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType

uniquely identify a node type.

{{{
#!pycon
>>> hou.nodeType(hou.objNodeTypeCategory(), "geo").nameWithCategory()
'Object/geo'
}}}

::`description(self)` -> `str`:


#cppname: HOM_NodeType::description
#replaces: Cmd:optype, Exp:optypeinfo
Return the description of this node type that appears in the tab menu.
For example, for the geometry object, the description is `"Geometry"`.
This description is also called the operator label in Houdini.

::`instances(self)` -> `tuple` of [Hom:hou.Node]:


#cppname: HOM_NodeType::instances
#replaces: Cmd:opstat, Cmd:otinuse
Return a tuple of all the nodes of this type in the current scene.

::`category(self)` -> [Hom:hou.NodeTypeCategory]:


#cppname: HOM_NodeType::category
#replaces: Exp:optypeinfo
Return the node type category for this node type. For example, for
the geometry object, the result is the object returned by
[Hom:hou.objNodeTypeCategory].

::`parmTemplates(self)` -> `tuple` of [Hom:hou.ParmTemplate]:


#cppname: HOM_NodeType::parmTemplates
Return a tuple of parm templates for the parameters on this node type.
Note that spare parameters on individual node instances are not included
in this tuple, since they are independent from the node type.

::`definition(self)` -> [Hom:hou.HDADefinition]:


#cppname: HOM_NodeType::definition
#replaces: Cmd:otgetotl
If this node type corresponds to a digital asset, return the
[Hom:hou.HDADefinition]. Otherwise, return None.

::`allInstalledDefinitions(self)` -> `tuple` of [Hom:hou.HDADefinition]:


#cppname: HOM_NodeType::allInstalledDefinitions
#replaces: Cmd:otls
Search all installed operator type libraries and return a tuple of

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType (2 of 6) [12/7/2009 4:31:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType

available [Hom:hou.HDADefinition] objects providing definitions for


this node type.

Houdini allows multiple otl files to be loaded at the same time that each
contain definitions for the same node type. The definition in use is
called the current definition. See also [Hom:hou.HDADefinition#isCurrent].

::`hdaModule(self)` -> [Hom:hou.HDAModule]:


#cppname: HOM_NodeType::hdaModule
Return the HDAModule object for this node type. If the type is not
for a digital asset, the module is empty. Otherwise, the module contains
the functions, constants, classes, etc. in the user-defined "PythonModule"
section of the digital asset.

You can use [Hom:hou.Node#hdaModule] as a shortcut to access the HDAModule


from a node instance.

See [Hom:hou.HDAModule] for more information.

::`aliases(self)` -> `tuple` of `str`:


#cppname: HOM_NodeType::aliases
#replaces: Cmd:opalias
Return all current aliases for this node type. See
[Hom:hou.NodeType#addAlias] for an example.

::`addAlias(self, alias)`:
#cppname: HOM_NodeType::addAlias
#replaces: Cmd:opalias
Add an alias for this node type. You can use this alias when creating
new nodes.

{{{
#!pycon
>>> geo_type = hou.nodeType(hou.objNodeTypeCategory(), "geo")
>>> geo_type.addAlias("transformable")
>>> geo_type.aliases()
('transformable',)
>>> hou.node("/obj").createNode("transformable")
<hou.ObjNode of type geo at /obj/geo1>
}}}

::`removeAlias(self, alias)`:
#cppname: HOM_NodeType::removeAlias

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType (3 of 6) [12/7/2009 4:31:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType

#replaces: Cmd:opalias
Remove an alias for this node type.

::`hidden(self)` -> bool:


#cppname: HOM_NodeType::hidden
Return whether or not this node type appears in the tab menu. See also
[Hom:hou.NodeType#setHidden].

::`setHidden(self, hidden)`:
#cppname: HOM_NodeType::setHidden
#replaces: Cmd:opexclude
Set whether or not this node type appears in the tab menu. See also
[Hom:hou.NodeType#hidden].

::`minNumInputs(self)` -> `int`:


#cppname: HOM_NodeType::minNumInputs
Return the minimum number of inputs that nodes of this type can have. If
these inputs are not connected, the node will generate an error.

::`maxNumInputs(self)` -> `int`:


#cppname: HOM_NodeType::maxNumInputs
Return the maximum number of inputs that nodes of this type can have.
Return 9999 if this node type can accept an unlimited number of inputs
(e.g. the merge SOP).

::`maxNumOutputs(self)` -> `int`:


#cppname: HOM_NodeType::maxNumOutputs
Return the maximum number of outputs that nodes of this type can have.
Most node types have only one output, but some, like the split dop, can
have multiple.

::`hasUnorderedInputs(self)` -> `bool`:


#cppname: HOM_NodeType::hasUnorderedInputs
Return whether it is impossible for this node type to have gaps in its
connected inputs. For example, the cookie SOP has two inputs, and it's
possible for only the second input to be connected, so this method would
return False. However, the merge SOP cannot have any gaps in its inputs,
so this method would return True.

See also [Hom:hou.Node#inputs], [Hom:hou.Node#inputConnections], and


[Hom:hou.Node#inputConnectors].

::`isGenerator(self)` -> `bool`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType (4 of 6) [12/7/2009 4:31:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType

#cppname: HOM_NodeType::isGenerator
Return if this node type has been flagged as a generator. For example,
a grid SOP generates new geometry, while a subdivide SOP does not, and
instead processes the geometry passed into it. See also
[Hom:hou.NodeType#minNumInputs].

::`isManager(self)` -> `bool`:


#cppname: HOM_NodeType::isManager
Return whether this NodeType is a manager. The manager node instances are
`/obj`, `/out`, `/part`, `/ch`, `/shop`, `/img`, and `/vex`, as well as
manager nodes like SHOP networks.

::`icon(self)` -> `str`:


#cppname: HOM_NodeType::icon
Return the name or path of the icon for this node type. Note that node
types that ship with Houdini use a name instead of a full path, and
Houdini uses its search path to locate the icon with that name.

::`source(self)` -> [Hom:hou.nodeTypeSource] enum value:


#cppname: HOM_NodeType::source
#replaces: Cmd:dsoinfo
Return a [Hom:hou.nodeTypeSource] enumerated value to indicate if this
node type is implemented in VEX, RSL, or the HDK (in C++), or if it is
a built-in node type that ships with Houdini.

{{{
#!pycon
>>> obj_cat = hou.objNodeTypeCategory()
>>> sop_cat = hou.sopNodeTypeCategory()
>>> hou.nodeType(obj_cat, "biped_auto_rig").source()
nodeTypeSource.Subnet
>>> hou.nodeType(sop_cat, "mountain").source()
nodeTypeSource.VexCode
}}}

::`sourcePath(self)` -> `str`:


#cppname: HOM_NodeType::sourcePath
#replaces: Cmd:dsoinfo
Return the path to the source for this node type, or `"Internal"` if it
is a built-in node type. If the node was created using the HDK, return
the path to the shared object/dll for the node type.

{{{

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType (5 of 6) [12/7/2009 4:31:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType

#!pycon
>>> obj_cat = hou.objNodeTypeCategory()
>>> hou.nodeType(obj_cat, "biped_auto_rig").sourcePath()
'oplib:/Object/biped_auto_rig?Object/biped_auto_rig'
>>> hou.nodeType(obj_cat, "geo").sourcePath()
'Internal'
}}}

::`sourceNetwork(self)` -> [Hom:hou.Node] or `None`:


#cppname: HOM_NodeType::sourceNetwork
If this node type is a digital asset, return the Node instance whose
contents define the digital asset. Otherwise, return None.

::`uninstallFromPath(self)`:
#cppname: HOM_NodeType::destroy
#replaces: Cmd:optypeuninstall
Remove this node and any references to it from a particular filesystem
installation path. For example, this method will remove vex files, icons,
dialog scripts, help cards, etc. for custom installed old-style non-otl
node types.

If you call this method on built-in node types, it will have no effect.

{{{
#!python
node_type.uninstallFromPath(hou.homeHoudiniDirectory())
}}}

See also [Hom:hou.hda#uninstallFile] and [Hom:hou.HDADefinition#destroy].

http://www.sidefx.com/docs/houdini10.0/hom/hou/NodeType (6 of 6) [12/7/2009 4:31:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PopNetNode

= hou.PopNetNode =
#type: homclass
#cppname: HOM_PopNetNode
#superclass: hou.Node
#category: Nodes
#status: nd

@methods

::`displayNode(self)` -> Node:


#cppname: HOM_PopNetNode::displayNode
#status: nd

::`renderNode(self)` -> Node:


#cppname: HOM_PopNetNode::renderNode
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/PopNetNode [12/7/2009 4:31:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PopNode

= hou.PopNode =
#type: homclass
#cppname: HOM_PopNode
#superclass: hou.Node
#category: Nodes

"""Represents a particle node."""

@methods

::`bypass(self, on)`:
#cppname: HOM_PopNode::bypass

Turns this node's bypass flag on or off, making this node have no effect.

::`curPoint(self)` -> [Hom:hou.Point]:


#cppname: HOM_PopNode::curPoint

Returns the current point, equivalent to the `$PT` local variable.


This function only works on a node that has a `$PT` local variable, and
only when the node is being cooked.

::`displayNode(self)` -> Node:


#cppname: HOM_PopNode::displayNode
#status: nd

::`eventTime(self, event_name)`:
#cppname: HOM_PopNode::eventTime
#status: ni

::`geometry(self)` -> Geometry:


#cppname: HOM_PopNode::geometry
#status: ni

::`isBypassed(self)` -> `bool`:


#cppname: HOM_PopNode::isBypassed

Returns whether this node's bypass flag is on.

::`isDisplayFlagSet(self)` -> `bool`:


#cppname: HOM_PopNode::isDisplayFlagSet

http://www.sidefx.com/docs/houdini10.0/hom/hou/PopNode (1 of 3) [12/7/2009 4:31:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PopNode

Returns whether this node's display flag is on.

::`isEventOccurring(self, event_name)` -> bool:


#cppname: HOM_PopNode::isEventOccurring
#status: ni

::`isRenderFlagSet(self)` -> `bool`:


#cppname: HOM_PopNode::isRenderFlagSet

Returns whether this node's render flag is on.

::`isTemplateFlagSet(self)` -> `bool`:


#cppname: HOM_PopNode::isTemplateFlagSet

Returns whether the template flag on this node is on.

::`renderNode(self)` -> Node:


#cppname: HOM_PopNode::renderNode
#status: nd

::`setDisplayFlag(self, on)`:
#cppname: HOM_PopNode::setDisplayFlag

Turn this node's display flag on or off.

::`setRenderFlag(self, on)`:
#cppname: HOM_PopNode::setRenderFlag

Turns this node's render flag on or off.

::`setTemplateFlag(self, on)`:
#cppname: HOM_PopNode::setTemplateFlag

Sets this node's template flag on or off.

@replaces

- [Cmd:opget]
- [Cmd:opset]
- [Exp:opflag]
- [Exp:popevent]
- [Exp:popeventtime]
- [Exp:poppoint]

http://www.sidefx.com/docs/houdini10.0/hom/hou/PopNode (2 of 3) [12/7/2009 4:31:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PopNode

- [Exp:poppointid]
- [Exp:poppointnum]

http://www.sidefx.com/docs/houdini10.0/hom/hou/PopNode (3 of 3) [12/7/2009 4:31:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNodeType

= hou.SopNodeType =
#type: homclass
#cppname: HOM_SopNodeType
#superclass: hou.NodeType
#category: Nodes

"""This kind of NodeType contains extra attributes specific to SOP nodes."""

@methods

::`selectors(self, selector_indices=())` -> `tuple` of [Hom:hou.Selector]:


#cppname: HOM_SopNodeType::selectors
#replaces: Cmd:omsbindinfo, Cmd:omsls, Cmd:omswhere
Return all the selectors for this node type. See
[Hom:hou.SopNodeType#addSelector] and [Hom:hou.Selector] for more
information.

{{{
#!python
def sopSelectorTypes():
'''Return a list of all the SOP selector type names.'''
selector_types = []
for node_type in hou.sopNodeTypeCategory().nodeTypes().values():
# Skip manager nodes, like shopnets, ropnets, etc.
if not isinstance(node_type, hou.SopNodeType):
continue

for selector in node_type.selectors():


selector_type = selector.selectorType()
if selector_type not in selector_types:
selector_types.append(selector_type)
selector_types.sort()
return selector_types
}}}

{{{
#!python
def sopTypeNamesUsingSelector(selector_type):
'''Given the name of a selector type, return a list of all the SOP
node types using that selector.'''
node_types = []
for node_type in hou.sopNodeTypeCategory().nodeTypes().values():
# Skip manager nodes, like shopnets, ropnets, etc.
if not isinstance(node_type, hou.SopNodeType):
continue

for selector in node_type.selectors():


if selector.selectorType() == selector_type:
node_types.append(node_type)

result = [node_type.name() for node_type in node_types]


result.sort()
return result
}}}

::`addSelector(self, name, selector_type, prompt='Select components', primitive_types=(), group_parm_name=None, group_type_parm_name=None, input_index=0, input_required=True, allow_dragging=False, empty_string_selects_all=True)` -> [Hom:hou.Selector]:
#cppname: HOM_SopNodeType::addSelector
#replaces: Cmd:omsbind
Add a selector to this SOP node type. When the user creates a new instance
of this SOP in the viewer, Houdini will invoke all the selectors, wait
for the user to select geometry, and then connect input SOPs and fill in
group parameters to match what was selected.

`name`:
A name to give this selector. The name must be unique within this
node type.

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNodeType (1 of 3) [12/7/2009 4:31:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNodeType

`selector_type`:
The name of the type of selector to use. Different selectors have
different behaviours. For example "prims" will select only primitives
and is used, for example, by the cookie SOP. "points" will select
only points, and is used by SOPs like the point SOP. "everything"
will select any geometry, and is used for SOPs like "xform" and
"blast".

`prompt`:
A string to display at the bottom of the viewer to instruct the user
what to select.

`primitive_types`:
A sequence of [Hom:hou.primType] enumeration values to specify what
primitive types are allowed. This parameter has no effect if the
selector does not select primitives. If this sequence is empty, all
primitive types will be allowed.

`group_parm_name`:
The name of the SOP node parameter containing the group field.
The selector will set this parameter to the string representing the
points, primitives, edges, etc. chosed by the user in the viewer.
If None, the selector will look for a parameter named "group".

`group_type_parm_name`:
The name of the SOP node parameter containing the menu of geometry
types. If the selector can select multiple geometry types (e.g.
points or primitives), it will set this parameter to match the type
of geometry the user chose. The transform SOP, for example, has
a Group Type parameter that tells it how to interpret the string in
the Group parameter. If None, the selector will look for a parameter
named "grouptype".

`input_index`:
The index of the input connector on the SOP node where the selector
should wire input SOPs. A cookie SOP, for example, has two input
connectors. It has two selectors, one for each input connector.

`input_required`:
Whether or not this input is required or optional. If the user does
not select any geometry and the input is not required, the selector
will not wire anything to its input connector.

`allow_dragging`:
Whether the user is allowed to select the geometry and begin
manipulating the handles with a single mouse drag. A transform SOP,
for example, lets you select the geometry and drag it right away
to transform it. Dragging the geometry forces the selector to finish
immediately, the selector connects the input and sets the group
parameter, and subsequent mouse movements are passed to the handle
which translates the geometry by changing parameter values.

`empty_string_selects_all`:
Whether or not to use an empty string in the group parameter if the
user selects all the geometry. If False, Houdini will place an
asterisk (`*`) in the group parameter when the user selects all the
geometry. Most SOPs use an empty string.

You would typically call this method from the On Loaded event handler
of a digital asset. For example, you might put the following in the
On Loaded section of a Python sop that transforms points:

{{{
#!python
kwargs['type'].addSelector("Points to Transform", "points",
prompt="Select the points to transform and press Enter to complete")

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNodeType (2 of 3) [12/7/2009 4:31:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNodeType

}}}

See also [Hom:hou.Geometry#globPoints] and [Hom:hou.Geometry#globPrims]


for information on how to parse the strings the selector puts in the
group field.

See also [Hom:hou.Selector].

http://www.sidefx.com/docs/houdini10.0/hom/hou/SopNodeType (3 of 3) [12/7/2009 4:31:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SubnetIndirectInput

= hou.SubnetIndirectInput =
#type: homclass
#cppname: HOM_SubnetIndirectInput
#category: Nodes

"""A node-like square that appears inside subnets and corresponds to the
node wired into the subnet."""

For example, suppose you have a font SOP, polyextrude SOP, and facet SOP
connected together in a chain. If you collapse the polyextrude and facet
SOPs into a subnet, you're left with a font SOP connected to a subnet SOP.
Inside the subnet SOP is subnet indirect input #1 connected to a polyextrude
SOP, which is connected to the facet SOP.

Each subnet indirect input is numbered starting from 1 and corresponds to


an input connector on the subnet. (See [Hom:hou.NodeConnection] for more
information on input connectors.)

The names of the subnet indirect inputs in the network pane correspond to
the contents of the `Input #n Label` parameters on the subnet node, where
`n` is the number.

@methods

::`number(self)` -> `int`:


#cppname: HOM_SubnetIndirectInput::number
Return the number of the corresponding input connector on the subnet.
Note that the first input corresponds to the number 1, not 0.

::`parent(self)` -> [Hom:hou.Node]:


#cppname: HOM_SubnetIndirectInput::parent
Return the subnet node containing this indirect input. Nodes inside the
subnet and this object share the same parent node.

http://www.sidefx.com/docs/houdini10.0/hom/hou/SubnetIndirectInput [12/7/2009 4:31:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/VopNetNode

= hou.VopNetNode =
#type: homclass
#cppname: HOM_VopNetNode
#superclass: hou.Node
#category: Nodes
#status: nd

@methods

::`definedType(self)` -> NodeType:


#cppname: HOM_VopNetNode::definedType
#status: nd

::`shaderType(self) -> hou.shaderType enum value or None`:


#cppname: HOM_VopNetNode::shaderType
#status: nd

::`vexContext(self) -> VexContext`:


#cppname: HOM_VopNetNode::vexContext
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/VopNetNode [12/7/2009 4:31:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/cd

= hou.cd =

#type: homfunction
#cppname: hom::cd
#category: Nodes

"""Change the current node. Houdini has one current node, analogous to a
current directory in a file system. If a relative path is given, it is
relative to the node returned by hou.pwd()."""

@usage
`cd(path)`

If no node exists at the path, this function raises hou.OperationFailed.

Even though, when called from a parameter's expression, hou.pwd()


returns the node containing the parameter and not Houdini's current
node, hou.cd() will always change the current node.

This function will raise hou.NotAvailable if you call it from mplay.

@related

- [Hom:hou.pwd]
- [Hom:hou.setPwd]

@replaces

- [Cmd:opcf]

http://www.sidefx.com/docs/houdini10.0/hom/hou/cd [12/7/2009 4:31:23 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/copyNodesTo

= hou.copyNodesTo =

#type: homfunction
#cppname: hom::copyNodesTo
#category: Nodes

"""Copy all given nodes to a new place in node hierarchy."""

@usage
`copyNodesTo(nodes, destination_node) -> tuple of Nodes`

The nodes to be copied should be a sequence of hou.Node objects. The


destination node will be the parent of new copied nodes. The type of all
source nodes should match the destination node child type.

This function returns a tuple of hou.Node objects corresponding to the


copied nodes.

Nodes will be copied to the destination in batches based on their


parent. All the nodes in a batch will be copied at the same time. This
way, any relative channel references between nodes with the same parent
will be updated to reflect the copied node location. Batches themselves
will be copied sequentially. Thus, channel references between nodes with
different parents will not be updated in copies.

For every copied node, if a node with the same name already exists at
the destination, the copy will be renamed. Any relative channel
references to the copy will be updated with the new copy name.

This function will raise a hou.OperationFailed exception if any of the


nodes to be copied are of invalid type, the destination node cannot be
copied into, or source node type does not match the destination node
child type.

This function will raise hou.ObjectWasDeleted if any of source nodes or


the destination node no longer exist in Houdini.

All of the above issues with source and destination nodes will be
reported before copying starts to avoid partial copy.

After the function finishes execution, all the new nodes created by it
will be selected.

http://www.sidefx.com/docs/houdini10.0/hom/hou/copyNodesTo (1 of 2) [12/7/2009 4:31:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/copyNodesTo

@replaces
- [Cmd:opcp]

http://www.sidefx.com/docs/houdini10.0/hom/hou/copyNodesTo (2 of 2) [12/7/2009 4:31:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/copyNodesToClipboard

= hou.copyNodesToClipboard =

#type: homfunction
#cppname: hom::copyNodesToClipboard
#category: Nodes
#status: ni

@usage
`copyNodesToClipboard(nodes, include_network_boxes=False)`

@replaces
- [Cmd:opcopy]

http://www.sidefx.com/docs/houdini10.0/hom/hou/copyNodesToClipboard [12/7/2009 4:31:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/currentSimulation

= hou.currentSimulation =

#type: homfunction
#cppname: hom::currentSimulation
#category: Nodes
#status: nd

@usage
`currentSimulation()` -> DopNetNode or None

http://www.sidefx.com/docs/houdini10.0/hom/hou/currentSimulation [12/7/2009 4:31:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/filterNodesByType

= hou.filterNodesByType =

#type: homfunction
#cppname: hom::filterNodesByType
#category: Nodes
#status: ni

@usage
`filterNodesByType(node_list, node_type_filter)` -> tuple of Nodes

http://www.sidefx.com/docs/houdini10.0/hom/hou/filterNodesByType [12/7/2009 4:31:25 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/layoutNodes

= hou.layoutNodes =

#type: homfunction
#cppname: hom::layoutNodes
#category: Nodes
#status: ni

@usage
`layoutNodes(nodes, direction=TopToBottom, sibling_space_fraction=None, level_space_fraction=None, order=None)`

http://www.sidefx.com/docs/houdini10.0/hom/hou/layoutNodes [12/7/2009 4:31:25 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/moveNodesTo

= hou.moveNodesTo =

#type: homfunction
#cppname: hom::moveNodesTo
#category: Nodes

"""Move all given nodes to a new place in node hierarchy."""

@usage
`moveNodesTo(nodes, destination_node) -> tuple of Nodes`

The nodes to be moved should be a sequence of hou.Node objects. The


destination node will be the parent of new copied nodes. The type of all
source nodes should match the destination node child type.

This function returns a tuple of hou.Node objects corresponding to the


nodes at their new locations. If you attempt to access the original
hou.Node objects in the sequence you passed into this function, you will
receive hou.ObjectWasDeleted exceptions.

For every moved node, if a node with the same name already exists at the
destination, the node will be renamed to a unique name.

This function will raise a hou.OperationFailed exception if any of the


nodes to be moved are of invalid type, the destination node cannot be
copied into, or source node type does not match the destination node's
child type.

This function will raise hou.ObjectWasDeleted if any of source nodes or


the destination node no longer exist in Houdini.

All of the above issues with source and destination nodes will be
reported before moving starts to avoid a partial move.

After the function finishes execution, all the moved nodes by it will be
selected.

http://www.sidefx.com/docs/houdini10.0/hom/hou/moveNodesTo [12/7/2009 4:31:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/node_

= hou.node =
#type: homfunction
#cppname: hom::node
#category: Nodes

"""Given a path string, return a Node object. Return None if the path does not
refer to a node."""

@usage
`node(path)` -> [Hom:hou.Node] or `None`

If the path starts with a `/`, Houdini will look for a node with that exact
path. Otherwise, the Houdini searches relative to the current path.
See [Hom:hou.pwd] for more information about Houdini's current path. For each
occurrence of `..` in the path, Houdini will move up one node from the current
location.

Raises [Hom:hou.NotAvailable] if you call it from MPlay.

Be careful not to confuse this function with the class [Hom:hou.Node].

{{{
#!pycon
>>> hou.node("/obj")
<hou.Node at /obj>
>>> hou.node("/obj").createNode("geo")
<hou.ObjNode of type geo at /obj/geo1>
>>> hou.node("/obj").createNode("geo")
<hou.ObjNode of type geo at /obj/geo2>
>>> hou.node("/obj/geo1")
<hou.ObjNode of type geo at /obj/geo1>
>>> hou.cd("/obj")
>>> hou.node("geo1")
<hou.ObjNode of type geo at /obj/geo1>
>>> hou.cd("/obj/geo2")
>>> hou.node("../geo1")
<hou.ObjNode of type geo at /obj/geo1>
>>> print hou.node("../geo3")
None
}}}

@replaces

http://www.sidefx.com/docs/houdini10.0/hom/hou/node_ (1 of 2) [12/7/2009 4:31:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/node_

- [Cmd:opfind]
- [Exp:ch]
- [Exp:chs]
- [Exp:chsop]
- [Exp:opexist]

http://www.sidefx.com/docs/houdini10.0/hom/hou/node_ (2 of 2) [12/7/2009 4:31:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeType_

= hou.nodeType =
#type: homfunction
#cppname: hom::nodeType
#category: Nodes

"""Given a node type category object and a name, return the corresponding
NodeType object. Return None if there is no such type with that name."""

@usage

`nodeType(category, name)` -> NodeType or None

@arguments

category:
A [Hom:hou.NodeTypeCategory] object (_not_ a string).
You can use the `hou.nodeTypeCategories()` function to get a dict
of category name strings to `NodeTypeCategory` objects. You can also
use the helper functions [Hom:hou.sopNodeTypeCategory],
[Hom:hou.objNodeTypeCategory], etc.

name:
The internal name of a node type. To get the internal name of any
node type in Houdini, right-click a node of that type and choose
__Type properties__. The internal name is listed at the top of the
type properties window beside *Operator type*. For example, the
internal name of the Geometry object is `geo`.

@examples

{{{
#!pycon
# The following three ways of looking up the copy SOP's node type are equivalent:
>>> hou.nodeType(hou.sopNodeTypeCategory(), "copy")
<hou.SopNodeType for Sop copy>

>>> hou.sopNodeTypeCategory().nodeTypes()["copy"]
<hou.SopNodeType for Sop copy>

>>> hou.nodeType(hou.sopNodeTypeCategories()["Sop"], "copy")


<hou.SopNodeType for Sop copy>
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeType_ (1 of 2) [12/7/2009 4:31:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeType_

@replaces

- [Cmd:optype]
- [Exp:optype]
- [Exp:optypeinfo]

@related

- [Hom:hou.NodeType]
- [Hom:hou.NodeTypeCategory]
- [Hom:hou.NodeTypeCategory#nodeTypes]
- [Hom:hou.nodeTypeCategories]

http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeType_ (2 of 2) [12/7/2009 4:31:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeTypeSource

= hou.nodeTypeSource =
#type: hommodule
#cppname: HOM_nodeTypeSource
#category: Nodes
#status: nd

"""Enumeration of node type sources."""

* hou.nodeTypeSource.Internal
* hou.nodeTypeSource.CompiledCode
* hou.nodeTypeSource.VexCode
* hou.nodeTypeSource.RslCode
* hou.nodeTypeSource.Subnet

http://www.sidefx.com/docs/houdini10.0/hom/hou/nodeTypeSource [12/7/2009 4:31:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/pasteNodesFromClipboard

= hou.pasteNodesFromClipboard =

#type: homfunction
#cppname: hom::pasteNodesFromClipboard
#category: Nodes
#status: ni

@usage
`pasteNodesFromClipboard(target_network)`

@replaces
- [Cmd:oppaste]

http://www.sidefx.com/docs/houdini10.0/hom/hou/pasteNodesFromClipboard [12/7/2009 4:31:28 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/perms

= hou.perms =
#type: hommodule
#cppname: HOM_perms
#category: Nodes
#status: ni

"""Enumeration of permission flag combinations."""

* hou.perms.UR=0
* hou.perms.UW=1
* hou.perms.UX=2
* hou.perms.GR=4
* hou.perms.GW=8
* hou.perms.GX=16
* hou.perms.OX=32
* hou.perms.OR=64
* hou.perms.OW=128
* hou.perms.AR=UR+GR+OR
* hou.perms.AW=UW+GW+OW
* hou.perms.AX=UX+GX+OX
* hou.perms.URW=UR+UW
* hou.perms.URX=UR+UX
* hou.perms.UWX=UW+UX
* hou.perms.URWX=UR+UW+UX
* hou.perms.GRW=GR+GW
* hou.perms.GRX=GR+GX
* hou.perms.GWX=GW+GX
* hou.perms.GRWX=GR+GW+GX
* hou.perms.ARW=AR+AW
* hou.perms.ARX=AR+AX
* hou.perms.AWX=AW+AX
* hou.perms.ARWX=AR+AW+AX

http://www.sidefx.com/docs/houdini10.0/hom/hou/perms [12/7/2009 4:31:28 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/pwd

= hou.pwd =
#type: homfunction
#cppname: hom::pwd
#category: Nodes

"""If called from an evaluating parm, return the node containing the parm.
Otherwise, return Houdini's global current node. You can change this current
node with `hou.cd`"""

@usage
`pwd()` -> Node

Note that Python and hscript both share the same global current node. So,
if you change that node in hscript, the return value of pwd() will reflect
that change, and vice versa.

Note that if this function is called from an expression inside a node's


parameter, Houdini will return the node containing the expression, not
Houdini's current node. This behavior permits relative parameter and
node references from both Hscript and Python parameter expressions, since
functions like [Hom:hou.ch], [Exp:ch], [Hom:hou.evalParm], [Hom:hou.parm_],
and [Hom:hou.node_] are relative to the result of `hou.pwd()`.

This function will raise hou.NotAvailable if you call it from mplay.

@related
- [Hom:hou.cd]

@replaces
- [Cmd:oppwf]
- [Exp:oppwf]
- [Exp:oppwd]
- [Exp:opfullpath]

http://www.sidefx.com/docs/houdini10.0/hom/hou/pwd [12/7/2009 4:31:28 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/root

= hou.root =

#type: homfunction
#cppname: hom::root
#category: Nodes

"""Return the root node (i.e. /)."""

@usage
`root()` -> Node

This function will raise hou.NotAvailable if you call it from mplay.

@related

- [Hom:hou.node]

http://www.sidefx.com/docs/houdini10.0/hom/hou/root [12/7/2009 4:31:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/selectedNodes

= hou.selectedNodes =

#type: homfunction
#cppname: hom::selectedNodes
#category: Nodes

"""Return a list of all selected nodes."""

usage>>
`selectedNodes(include_hidden=False)` -> `tuple` of [Hom:hou.Node]

If `include_hidden` is False, hidden nodes will not in the result, even if


they are selected. See [Hom:hou.Node#isHidden] for more information about
hidden nodes.

The last selected node (i.e. the last node in the return value) has special
meaning to Houdini, and unpinned panes in Houdini follow this node.

The following example will print the names of all selected nodes:
{{{
#!python
for n in hou.selectedNodes():
print n.name()
}}}

{{{
#!python
def lastSelectedNode():
'''Return the last selected node, or None if there isn't one.'''
selected_nodes = hou.selectedNodes()
return (selected_nodes[-1] if len(selected_nodes) > 0 else None)
}}}

@replaces
- [Exp:opselectrecurse]

http://www.sidefx.com/docs/houdini10.0/hom/hou/selectedNodes [12/7/2009 4:31:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setCurrentSimulation

= hou.setCurrentSimulation =

#type: homfunction
#cppname: hom::setCurrentSimulation
#category: Nodes
#status: ni

@usage
`setCurrentSimulation(dopnet)`

http://www.sidefx.com/docs/houdini10.0/hom/hou/setCurrentSimulation [12/7/2009 4:31:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setPwd

= hou.setPwd =

#type: homfunction
#cppname: hom::setPwd
#category: Nodes

"""Make the given node Houdini's current node. This function is


equivalent to hou.cd(node.path())."""

@usage
`setPwd(node)`

This function will raise hou.ObjectWasDeleted if the parameter refers to


a node that no longer exists in Houdini.

This function will raise hou.NotAvailable if you call it from mplay.

@related

- [Hom:hou.pwd]
- [Hom:hou.cd]

@replaces

- [Cmd:opcf]

http://www.sidefx.com/docs/houdini10.0/hom/hou/setPwd [12/7/2009 4:31:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/AmbientLightObjNode

= hou.AmbientLightObjNode =

#type: homclass
#cppname: HOM_AmbientLightObjNode
#superclass: hou.LightObjNode
#category: Objects
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/AmbientLightObjNode [12/7/2009 4:31:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/BoneObjNode

= hou.BoneObjNode =
#type: homclass
#cppname: HOM_BoneObjNode
#superclass: hou.ObjNode
#category: Objects
#status: ni

@methods

::`fixChops(self)`:
#cppname: HOM_BoneObjNode::fixChops
#status: ni

::`fixChopsAndRecursivelyDeleteChopOutputs(self)`:
#cppname: HOM_BoneObjNode::fixChopsAndRecursivelyDeleteChopOutputs
#status: ni

::`jointAngleBetween(self, bone)`:
#cppname: HOM_BoneObjNode::jointAngleBetween
#status: ni

::`moveEnd(self, position, space=ParentSpace, set_only_rest_angles=False)`:


#cppname: HOM_BoneObjNode::moveEnd
#status: ni

@replaces

- [Exp:boneangle]
- [Cmd:bonefixchops]
- [Cmd:bonemoveend]

http://www.sidefx.com/docs/houdini10.0/hom/hou/BoneObjNode [12/7/2009 4:31:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryObjNode

= hou.GeometryObjNode =
#type: homclass
#cppname: HOM_GeometryObjNode
#superclass: hou.ObjNode
#category: Objects
#status: ni

@methods

::`ambientLightsInMask(self)` -> tuple of AmblientLightObjNodes:


#cppname: HOM_GeometryObjNode::ambientLightsInMask
#status: ni

::`regularLightsInMask(self)` -> tuple of LightObjNodes:


#cppname: HOM_GeometryObjNode::regularLightsInMask
#status: ni

@replaces

- [Exp:objlightmask]
- [Exp:oplightmask]

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryObjNode [12/7/2009 4:31:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/LightObjNode

= hou.LightObjNode =
#type: homclass
#cppname: HOM_LightObjNode
#superclass: hou.ObjNode
#category: Objects
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/LightObjNode [12/7/2009 4:31:32 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

= hou.ObjNode =
#type: homclass
#cppname: HOM_ObjNode
#superclass: hou.Node
#category: Objects

"""An instance of this class corresponds to exactly one instance of an object


node in Houdini."""

In Houdini, each object has a transformation (or transform) that translates,


rotates, scales, etc. the geometry inside the object into its final position
in world space. If the object is a subnet, so it contains other objects
instead of geometry, that world transform is applied to the transforms of the
objects inside it.

An object's world transform is the combination of multiple transforms. One of


these transforms is the parameter, or local, transform defined by its
translate, rotate, and scale parameters. Objects may be connected together to
form a scene graph, where each object inherits the transform of its inputs.
The following transforms are applied sequentially to determine an object's
final transform in world space, `W`:
- `L`, The transform defined by the node's parameters
- `P`, The object's pre-transform (stored in the object as a matrix)
- `O`, The input, or parent, node's world space transform (if there is an
input connected), combined with the world space transform of the
containing subnet object (if there is one)

Using Houdini's Matrix notation (see [Hom:hou.Matrix4] for more information),


`W = L * P * O`
The pre-transform, as you can see, allows you to apply a transform after
the parameter transform but before input and containing object transforms.

Often times, you want to move move an object to an absolute position in world
space by changing parameters on the object. In other words, you often want
to solve for `L` given `W`. If `O^` is the inverse of `O` then
`L = W * O^ * P^`
Use [Hom:hou.ObjNode#setWorldTransform] to automatically set the object's
parameters controlling `L` to achieve a given world transform.

Note that objects do not currently contain shear parameters. As a result,


when you try to set a the object's parameter transform to something containing
shears, Houdini will remove those shears. Also note that the pre-transform

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (1 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

may contain shears, and it is possible to introduce shears by combining


individual transforms that do not contain shears.

@methods

::`worldTransform(self)` -> [Hom:hou.Matrix4]:


#cppname: HOM_ObjNode::worldTransform
#replaces: Exp:optransform
Return the matrix that transforms this object's geometry into world space.

The world transform matrix contains the cumulative transforms of:


- The node's pre-transform
- The transform defined by the node's parameters
- The transforms of parent nodes or containing networks

This method can approximately be implemented as follows:


{{{
def worldTransform(self):
return (self.parmTransform() * self.preTransform() *
self.parentAndSubnetTransform())
}}}

See also [Hom:hou.ObjNode#setWorldTransform].

::`setWorldTransform(self, matrix, fail_on_locked_parms=False)`:


#cppname: HOM_ObjNode::setWorldTransform
Adjust this object's parameters to achieve the desired world tranformation.

This method will adjust the translate, rotate, and scale values of this
object to achieve the desired final world transform. It accounts
for the transforms of containing networks, parent transforms, and
pre-transforms.

If `fail_on_locked_parms` is `True`, and any of the translate, rotate, or


scale parameters of the object are locked, this method raises
[Hom:hou.OperationFailed]. If it is `False` and any of those parameters
are locked, this method will change their values but leave them locked.

Suppose:
- `W` is the desired new world transform,
- `W'` is the existing world transform,
- `L` is the desired transform defined by the node's parameters,
- `L'` is the existing parm transform,

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (2 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

- `P` is the object's pre-transform,


- `O` is the parent transform combined with the containing subnet's,
transform

Then, since `W = L * P * O` we have `P = W * O^ * R^`. So, this method


could be implemented as follows:
{{{
#!python
def setWorldTransform(self):
self.setParmTransform(
matrix * self.parentAndSubnetTransform().inverted() * self.preTransform().inverted(),
fail_on_locked_parms)
}}}

Alernately, we can derive L from W' and L' as follows:


- `W' = L' * P * O`
- so `P * O = L^' * W'`
- and `(P * O)^ = W^' * L'`
and
- `W = L * P * O`
- so `L = W * (P * O)^`
- giving `L = W * W'^ * L'`

Thus, this method could also be implemented using the current world and
parm transforms as follows:
{{{
#!python
def setWorldTransform(self):
self.setParmTransform(
matrix * self.worldTransform().inverted() * self.parmTransform(),
fail_on_locked_parms)
}}}

Note that, because parm transforms cannot contain shears, it is possible


that the resulting world transform will not match the desired transform.
If `r` is a function that removes shears from a transform then the new
world transform will actually be `L * P * O = r(W * O^ * P^) * P * O`.

See also [Hom:hou.ObjNode#worldTransform] and


[Hom:hou.ObjNode#setParmTransform].

::`parmTransform(self)` -> [Hom:hou.Matrix4]:


#cppname: HOM_ObjNode::parmTransform

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (3 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

Return the transform defined by the parameters on this node.

This method can approximately be implemented as follows:


{{{
#!python
def parmTransform(self):
pivot_transform = hou.hmath.buildTranslate(self.evalParmTuple("p"))
return (
pivot_transform.inverted() *
hou.hmath.buildTransform({
"translate": self.evalParmTuple("t"),
"rotate": self.evalParmTuple("r"),
"scale": [self.evalParm("scale") * s
for s in self.evalParmTuple("s")],
"shear": (0.0, 0.0, 0.0)},
transform_order=self.parm("xOrd").evalAsString(),
rotate_order=self.parm("rOrd").evalAsString()) *
pivot_transform)
}}}

See the class documentation for the relation between this transform
and the world space transform. See also [Hom:hou.ObjNode#worldTransform].

::`setParmTransform(self, matrix, fail_on_locked_parms=False)`:


#cppname: HOM_ObjNode::setParmTransform
Sets the transform controlled by this object's parameters.

This method will adjust the translate, rotate, and scale values of this
object to achieve the desired parameter, or local, transform. It will
account for the existing pivot position, transformation order, and
rotation order, and will leave them unchanged.

Note that object nodes do not currently have shears parameters, so any
shears in the matrix will be discarded.

If `fail_on_locked_parms` is `True`, and any of the translate, rotate, or


scale parameters of the object are locked, this method will raise
hou.OperationFailed. If it is `False` and any of those parameters are
locked, this method will change their values but leave them locked.

See also [Hom:hou.ObjNode#parmTransform] and


[Hom:hou.ObjNode#setWorldTransform].

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (4 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

This method can be approximately implemented as follows, ignoring locked


parameters:
{{{
#!python
def setParmTransform(self, matrix):
parm_values = matrix.explode(
transform_order=self.parm('xOrd').evalAsString(),
rotate_order=self.parm('rOrd').evalAsString(),
pivot=hou.Vector3(self.evalParmTuple('p')))

for parm_name, key in ('t', 'translate'), ('r', 'rotate'), ('s', 'scale'):


self.parmTuple(parm_name).set(parm_values[key])
}}}

See also [Hom:hou.Matrix4#explode].

::`preTransform(self)` -> [Hom:hou.Matrix4]:


#cppname: HOM_ObjNode::preTransform
#replaces: Cmd:objpretransform, Exp:objpretransform
Return this object's pretransform.

The pre-transform allows you to apply a transform after the parameter


transform but before input and containing object transforms. See the
class documentation for more details.

Unlike the parameter transform, the pretransform is not stored using


any parameters on the node. Instead, Houdini stores the pretransform
as a matrix. Because it is directly as a matrix, the pretransform may
contain shears.

::`setPreTransform(self, matrix)`:
#cppname: HOM_ObjNode::setPreTransform
#replaces: Cmd:objpretransform, Cmd:objresetpretransform
Set this object's pretransform. See [Hom:hou.ObjNode#preTransform] for
more information.

::`moveParmRotateIntoPreTransform(self)`:
#cppname: HOM_ObjNode::moveParmRotateIntoPreTransform
#replaces: Cmd:objcleantransform
Set this object's rotate values to zero and adjust the pre-transform so
that the object's world transform does not change.

Suppose:

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (5 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

- `W` is the world transform,


- `L` is the parameter transform without any rotate component,
- `L'` is the existing parm transform,
- `P` is the desired new pre-transform,
- `P'` is the current pre-transform,
- `O` is the parent transform combined with the containing subnet's,
transform

Then,
- `W = L * P * O` and `W = L' * P' * O`
- `L * P = L' * P'`
- `P = L^ * L' * P'`
So, this method is implemented approximately as follows:
{{{
#!python
def moveParmRotateIntoPreTransform(self):
old_parm_transform = self.parmTransform()
self.parmTuple("r").set((0.0, 0.0, 0.0))
self.setPreTransform(
self.parmTransform() * old_parm_transform * self.preTransform())
}}}

See also [Hom:hou.ObjNode#preTransform] and the class documentation.

::`moveParmScaleIntoPreTransform(self)`:
#cppname: HOM_ObjNode::moveParmScaleIntoPreTransform
#replaces: Cmd:objcleantransform
Set this object's scale values to one and adjust the pre-transform so
that the world transform does not change.

See [Hom:hou.ObjNode#moveParmRotateIntoPreTransform] for more information.

::`moveParmTranslateIntoPreTransform(self)`:
#cppname: HOM_ObjNode::moveParmTranslateIntoPreTransform
#replaces: Cmd:objcleantransform
Set this object's translate values to zero and adjust the pre-transform so
that the world transform does not change.

See [Hom:hou.ObjNode#moveParmRotateIntoPreTransform] for more information.

::`moveParmTransformIntoPreTransform(self)`:
#cppname: HOM_ObjNode::moveParmTransformIntoPreTransform
#replaces: Cmd:objcleantransform

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (6 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

Set this object's parm transform to the identity and adjust the
pre-transform so that the world transform does not change.

This method is implemented approximately as follows:


{{{
#!python
def moveParmTransformIntoPreTransform(self):
self.setPreTransform(self.parmTransform() * self.preTransform())
self.setParmTransform(hou.hmath.identityTransform())
}}}

See also [Hom:hou.ObjNode#moveParmRotateIntoPreTransform],


[Hom:hou.ObjNode#moveParmScaleIntoPreTransform], and
[Hom:hou.ObjNode#moveParmTranslateIntoPreTransform]. Also see
[Hom:hou.ObjNode#movePreTransformIntoParmTransform].

::`movePreTransformIntoParmTransform(self)`:
#cppname: HOM_ObjNode::movePreTransformIntoParmTransform
#replaces: Cmd:objextractpretransform
Set this object's pre-transform to the identity and adjust the parm
transform so that the world transform does not change.

This method is implemented approximately as follows:


{{{
#!python
def movePreTransformIntoParmTransform(self):
self.setParmTransform(self.parmTransform() * self.preTransform())
self.setPreTransform(hou.hmath.identityTransform())
}}}

See also [Hom:hou.ObjNode#movePreTransformIntoParmTransform].

::`parentAndSubnetTransform(self)` -> [Hom:hou.Matrix4]:


#cppname: HOM_ObjNode::parentAndSubnetTransform
Return the input node's world space transform (if there is an input
connected), combined with the world space transform of the containing
subnet object (if there is one). See the class documentation for more
information.

This method can approximately be implemented as follows:


{{{
#!python
def parentAndSubnetTransform(self):

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (7 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

if len(self.inputConnectors()[0]) != 0:
return self.inputs()[0].worldTransform()

containing_subnet = self.parent()
if containing_subnet.type().category() == hou.objNodeTypeCategory():
return containing_subnet.worldTransform()

return hou.hmath.identityMatrix()
}}}

::`getTransformToNode(self, obj_node)` -> [Hom:hou.Matrix4]:


#cppname: HOM_ObjNode::getTransformToNode
#replaces: Exp:vorigin, Exp:vrorigin, Exp:vtorigin
TODO: Document the relationship with vtorigin.
**********************************************

Return a matrix that transforms this node to line up with the


other node.

The following invariant is true: `node1.worldTransform() *


node1.getTransformToNode(node2) == node2.worldTransform()`.

This method can be implemented as follows:


{{{
#!python
def getTransformToNode(self, obj_node):
self.worldTransform().inverted() * obj_node.worldTransform()
}}}

To align node1 (an ObjNode object) with node2 (another ObjNode object),
you don't need to use `getTransformToNode()`. You can simply write:
`node1.setWorldTransform(node2.worldTransform())`.

See also [Hom:hou.ObjNode#origin()], [Hom:hou.ObjNode#worldTransform()],


and [Hom:hou.ObjNode#setWorldTransform()].

::`getTransformFromPointToPoint(self, pos3, other_node, other_pos3)` -> [Hom:hou.Matrix4]:


#cppname: HOM_ObjNode::getTransformFromPointToPoint
#replaces: Exp:originoffset
Return the transform matrix that rotates the point pos3 (in this
object node's transform space) to the point other_pos3 (in another
object node's transform space).

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (8 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

{{{
#!python
obj1.getTransformFromPointToPoint(pos1, obj2, pos2)
}}}

...is equivalent to...

{{{
#!python
(obj1.worldTransform().inverted() *
hou.hmath.buildTranslate(-pos1) *
hou.hmath.buildTranslate(pos2) *
obj2.worldTransform())
}}}

See also the [Hom:hou.ObjNode#getTransformToNode] and


[Hom:hou.ObjNode#worldTransform] methods, and the functions in the
[Hom:hou.hmath] module.

::`origin(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_ObjNode::origin
#replaces: Exp:origin
Return the object's origin position, in world space.

`obj.origin()` is equivalent to
`obj.Vector3(0, 0, 0) * obj.worldTransform()`.

{{{
#!python
# To compute the world space vector from obj1's origin to obj2's origin, you
# can write:
obj2.origin() - obj1.origin()

# To compute the distance, in world space, between the origins of two


# objects, simply take the length of this vector:
(obj2.origin() - obj1.origin()).length()

# If there are no rotations or scales, the vtorigin() hscript expression


# function will return the same result as obj2.origin() - obj1.origin().
# If there are rotations or scales, though, it won't. A Python equivalent
# of vtorigin() is defined by:
def vtorigin(obj1, obj2):
return (obj2.worldTransform() * obj1.worldTransform().inverted()).extractTranslates()

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (9 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

}}}

See also the [Hom:hou.ObjNode#worldTransform] and


[Hom:hou.ObjNode#getTransformToNode] methods.

::`buildLookatRotation(self, to_node, up_vector=None)` -> [Hom:hou.Matrix4]:


#cppname: HOM_ObjNode::buildLookatRotation
#replaces: Exp:mlookat, Exp:mobjlookat
Return a matrix that will rotate this object to look at the specified
object.

The returned [Hom:hou.Matrix4] object transforms this object from


its current position in world space so that its negative z axis points at
the origin of the `to_node` object.

`up_vector` can either be a [Hom:hou.Vector3] object or None. If it is


None, this method uses an up vector of hou.Vector3(0, 1, 0).

You can extract the rotation values from the return value with
[Hom:hou.Matrix4#extractRotates]. You can set an object's transform
with [Hom:hou.ObjNode#setWorldTransform].

{{{
#!python
# Set the cam1 object's transform so it points at geo1.
cam1 = hou.node("/obj/cam1")
lookat_obj = hou.node("/obj/geo1")
cam1.setWorldTransform(cam1.buildLookatRotation(lookat_obj))
}}}

See also [Hom:hou.ObjNode#setWorldTransform].

::`setInputAndNeverKeepPosition(self, input_index, node_to_become_input, output_index=0)`:


#cppname: HOM_ObjNode::setInputAndNeverKeepPosition
#replaces: Cmd:opwire
#status: ni

::`setCookTransform(self, matrix)`:
#cppname: HOM_ObjNode::setCookTransform
Set the parameter transform for the Python object that's cooking. Call
this method from objects implemented in Python to set the result of the
cook.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (10 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

Note that an object implemented in Python controls the parameter transform


(i.e. the result of [Hom:hou.ObjNode#parmTransform]). The world transform
(i.e. the result of [Hom:hou.ObjNode#worldTransform]) is still affected by
parent node's transforms, pre-transforms, etc.

This method raises [Hom:hou.OperationFailed] if you call it on an object


that is not implemented in Python or if you call it from outside that
object's Python cook code.

See the [Transforms from Disk|/hom/cookbook/xforms_from_disk] example.

::`combine(self, nodes)`:
#cppname: HOM_ObjNode::combine
Combine the geometry from the given list of hou.ObjNode's into this object.
After this operation, the old objects will be deleted.

Raises [Hom:hou.ObjectWasDeleted] if any of the nodes no longer exist in


Houdini. Raises `TypeError` if any of the nodes are not of type
hou.ObjNode. These exceptions are raised prior to performing the combine
operation to avoid partial results.

::`displayNode(self)` -> [Hom:hou.Node] or `None`:


#cppname: HOM_ObjNode::displayNode
If this object contains SOPs or DOPs, return the one that has its display
flag on. Otherwise, return None.

::`renderNode(self)` -> [Hom:hou.Node] or `None`:


#cppname: HOM_ObjNode::renderNode
If this object contains SOPs or DOPs, return the one that has its render
flag on. Otherwise, return None.

::`isObjectDisplayed(self)` -> bool:


#cppname: HOM_ObjNode::isObjectDisplayed
Return whether or not this object is displayed. This method takes into
account both the display flag and the `display` parameter. If the
`display` parameter is enabled, because the `tdisplay` parameter is set,
this parameter overrides the flag.

See also [Hom:hou.ObjNode#isDisplayFlagSet], which returns the current


state of the flag.

::`isDisplayFlagSet(self)` -> `bool`:


#cppname: HOM_ObjNode::isDisplayFlagSet

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (11 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

#replaces: Cmd:opget, Exp:opflag


Return whether or not this object's display flag is turned on. Note that
the display flag and the `display` parameter both determine whether the
object is actually displayed.

Use [Hom:hou.ObjNode#isObjectDisplayed] to determine if the object is


actually displayed.

::`setDisplayFlag(self, on)`:
#cppname: HOM_ObjNode::setDisplayFlag
#replaces: Cmd:opset
Turn the object's display flag on or off. See also
[Hom:hou.ObjNode#isDisplayFlagSet].

::`isSelectableInViewport(self)` -> bool:


#cppname: HOM_ObjNode::isSelectableInViewport
#replaces: Cmd:opget, Exp:opflag
Return whether or not the selectable flag is set. When it is not set, it
is not possible to select this object or any of its geometry interactively
in the viewport.

::`setSelectableInViewport(self, on)`:
#cppname: HOM_ObjNode::setSelectableInViewport
#replaces: Cmd:opset
Set the object's selectable flag. See
[Hom:hou.ObjNode#isSelectableInViewport] for more information.

::`isShowingOrigin(self)` -> bool:


#cppname: HOM_ObjNode::isShowingOrigin
#replaces: Cmd:opget, Exp:opflag
Return whether or not this object displays its local origin gnomon in the
viewport.

Note that you can change this setting by right-clicking on the node.

::`showOrigin(self, on)`:
#cppname: HOM_ObjNode::showOrigin
#replaces: Cmd:opset
Show or hide this object's local origin gnomon in the viewport. See also
[Hom:hou.ObjNode#isShowingOrigin].

::`isUsingXray(self)` -> bool:


#cppname: HOM_ObjNode::isUsingXray

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (12 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode

#replaces: Cmd:opget, Exp:opflag


Return whether or not this object displays its geometry in xray mode.
Houdini displays xrayed geometry in wireframe and makes it visible even
when it is hidden behind another surface.

Note that you can change this setting by right-clicking on the node.

::`useXray(self, on)`:
#cppname: HOM_ObjNode::useXray
#replaces: Cmd:opset
Turn this object's xray mode on or off. See also
[Hom:hou.ObjNode#isUsingXray].

http://www.sidefx.com/docs/houdini10.0/hom/hou/ObjNode (13 of 13) [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ButtonParmTemplate

= hou.ButtonParmTemplate =
#type: homclass
#cppname: HOM_ButtonParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates

"""Describes a button parameter."""

@methods

::`__init__(self, name, label, disable_when=None, is_hidden=False, join_with_next=False, help=None, tags={})`:


#cppname: HOM_ButtonParmTemplate::__init__

Creates a new ButtonParmTemplate instance.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ButtonParmTemplate [12/7/2009 4:31:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/FloatParmTemplate

= hou.FloatParmTemplate =
#type: homclass
#cppname: HOM_FloatParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
#status: nd

@methods

::`defaultValue(self)` -> tuple of `float`:


#cppname: HOM_FloatParmTemplate::defaultValue

Returns the default value for new parameter instances.

::`FloatParmTemplate(self, num_components, default_value=None, naming_scheme=hou.parmNamingScheme.NoSuffix, look=hou.parmLook.Regular, may_contain_expressions=True, is_hidden=False, strict_range=None, ui_range=None)`:


#cppname: HOM_FloatParmTemplate::FloatParmTemplate
#status: ni

::`maxIsStrict(self)` -> `bool`:


#cppname: HOM_FloatParmTemplate::maxIsStrict

Return whether the maximum value is strictly enforced.

::`maxValue(self)` -> `float`:


#cppname: HOM_FloatParmTemplate::maxValue

Returns the minimum value of the parameter.

::`minIsStrict(self)` -> `bool`:


#cppname: HOM_FloatParmTemplate::minIsStrict

Returns whether the minimum value is strictly enforced.

::`minValue(self)` -> `float`:


#cppname: HOM_FloatParmTemplate::minValue

Returns the minimum value of the parameter.

@related

- [Hom:hou.FloatParmTemplate.maxIsStrict]
- [Hom:hou.FloatParmTemplate.minIsStrict]
- [Hom:hou.FloatParmTemplate.maxValue]
- [Hom:hou.FloatParmTemplate.min]
- [Hom:hou.FloatParmTemplate.max]

http://www.sidefx.com/docs/houdini10.0/hom/hou/FloatParmTemplate [12/7/2009 4:31:36 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/FolderSetParmTemplate

= hou.FolderSetParmTemplate =
#type: homclass
#cppname: HOM_FolderSetParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates

"""Describes a set of folders."""

A folder set a group of adjacent folders, and only one of those folders
can be displayed at a time. A folder set corresponds to one parameter, and
the value of that parameter determines which folder is displayed.

@methods

::`__init__(self, name, folder_names, tags={})`:


#cppname: HOM_FolderSetParmTemplate::__init__

Create a new FolderSetParmTemplate instance.

::`folderNames(self)` -> tuple of `str`:


#cppname: HOM_FolderSetParmTemplate::folderNames

Returns the names of the folders in this set.

When [Hom:hou.Parm#evalAsString] is called on a folder parameter, it will


return one of these folder names.

http://www.sidefx.com/docs/houdini10.0/hom/hou/FolderSetParmTemplate [12/7/2009 4:31:36 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/IntParmTemplate

= hou.IntParmTemplate =
#type: homclass
#cppname: HOM_IntParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
#status: nd

@methods

::`defaultValue(self)` -> tuple of `int`:


#cppname: HOM_IntParmTemplate::defaultValue

Returns the default value for new parameter instances.

::`IntParmTemplate(self, num_components, default_value=None, naming_scheme=hou.parmNamingScheme.NoSuffix, look=hou.parmLook.Regular, may_contain_expressions=True, is_hidden=False, strict_range=None, ui_range=None)`:


#cppname: HOM_IntParmTemplate::IntParmTemplate
#status: ni

::`maxIsStrict(self)` -> `bool`:


#cppname: HOM_IntParmTemplate::maxIsStrict

Returns whether the maximum value is strictly enforced.

::`maxValue(self)` -> `int`:


#cppname: HOM_IntParmTemplate::maxValue

Returns the minimum value of the parameter.

::`minIsStrict(self)` -> `bool`:


#cppname: HOM_IntParmTemplate::minIsStrict

Returns whether the minimum value is strictly enforced.

::`minValue(self)` -> `int`:


#cppname: HOM_IntParmTemplate::minValue

Returns the minimum value of the parameter.

http://www.sidefx.com/docs/houdini10.0/hom/hou/IntParmTemplate [12/7/2009 4:31:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/LabelParmTemplate

= hou.LabelParmTemplate =
#type: homclass
#cppname: HOM_LabelParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates

"""Describes a label parameter."""

::`__init__(self, name, label, is_hidden=False, join_with_next=False, help=None, tags={})`:


#cppname: HOM_LabelParmTemplate::__init__

Create a new LabelParmTemplate instance.

http://www.sidefx.com/docs/houdini10.0/hom/hou/LabelParmTemplate [12/7/2009 4:31:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/MenuParmTemplate

= hou.MenuParmTemplate =
#type: homclass
#cppname: HOM_MenuParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates

"""Describes a menu parameter."""

@methods

::`__init__(self, name, label, menu_items, menu_labels=(), default_value=0, icon_names=(), item_generator_script='', disable_when=None, is_hidden=False, join_with_next=False, help=None, tags={})`:
#cppname: HOM_MenuParmTemplate::MenuParmTemplate
#status: nd

::`defaultValue(self)` -> `int`:


#cppname: HOM_MenuParmTemplate::defaultValue

Returns the index of the default menu item.

::`defaultValueAsString(self)` -> `str`:


#cppname: HOM_MenuParmTemplate::defaultValuAsStringe

Returns the internal name of the default menu item.This is equivalent to...

{{{
#!python
self.menuItems()[self.defaultValue()]
}}}

::`iconNames(self)` -> `tuple` of `str`:


#cppname: HOM_MenuParmTemplate::iconNames

Returns the list of icons corresponding to the menu items.


If there are no icons, returns a tuple of empty strings.

::`itemGeneratorScript(self)` -> `str`:


#cppname: HOM_MenuParmTemplate::itemGeneratorScript

Returns the script used to generate menu items, or an empty string if


there is no such script.

::`menuItems(self)` -> `tuple` of `str`:


#cppname: HOM_MenuParmTemplate::menuItems

Returns the list of internal menu names.

These internal menu names are not displayed in the UI, but they can be
passed to [Hom:hou.Parm#set] and will be returned by
[Hom:hou.Parm#evalAsString] for menu parameters.

::`menuLabels(self)` -> `tuple` of `str`:


http://www.sidefx.com/docs/houdini10.0/hom/hou/MenuParmTemplate (1 of 2) [12/7/2009 4:31:38 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/MenuParmTemplate

#cppname: HOM_MenuParmTemplate::menuLabels

Returns the list of menu labels displayed in the UI.

@replaces

- [Cmd:opmenu]

http://www.sidefx.com/docs/houdini10.0/hom/hou/MenuParmTemplate (2 of 2) [12/7/2009 4:31:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/MultiParmTemplate

= hou.MultiParmTemplate =
#type: homclass
#cppname: HOM_MultiParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
#status: nd

@methods

::`__init__(self, name, label, default_value=0, is_hidden=False, help=None, tags={})`:


#cppname: HOM_MultiParmTemplate::MultiParmTemplate
#status: nd

::`addParmTemplate(self, parm_template)`:
#cppname: HOM_MultiParmTemplate::addParmTemplate
#status: nd

::`clearParmTemplates(self)`:
#cppname: HOM_MultiParmTemplate::clearParmTemplates
#status: nd

::`defaultValue(self)` -> `int`:


#cppname: HOM_MultiParmTemplate::defaultValue
Returns the default number of multiparm instances.

http://www.sidefx.com/docs/houdini10.0/hom/hou/MultiParmTemplate [12/7/2009 4:31:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTemplate

= hou.ParmTemplate =
#type: homclass
#cppname: HOM_ParmTemplate
#category: Parameter templates
#status: nd

@methods

::`asCode(self, function_name=None)` -> `str`:


#cppname: HOM_ParmTemplate::asCode

Returns a script of Python statements that can be executed to recreate


the parameter template. To run the script, use either Python's `exec`
or `execfile` functions.

`function_name`:
If <<function_name>> is specified, then the output script
is wrapped in a Python function definition with the given name.
<<function_name>> must be a non-zero length string consisting of
only alphanumeric and underscore characters. Any invalid characters
are internally converted to underscores.

The function returns a reference to the newly created parameter


template object.

Here is an example of saving the output to a file and then loading


it back into Houdini:
{{{
#!python
# Get a reference to the target parameter template.
node = hou.node("/obj/geo1")
pt = node.parm("tx").parmTemplate()

# Execute asCode and write the output script to file.


script = pt.asCode()
f = open("create_parm_template.py", "w")
f.write(script)
f.close()

# Execute the script. The new parameter template will be stored


# in the 'hou_parm_template' variable.
execfile("create_parm_template.py")

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTemplate (1 of 4) [12/7/2009 4:31:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTemplate

# Add a spare parameter to the node using the saved parameter


# template.
node.addSpareParmTuple(hou_parm_template)
}}}

Here is an example of saving the output into a function and then


calling it in Houdini:
{{{
#!python
# Get a reference to the target parameter template.
node = hou.node("/obj/geo1")
pt = node.parm("tx").parmTemplate()

# Execute asCode and write the function definition to file.


func = pt.asCode(function_name="createParmTemplate")
f = open("parmTemplateLib.py", "w")
f.write(func)
f.close()

# Call the function definition.


import parmtemplatelib
hou_parm_template = parmtemplatelib.createParmTemplate()

# Add a spare parameter to the node using the saved parameter


# template.
node.addSpareParmTuple(hou_parm_template)
}}}

::`dataType(self)` -> hou.parmData enum value:


#cppname: HOM_ParmTemplate::dataType
#status: nd

::`defaultValue(self)`:
#cppname: HOM_ParmTemplate::defaultValue
#status: ni

::`disableWhen(self)` -> `str`:


#cppname: HOM_ParmTemplate::disableWhen
#status: nd

::`help(self)` -> `str`:


#cppname: HOM_ParmTemplate::help

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTemplate (2 of 4) [12/7/2009 4:31:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTemplate

Returns the help that Houdini displays when you hover over the parameter
label in the parameter pane.

::`hide(self, on)`:
#cppname: HOM_ParmTemplate::hide

Marks this parameter as visible or invisible in the parameter pane.

Note that hidden parameters still exist, and can be evaluated,


channel-referenced, etc. They simply will not be displayed in the parameter
pane.

::`isHidden(self)` -> `bool`:


#cppname: HOM_ParmTemplate::isHidden

Returns whether this parameter is hidden in the parameter pane.

::`joinWithNext(self)` -> `bool`:


#cppname: HOM_ParmTemplate::joinWithNext

Returns whether this parameter is displayed on the same line


as the next parameter in the parameter pane.

::`label(self)` -> string:


#cppname: HOM_ParmTemplate::label
#status: nd

::`look(self)` -> hou.parmLook enum value:


#cppname: HOM_ParmTemplate::look
#status: nd

::`mayContainExpressions(self)`:
#cppname: HOM_ParmTemplate::mayContainExpressions
#status: ni

::`name(self)` -> string:


#cppname: HOM_ParmTemplate::name
#status: nd

::`namingScheme(self)` -> hou.parmNamingScheme enum value:


#cppname: HOM_ParmTemplate::namingScheme
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTemplate (3 of 4) [12/7/2009 4:31:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTemplate

::`numComponents(self)` -> int:


#cppname: HOM_ParmTemplate::numComponents
#status: nd

::`setDisableWhen(self, disable_when)`:
#cppname: HOM_ParmTemplate::setDisableWhen
#status: nd

::`setHelp(self, help)`:
#cppname: HOM_ParmTemplate::setHelp

Set the help that Houdini displays when you hover over the parameter
label in the parameter pane.

::`setJoinWithNext(self, on)`:
#cppname: HOM_ParmTemplate::setJoinWithNext

Sets whether this parameter is displayed on the same line


as the next parameter in the parameter pane.

::`setName(self, name)`:
#cppname: HOM_ParmTemplate::setName
#status: nd

::`setTags(self, tags)`:
#cppname: HOM_ParmTemplate::setTags
#status: nd

::`tags(self) -> dict of string to string`:


#cppname: HOM_ParmTemplate::tags
#status: nd

::`type(self)` -> hou.parmTemplateType enum value:


#cppname: HOM_ParmTemplate::type
#status: nd

@replaces

- [Cmd:opscript]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTemplate (4 of 4) [12/7/2009 4:31:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/RampParmTemplate

= hou.RampParmTemplate =
#type: homclass
#cppname: HOM_RampParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates

"""Parameter template for a ramp parameter."""

@methods

::`__init__(self, name, label, ramp_parm_type, default_value=2, default_basis=None, show_controls=True, color_type=None, disable_when=None, is_hidden=False, help=None, tags={})`:
#cppname: HOM_RampParmTemplate::__init__

The first two arguments are the internal name and the human-readable
label for the parameter.

The third argument specifies this is a color or float ramp parameter.


The value must be from [Hom:hou.rampParmType], currently
`hou.rampParmType.Color` or `hou.rampParmType.Float`.

The default basis for new keys is Linear. You can use the `default_basis`
keyword argument to specify a value from [Hom:hou.rampBasis].
For example:

{{{
#!python
r = hou.RampParmTemplate("myRamp", "My Ramp", hou.rampParmType.Color,
default_basis = hou.rampBasis.CatmullRom)
}}}

The default color type for color ramps is RGB color.


You can use the `color_type` keyword argument to specify a value
from [Hom:hou.colorType].
For example:

{{{
#!python
r = hou.RampParmTemplate("myRamp", "My Ramp", hou.rampParmType.Color,
color_type = hou.colorType.RGB)
}}}

::`defaultValue(self)` -> `int`:


#cppname: HOM_RampParmTemplate::defaultValue

Returns the default value for new parameter instances.


For ramp parameters, this is the default number of ramp keys.

http://www.sidefx.com/docs/houdini10.0/hom/hou/RampParmTemplate (1 of 2) [12/7/2009 4:31:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/RampParmTemplate

::`parmType(self)` -> [Hom:hou.rampParmType]:


#cppname: HOM_RampParmTemplate::rampParmType

Returns the type of this ramp parameter template.

http://www.sidefx.com/docs/houdini10.0/hom/hou/RampParmTemplate (2 of 2) [12/7/2009 4:31:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SeparatorParmTemplate

= hou.SeparatorParmTemplate =
#type: homclass
#cppname: HOM_SeparatorParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates

"""Template for a separator parameter. Separators are just lines


between parameters."""

@methods

::`__init__(self, name, is_hidden=False, tags={})`:


#cppname: HOM_SeparatorParmTemplate::__init__

Creates a new SeparatorParmTemplate instance.

http://www.sidefx.com/docs/houdini10.0/hom/hou/SeparatorParmTemplate [12/7/2009 4:31:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/StringParmTemplate

= hou.StringParmTemplate =
#type: homclass
#cppname: HOM_StringParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
#status: nd

@methods

::`__init__(self, name, label, num_components, default_value=(), naming_scheme=hou.parmNamingScheme.XYZW, disable_when=None, is_hidden=False, join_with_next=False, tags={})`:
#cppname: HOM_StringParmTemplate::StringParmTemplate
#status: ni

::`defaultValue(self)` -> tuple of `str`:


#cppname: HOM_StringParmTemplate::defaultValue

Returns the default value for new parameter instances.

::`stringType(self)` -> [Hom:hou.stringParmType] enum value:


#cppname: HOM_StringParmTemplate::stringType

Returns the type of this string parameter.

http://www.sidefx.com/docs/houdini10.0/hom/hou/StringParmTemplate [12/7/2009 4:31:42 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ToggleParmTemplate

= hou.ToggleParmTemplate =
#type: homclass
#cppname: HOM_ToggleParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
#status: nd

@methods

::`__init__(self, name, label, default_value=False, disable_when=None, is_hidden=False, join_with_next=False, help=None, tags={})`:


#cppname: HOM_ToggleParmTemplate::__init__

Creates a new ToggleParmTemplate instance.

::`defaultValue(self)` -> `bool`:


#cppname: HOM_ToggleParmTemplate::defaultValue

Returns the default value for new parameter instances.

::`ToggleParmTemplate(self, default_value=False, may_contain_expressions=True, is_hidden=False)`:


#cppname: HOM_ToggleParmTemplate::ToggleParmTemplate
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/ToggleParmTemplate [12/7/2009 4:31:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/parmData

= hou.parmData =
#type: hommodule
#cppname: HOM_parmData
#category: Parameter templates
#status: nd

"""Enumeration of parameter data types."""

* hou.parmData.Int
* hou.parmData.Float
* hou.parmData.String

http://www.sidefx.com/docs/houdini10.0/hom/hou/parmData [12/7/2009 4:31:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/parmLook

= hou.parmLook =
#type: hommodule
#cppname: HOM_parmLook
#category: Parameter templates

"""Enumeration of available looks for a parameter"""

* hou.parmLook.Regular
* hou.parmLook.Angle
* hou.parmLook.Vector
* hou.parmLook.ColorSquare
* hou.parmLook.HueCircle
* hou.parmLook.CRGBAPlaneChooser
* hou.parmLook.Slider

http://www.sidefx.com/docs/houdini10.0/hom/hou/parmLook [12/7/2009 4:31:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/parmNamingScheme

= hou.parmNamingScheme =
#type: hommodule
#cppname: HOM_parmNamingScheme
#category: Parameter templates

"""Enumeration of available naming schemes for a parameter."""

* hou.parmNamingScheme.NoSuffix
* hou.parmNamingScheme.Base0
* hou.parmNamingScheme.Base1
* hou.parmNamingScheme.XYZW
* hou.parmNamingScheme.XYWH
* hou.parmNamingScheme.UVW
* hou.parmNamingScheme.RGB
* hou.parmNamingScheme.MinMax
* hou.parmNamingScheme.MaxMin
* hou.parmNamingScheme.StartEnd

http://www.sidefx.com/docs/houdini10.0/hom/hou/parmNamingScheme [12/7/2009 4:31:49 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/parmTemplateType

= hou.parmTemplateType =
#type: hommodule
#cppname: HOM_parmTemplateType
#category: Parameter templates
#status: nd

"""Enumeration of parameter template types."""

* hou.parmTemplateType.Int
* hou.parmTemplateType.Float
* hou.parmTemplateType.String
* hou.parmTemplateType.Toggle
* hou.parmTemplateType.Menu
* hou.parmTemplateType.Button
* hou.parmTemplateType.FolderSet
* hou.parmTemplateType.Separator
* hou.parmTemplateType.Label

http://www.sidefx.com/docs/houdini10.0/hom/hou/parmTemplateType [12/7/2009 4:31:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/stringParmType

= hou.stringParmType =
#type: hommodule
#cppname: HOM_stringParmType
#category: Parameter templates
#status: nd

"""Enumeration of string parameter types."""

* hou.stringParmType.Regular
* hou.stringParmType.FileReference
* hou.stringParmType.NodeReference
* hou.stringParmType.NodeReferenceList

http://www.sidefx.com/docs/houdini10.0/hom/hou/stringParmType [12/7/2009 4:31:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

= hou.Parm =
#type: homclass
#cppname: HOM_Parm
#category: Parameters

"""A parameter in a node. Each parameter has a unique name within its node
and exists inside a parameter tuple."""

@methods

::`alias(self)` -> `str`:


#cppname: HOM_Parm::alias
Returns the parameter's channel alias name.
Returns an empty string if no such name exists.

::`appendToScope(self)`:
#cppname: HOM_Parm::appendToScope
#status: ni

::`asCode(self, brief=False, save_values=True, save_keyframes=True, save_keys_in_frames=False, save_flag_values=True, save_aliases=True, function_name=None)` -> `str`:
#cppname: HOM_Parm::asCode
Returns a script of Python statements that can be executed to
set the parameter's values, flags and other properties.
To run the script, use either Python's `exec` or `execfile` functions.

`brief`:
When <<brief>> is True, the output script omits commands for
setting values and flags that are set to the factory defaults.
The script also omits keyframe commands that set unused
values, slopes and accelerations. The value of <<brief>> must
be either True or False.

`save_values`:
When <<save_values>> is True, `asCode` outputs commands
for setting the parameter's value. The value of <<save_values>>
must be either True or False.

`save_keyframes`:
When <<save_keyframes>> is True, `asCode` outputs commands
for creating the parameter's keyframes (if any). The value
of <<save_keyframes>> must be either True or False.

`save_keys_in_frames`:
When <<save_keys_in_frames>> is True, `asCode` outputs commands
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (1 of 15) [12/7/2009 4:31:54 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

for setting channel and key times in samples (frames) instead


of seconds. This parameter has no effect if <<save_keyframes>>
is set to False. The value of <<save_keys_in_frames>> must be either
True or False.

`save_flag_values`:
When <<save_flag_values>> is True, `asCode` outputs commands
for setting the parameter's flag values. The value of
<<save_flag_values>> must be either True or False.

`save_aliases`:
When <<save_aliases>> is True, `asCode` outputs commands for
setting the parameter's channel alias. The value of
<<save_aliases>> must be either True or False.

`function_name`:
If <<function_name>> is specified, then the output script
is wrapped in a Python function definition with the given name.
<<function_name>> must be a non-zero length string consisting of
only alphanumeric and underscore characters. Any invalid characters
are internally converted to underscores.

The wrapper function takes in a single argument which must be a


reference to an existing node parameter. For symmetry, the function
also returns the parameter reference.

Here is an example of saving the output to a file and then loading


it back into Houdini:
{{{
#!python
# Get a reference to the target parameter.
p = hou.parm("/obj/geo1/tx")

# Execute asCode and write the output script to file.


script = p.asCode()
f = open("set_parm_properties.py", "w")
f.write(script)
f.close()

# Execute the script. This will set the values, flag values
# and other properties on /obj/geo1's tx parameter. It will
# also store a reference to the tx parameter into a variable
# named 'hou_parm'.
execfile("set_parm_properties.py")
}}}
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (2 of 15) [12/7/2009 4:31:54 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

Here is an example of saving the output into a function and then


calling it in Houdini:
{{{
#!python
# Get a reference to the target parameter.
node = hou.parm("/obj/geo1/tx")

# Execute asCode and write the function definition to file.


func = p.asCode(function_name="setParmProperties")
f = open("parmlib.py", "w")
f.write(func)
f.close()

# Call the function definition to set the properties on another


# parameter.
import parmlib
hou_parm = parmlib.setParmProperties(node.parm("ty"))
}}}

::`componentIndex(self)` -> `int`:


#cppname: HOM_Parm::componentIndex
Returns the component index of this parameter.

For example, the translation parameter along the x-axis, "tx", would return
a component index of 0, while the translation parameter along the y-axis,
"ty" would return a component index of 1.

::`containingFolders(self)` -> tuple of `str`:


#cppname: HOM_Parm::containingFolders
Returns a tuple of strings corresponding to the names of the folders
containing this parameter.

For example, if this parameter is in the Shading folder and the Shading
folder is inside the Render folder, this method will return ("Render",
"Shading").

Returns an empty tuple if this parameter is not inside a folder.

Note that calling this method on many parameters may be slow. For a faster
alternative, see [Hom:hou.Node#parmsInFolder].

See also the `containingFolderSetParmTuples` method, and


[Hom:hou.Node#parmTuplesInFolder].

http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (3 of 15) [12/7/2009 4:31:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

::`containingFolderSetParmTuples(self)` -> tuple of [Hom:hou.ParmTuple]:


#cppname: HOM_Parm::containingFolderSetParmTuples
Return a tuple of ParmTuples corresponding to the folders containing this
parameter.

For example, if this parameter is in the Shading folder and the Shading
folder is inside the Render folder, this method will return a tuple
containing the Render parm tuple and the Shading parm tuple. Any parm
tuples returned will be folder sets.

If this parameter is not inside a folder, an empty tuple is returned.

See also the `containingFolders()` method, and


[Hom:hou.Node#parmsInFolder] and [Hom:hou.Node#parmTuplesInFolder].

::`containingFolderIndices(self)` -> tuple of `int`:


#cppname: HOM_Parm::containingFolderIndices
Return a tuple of indices corresponding to the folders containing this
parameter. Each index refers to a folder in the corresponding folder set
parameter.

This method can be implemented as follows:


{{{
#!python
def containingFolderIndices(self):
return tuple(
list(folder_set_parm_tuple.parmTemplate().folderNames()).index(
folder_name)
for folder_set_parm_tuple, folder_name in zip(
parm.containingFolderSetParmTuples(), parm.containingFolders()))
}}}

This example makes a parameter visible in the parameter pane by opening


all the folders containing it.
{{{
#!python
def makeParmVisible(parm):
for folder_set_parm_tuple, folder_index in zip(
parm.containingFolderSetParmTuples(),
parm.containingFolderIndices()):
folder_set_parm_tuple[0].set(folder_index)
}}}

::`curKeyframe(self)` -> BaseKeyframe:


#cppname: HOM_Parm::curKeyframe
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (4 of 15) [12/7/2009 4:31:54 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

#status: ni

::`deleteAllKeyframes(self)`:
#cppname: HOM_Parm::deleteAllKeyframes
Removes all keyframes from this parameter.

This has no effect if there are no keyframes to delete. The value of the
parameter after all keyframes are removed will be the one it evaluated to
at the current frame.

This function will raise a hou.ObjectWasDeleted exception if it is invoked


on a parameter that does not exist in Houdini.

This function will raise a hou.PermissionError exception if writing to the


specified parameter is impossible.

See also [Hom:hou.ParmTuple#deleteAllKeyframes].

::`description(self)` -> `str`:


#cppname: HOM_Parm::description
Returns this parameter's label.

::`effectiveKeyframeAtFrame(self, frame)`:
#cppname: HOM_Parm::effectiveKeyframeAtFrame
#status: ni

::`eval(self)` -> `int`, `float`, or `str`:


#cppname: HOM_Parm::eval
Evaluates this parameter at the current frame and returns the result.
See also the `evalAtFrame()` method.

::`evalAsFloat(self)` -> `float`:


#cppname: HOM_Parm::evalAsFloat
Evaluates this parameter at the current frame and returns the result as a
float.

Raises [Hom:hou.TypeError] if the value cannot be converted to a float.

::`evalAsFloatAtFrame(self, frame)` -> `float`:


#cppname: HOM_Parm::evalAsFloatAtFrame
Evaluates this parameter at a certain frame and returns the result as a
float.

Raises [Hom:hou.TypeError] if the value cannot be converted to a float.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (5 of 15) [12/7/2009 4:31:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

::`evalAsInt(self)` -> `int`:


#cppname: HOM_Parm::evalAsInt

Evalutes this parameter at the current frame and returns the result as an
integer.

Raises [Hom:hou.TypeError] if the value cannot be converted to an integer.

::`evalAsIntAtFrame(self, frame)` -> `int`:


#cppname: HOM_Parm::evalAsIntAtFrame
Evaluates this parameter at a certain frame
and returns the result as an integer.

Raises [Hom:hou.TypeError] if the value cannot be converted to an integer.

::`evalAsString(self)` -> `str`:


#cppname: HOM_Parm::evalAsString
Evalutes this parameter at the current frame and returns the result as a
string.

Raises [Hom:hou.TypeError] if the value cannot be converted to a string.

::`evalAsStringAtFrame(self, frame)` -> `str`:


#cppname: HOM_Parm::evalAsStringAtFrame
Evaluates this parameter at a certain frame and returns the result as a
string.

Raises [Hom:hou.TypeError] if the value cannot be converted to a string.

::`evalAtFrame(self, frame)` -> `int`, `float`, or `str`:


#cppname: HOM_Parm::evalAtFrame
Evalutes this parameter at a certain frame
and returns the result as an integer, float or string.

::`evalAsRamp(self)` -> [Hom:hou.Ramp]:


#cppname: HOM_Parm::evalAsString
#replaces: Cmd:opramp
Evalutes this parameter at the current frame and returns the result as a
ramp.

Raises [Hom:hou.TypeError] if the parameter is not a ramp.

::`evalAsRampAtFrame(self, frame)` -> [Hom:hou.Ramp]:


#cppname: HOM_Parm::evalAsString
#replaces: Cmd:opramp
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (6 of 15) [12/7/2009 4:31:54 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

Evalutes this parameter at a certain frame and returns the result as a


ramp.

Raises [Hom:hou.TypeError] if the parameter is not a ramp.

::`executeCallbacks(self)`:
#cppname: HOM_Parm::executeCallbacks
#status: ni
TODO: Do we need executeCallbacks now that we have pressButton?

::`pressButton(self)`:
#cppname: HOM_Parm::pressButton
Emulates clicking a button parameter to trigger its callback script.
Raises [Hom:hou.OperationFailed] if the callback script could not be
run.

::`expression(self)` -> `str`:


#cppname: HOM_Parm::expression
Returns this parameter's expression.

For example, a parameter might contain the Python expression "frame() \* 2".
In this case [Hom:hou.Parm#eval] at frame 2 would return the value 4,
while calling expression() would return the string "frame() \* 2".

If the parameter does not contain an expression, this method will raise
[Hom:hou.OperationFailed]. Also, if the parameter contains more than one
keyframe then it could contain multiple different expressions, so it also
raises [Hom:hou.OperationFailed] in that case.

This method is roughly equivalent to...


{{{
#!python
parm.keyframes()[0].expression()
}}}

See also the `setExpression()`, `expressionLanguage()`, `keyframes()`,


and `eval()` methods.

::`expressionLanguage(self)` -> [Hom:hou.exprLanguage] enum value:


#cppname: HOM_Parm::expressionLanguage
Returns the parameter's expression's language.

If the parameter does not contain an expression, this method will raise
[Hom:hou.OperationFailed]. Also, if the parameter contains more than one
keyframe then it could contain multiple different expressions, so it also
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (7 of 15) [12/7/2009 4:31:54 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

raises [Hom:hou.OperationFailed] in that case.

To change the expression language, use [Hom:hou.Parm#setExpression] and


explicitly specify the language:
`parm.setExpression(parm.expression(), language)`.

This method is roughly equivalent to...

{{{
#!python
parm.keyframes()[0].expressionLanguage()
}}}

See also the `expression()`, `setExpression()`, `keyframes()`,


and `setExpressionLanguage()` methods.

::`getReferencedParm(self)` -> [Hom:hou.Parm]:


#cppname: HOM_Parm::getReferencedParm
Returns the referenced parameter. If no paramter is referenced, returns
this parameter.

::`isAutoscoped(self)` -> `bool`:


#cppname: HOM_Parm::isAutoscoped
Returns whether this parameter's autoscope property is on.

::`isLocked(self)` -> `bool`:


#cppname: HOM_Parm::isLocked
Returns whether this parameter is locked (uneditable).

::`isParmReference(self)`:
#cppname: HOM_Parm::isParmReference
#status: ni

::`isPending(self)`:
#cppname: HOM_Parm::isPending
#status: ni

::`isSpare(self)` -> `bool`:


#cppname: HOM_Parm::isSpare
Returns whether this parameter is a "spare" (user-defined) parameter.

::`isTimeDependent(self)` -> `bool`:


#cppname: HOM_Parm::isTimeDependent
Returns whether this parameter is _time dependent_, that is, its
value changes depending on the point on the timeline at which it's
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (8 of 15) [12/7/2009 4:31:54 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

evaluated. For example the parameter has an expression containing


the `$F` (current frame number) variable.

::`isMultiParmInstance(self)` -> `bool`:


#cppname: HOM_Parm::isMultiParmInstance
Return whether this parameter is an instance of a multi parm. For example,
the `pt0x`, `pt1x`, `pt2x`, etc. parameters in an `add` SOP are instances
of a multiparm.

::`keyCurValueAtFrame(self, frame)`:
#cppname: HOM_Parm::keyCurValueAtFrame
#status: ni

::`keyframeForCurTime(self)` -> Keyframe:


#cppname: HOM_Parm::keyframeForCurTime
#status: ni

::`keyframes(self)` -> tuple of [Hom:hou.BaseKeyframe]:


#cppname: HOM_Parm::keyframes
Returns the keyframes on this parameter.

::`keyframesInRange(self, start_frame, end_frame)` -> tuple of [Hom:hou.BaseKeyframe]:


#cppname: HOM_Parm::keyframesInRange
#status: ni

::`language(self)`:
#cppname: HOM_Parm::language
#status: ni

::`lock(self, on)`:
#cppname: HOM_Parm::lock
Locks (`lock(True)`) or unlocks (`lock(False)`) this parameter
(this is, makes the value uneditable).

Raises [Hom:hou.PermissionError] if this parameter is part of a locked


digital asset.

::`menuItems(self)` -> tuple of `str`:


#cppname: HOM_Parm::menuItems
Returns a list of all possible menu items (for a menu parameter).
Raises [Hom:hou.OperationFailed] if this parameter is not a menu.

::`moveToIntegerKeyframes(self, mode)`:
#cppname: HOM_Parm::moveToIntegerKeyframes
#status: ni
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (9 of 15) [12/7/2009 4:31:54 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

::`name(self)` -> `str`:


#cppname: HOM_Parm::name
Returns this parameter's name.

::`node(self)` -> [Hom:hou.Node]:


#cppname: HOM_Parm::node
Returns the node on which this parameter exists.

::`overrideTrack(self)` -> [Hom:hou.Track] or None:


#cppname: HOM_Parm::overrideTrack
Returns the CHOP track overriding this parameter, if any.

::`parmTemplate(self)` -> [Hom:hou.ParmTemplate]:


#cppname: HOM_Parm::parmTemplate
Returns the template for this parameter.

::`path(self)` -> `str`:


#cppname: HOM_Parm::path
Returns the full path to this parameter.

::`pendingValue(self)`:
#cppname: HOM_Parm::pendingValue
#status: ni

::`refit(self, tolerance = 0.01)`:


#cppname: HOM_Parm::refit
#status: ni

::`removeFromScope(self)`:
#cppname: HOM_Parm::removeFromScope
#status: ni

::`reverse(self)`:
#cppname: HOM_Parm::reverse
#status: ni

::`reverseForRange(self, start_frame, end_frame)`:


#cppname: HOM_Parm::reverseForRange
#status: ni

::`revertToAndRestorePermanentDefaults(self)`:
#cppname: HOM_Parm::revertToAndRestorePermanentDefaults
Changes the value back to the default that ships with Houdini, and
restores that default.
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (10 of 15) [12/7/2009 4:31:54 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

See also the `revertToDefaults()` method, and


[Hom:hou.ParmTuple#revertToAndRestorePermanentDefaults]

::`revertToDefaults(self)`:
#cppname: HOM_Parm::revertToDefaults
Change the value back to the default(s).
See also the `revertToAndRestoreFactoryDefaults()` method.

::`set(self, value, language=None)`:


#cppname: HOM_Parm::set
Sets the parameter value at the current frame.

Raises [Hom:hou.TypeError] if the type of `value` does not match the


type of this parameter. Raises [Hom:hou.PermissionError] if this
parameter is not writable.

::`setAlias(self, alias_name)`:
#cppname: HOM_Parm::setAlias
Gives the parameter another name by which it can be referenced in
channels. You can pass in an empty string to remove an existing alias name.

::`setAsScope(self)`:
#cppname: HOM_Parm::setAsScope
#status: ni

::`setAutoscope(self, on)`:
#cppname: HOM_Parm::setAutoscope
Changes the autoscope property of the parameter. If this property is on,
this parameter is automatically scoped when the object is selected.

::`setExpression(self, expression, language=None, replace_expression=True)`:


#cppname: HOM_Parm::setExpression
Sets this parameter's expression.

expression:
A string containing the expression that will go inside the parameter.

language:
Either a [Hom:hou.exprLanguage] enumeration value or `None`.

If language is None and the parameter does not already contain an


expression, the language will be the node's expression language. (See
[Hom:hou.Node#expressionLanguage].) Otherwise, if language is None and
the parameter already has an expression, the expression language will
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (11 of 15) [12/7/2009 4:31:54 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

not change.

replace_expression:
This parameter only has effect if the parameter already contains
keyframes. If it is `True`, Houdini will replace the keyframe
before the current time with one containing the new expression.
Otherwise, it will always add a keyframe at the current time.
Note that this behaviour matches what happens when you edit an
expression from Houdini's parameter dialog.

Unlike [Hom:hou.Parm#set], this method does not follow channel references.


That is, if this parameter is referencing another parameter and you call
setExpression(), it change the channel reference expression into the
specified expression.

If the parameter does not already contain any keyframes, this method is
roughly equivalent to setting a keyframe at frame 1, where the keyframe's
expression and language are the ones specified.

This method can be approximately implemented as follows:

{{{
#!python
def setExpression(self, expression, language=None, replace_expression=None)
if self.template().type() == hou.parmTemplateType.String:
k = hou.StringKeyframe()
else:
k = hou.Keyframe()

k.setExpression(expression, language)

if len(self.keyframes()):
if replace_expression:
k.setTime(self.effectiveKeyframeAtFrame(hou.frame()).time())
else:
k.setTime(hou.time())
else
k.setTime(0.0)

self.setKeyframe(k)
}}}

See also the `expression`, `expressionLanguage`, and `setKeyframe`


methods, and [Hom:hou.Node#expressionLanguage].

http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (12 of 15) [12/7/2009 4:31:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

::`setKeyframe(self, keyframe)`:
#cppname: HOM_Parm::setKeyframe
Sets a keyframe on this parameter.

Raises [Hom:hou.TypeError] if `keyframe` is not of type


[Hom:hou.BaseKeyframe]. Raises [Hom:hou.PermissionError] if this parameter
is not writable.

::`setLanguage(self, language)`:
#cppname: HOM_Parm::setLanguage
#status: ni

::`setPending(self, value)`:
#cppname: HOM_Parm::setPending
Sets the parameter value at the current frame and marks it as pending if
the parameter is keyed.

Raises [Hom:hou.TypeError] if the type of `value` does not match this


parameter's type. Raises [Hom:hou.PermissionError] if this parameter is not
writable.

::`createClip(self, parent_node, name, create_new, apply_immediately, current_value_only)` -> [Hom:hou.ChopNode]:


#cppname: HOM_Parm::createClip
Creates a Channel CHOP representing this parameter. The Channel CHOP is
created with the given name as a child of the given parent node. The
parent_node is typically created via
[Hom:hou.Node#findOrCreateMotionEffectsNetwork].

create_new:
Always create a new Channel CHOP. If set to False, then if a Channel
CHOP already exists with the same name, it will be re-used. If the
parameter already exists on the Channel CHOP, the older parameter will
be removed first.

apply_immediately:
If set to True, then the export flag on the Channel CHOP will be set.

current_value_only:
If set to True, then only the current value of the parameter will be
stored.

See also [Hom:hou.Node#findOrCreateMotionEffectsNetwork].

::`stretch(self, num_frames_to_add)`:
#cppname: HOM_Parm::stretch
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (13 of 15) [12/7/2009 4:31:54 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

#status: ni

::`stretchSubrange(self, source_start_frame, source_end_frame, num_frames_to_add)`:


#cppname: HOM_Parm::stretchSubrange
#status: ni

::`tuple(self)` -> [Hom:hou.ParmTuple]:


#cppname: HOM_Parm::tuple
Returns the [Hom:hou.ParmTuple] associated with this parameter.

For example, calling this method on the Parm object for the translation
parameter "tx", would return a ParmTuple that contains Parm objects for the
three translation parameters "tx", "ty" and "tz". If no tuple is associated
with the parameter, then the parameter itself is returned in a tuple of size
1.

::`type(self)` -> parmTemplateType:


#cppname: HOM_Parm::type
#status: ni

::`unexpandedString(self)` -> `str`:


#cppname: HOM_Parm::unexpandedString
Returns the contents of the parameter before dollar sign and backtick
expansion.

Examples of unexpanded strings would be "image$F.pic", "$HIP/split.otl",


or "`chs('../font1/text')`". If you were to call `eval()`
on them, Houdini would perform variable expansion and backtick expression
evaluation, so you would get back something like "image1.pic" instead of
"image$F.pic".

Because only string parameters will attempt to do dollar sign and string
expansion, this method will raise hou.OperationFailed if called from a
non-string parameter.

Suppose a string parameter contains keyframes. In this situation, Houdini


will not attempt to do string expansion on the parameter's value, so calling
this method will raise hou.OperationFailed. Instead of calling this method,
you can call `expression()` to access the first Keyframe's expression. If
there are multiple keyframes, you can call `keyframes()` to get a list of
[Hom:hou.StringKeyframe] objects and call `expression()` on those objects to
retrieve the expression.

@replaces

http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (14 of 15) [12/7/2009 4:31:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm

- [Cmd:chadd]
- [Cmd:chalias]
- [Cmd:chautoscope]
- [Cmd:chkey]
- [Cmd:chkeyget]
- [Cmd:chkeyls]
- [Cmd:chlock]
- [Cmd:chrefit]
- [Cmd:chreverse]
- [Cmd:chrm]
- [Cmd:chround]
- [Cmd:chscope]
- [Cmd:chstretch]
- [Cmd:opparm]
- [Cmd:opscript]
- [Exp:ch]
- [Exp:chf]
- [Exp:chs]
- [Exp:chsraw]
- [Exp:cht]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Parm (15 of 15) [12/7/2009 4:31:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmGroup

= hou.ParmGroup =
#type: homclass
#cppname: HOM_ParmGroup
#category: Parameters
#status: ni

@methods

::`addChildGroup(self, group_name)`:
#cppname: HOM_ParmGroup::addChildGroup
#status: ni

::`addNodesParms(self, node)`:
#cppname: HOM_ParmGroup::addNodesParms
#status: ni

::`addParm(self, parm)`:
#cppname: HOM_ParmGroup::addParm
#status: ni

::`allParms(self)` -> tuple of Parms:


#cppname: HOM_ParmGroup::allParms
#status: ni

::`asCode(self)`:
#cppname: HOM_ParmGroup::asCode
#status: ni

::`childGroups(self)` -> tuple of ParmGroups:


#cppname: HOM_ParmGroup::childGroups
#status: ni

::`clear(self)`:
#cppname: HOM_ParmGroup::clear
#status: ni

::`moveToNextKeyInGroup(self)`:
#cppname: HOM_ParmGroup::moveToNextKeyInGroup
#status: ni

::`moveToPreviousKeyInGroup(self)`:
#cppname: HOM_ParmGroup::moveToPreviousKeyInGroup

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmGroup (1 of 2) [12/7/2009 4:31:55 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmGroup

#status: ni

::`onlyTopLevelParms(self)` -> tuple of Parms:


#cppname: HOM_ParmGroup::onlyTopLevelParms
#status: ni

::`removeChildGroup(self, group_name)`:
#cppname: HOM_ParmGroup::removeChildGroup
#status: ni

::`removeParm(self, parm)`:
#cppname: HOM_ParmGroup::removeParm
#status: ni

@replaces

- [Cmd:chgadd]
- [Cmd:chgls]
- [Cmd:chgop]
- [Cmd:chgpopulate]
- [Cmd:chgrm]
- [Cmd:nextkey]
- [Exp:chgroup]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmGroup (2 of 2) [12/7/2009 4:31:55 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple

= hou.ParmTuple =
#type: homclass
#cppname: HOM_ParmTuple
#category: Parameters

"""A tuple of one or more node parameters. Each parameter tuple has a unique
name within its node."""

The ParmTuple class behaves like a Python sequence, so you can index into it
using square brackets, iterate over it, call `len` on it, etc. The elements
inside the parameter tuple are [Hom:hou.Parm] objects.

A parameter tuple's name may only contain letters, numbers, and underscores.
For example, objects contain a parameter tuple named `"t"` that contains three
integer parameters. The names of the parameters inside the tuple are
determined from the parameter tuple's name and its naming scheme. For example,
the `"t"` parameter uses the XYZW naming scheme, so the three parameters inside
it are named `"tx"`, `"ty"`, and `"tz"`. Note that if the parameter tuple
only contains one parameter, the tuple and the parameter inside it may have the
same name.

In addition to a name, a parameter tuple also has a label that is displayed to


the user in the parameter dialog. For example, the `"t"` parameter's label is
`"Translate"`. The label may contain spaces and punctuation characters.

Each parameter in a tuple stores a value. Different instances of parm tuples


in different nodes will store their own set of parameter values. The value in
a parameter may be animated, in which case the parameter evaluates to a
different result depending on the current time on the playbar. See
[Hom:hou.Keyframe] for more information about animated parameters.

Each [Hom:hou.NodeType] has a set of parameter tuple descriptions associated


with it, and each instance of a [Hom:hou.Node] has a corresponding set of
parameter tuple instances. The parameter tuples store specific values that
are saved with the node. The descriptions of the parameter tuples, however,
are represented by a [Hom:hou.ParmTemplate]. A parameter template describes
the type, default values, ranges, etc. of a parameter tuple.

See also [Hom:hou.parmTuple_] and [Hom:hou.Node#parmTuple].

@methods

::`__getitem__(self, index)` -> [Hom:hou.Parm]:


#cppname: HOM_ParmTuple::__getitem__
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple (1 of 10) [12/7/2009 4:31:58 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple

Return the Parm object for the specified component of this parameter tuple.
Negative indices will index from the end.

This method makes instances of this class appear like a tuple, and lets
you iterate over the parms in a ParmTuple.

Raises IndexError if the index is not valid.

{{{
#!pycon
>>> parm_tuple = hou.node("/obj").createNode("geo").parmTuple("t")
>>> for parm in parm_tuple:
... print parm.name(),
tx ty tz
>>> tuple(parm_tuple)
(<hou.Parm tx in /obj/geo1>, <hou.Parm ty in /obj/geo1>, <hou.Parm tz in /obj/geo1>)
}}}

::`__len__(self)` -> `int`:


#cppname: HOM_ParmTuple::__len__
Return the number of [Hom:hou.Parm]s in this parameter tuple.

::`name(self)` -> `str`:


#cppname: HOM_ParmTuple::name
#replaces: Cmd:opparm
Return the name of this parameter tuple. Note that the parameter tuple's
name and its naming scheme determine the names of the parameters inside it.

{{{
#!pycon
>>> node = hou.node("/obj").createNode("geo")
>>> node.parmTuple("t").parmTemplate().namingScheme()
parmNamingScheme.XYZW
>>> [parm.name() for parm in node.parmTuple("t")]
['tx', 'ty', 'tz']

>>> parm_tuple = node.parent().createNode("cam").parmTuple("dcolor")


>>> parm_tuple.parmTemplate().namingScheme()
parmNamingScheme.RGBA
>>> [parm.name() for parm in parm_tuple]
['dcolorr', 'dcolorg', 'dcolorb']
}}}

::`description(self)` -> `str`:


#cppname: HOM_ParmTuple::description
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple (2 of 10) [12/7/2009 4:31:58 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple

#replaces: Cmd:opparm
Return this parameter tuple's label that is displayed in the parameter
dialog.

::`node(self)` -> [Hom:hou.Node]:


#cppname: HOM_ParmTuple::node
Return the node containing this parameter tuple.

::`parmTemplate(self)` -> [Hom:hou.ParmTemplate]:


#cppname: HOM_ParmTuple::parmTemplate
Return this parameter tuple's template.

::`eval(self)` -> tuple of `int`, `float`, `str`, or [Hom:hou.Ramp]:


#cppname: HOM_ParmTuple::eval
#replaces: Exp:chramp, Exp:ch, Exp:chs
Evalute this parameter tuple at the current frame and returns the result as
a tuple of integers, floats or strings, or a [Hom:hou.Ramp] object,
depending on the type of the parameter.

See also [Hom:hou.ParmTuple#evalAtFrame].

::`evalAtFrame(self, frame)` -> tuple of `int`, `float`, `str`, or [Hom:hou.Ramp]:


#cppname: HOM_ParmTuple::evalAtFrame
Evalutes the parameter tuple at a certain frame and returns the result as a
tuple of integers, floats, strings, or a Ramp object, depending on the type
of the parameter.

::`evalAsFloats(self)` -> tuple of `float`:


#cppname: HOM_ParmTuple::evalAsFloats
Evaluates this parameter tuple at the current frame and returns the result
as a tuple of floats.

Raises [Hom:hou.TypeError] if a value cannot be converted to a float.

::`evalAsFloatsAtFrame(self, frame)` -> tuple of `float`:


#cppname: HOM_ParmTuple::evalAsFloatsAtFrame
Evaluates this parameter tuple at a certain frame and returns the result as
a tuple of floats.

Raises [Hom:hou.TypeError] if a value cannot be converted to a float.

::`evalAsInts(self)` -> tuple of `int`:


#cppname: HOM_ParmTuple::evalAsInts
Evaluates this parameter tuple at the current frame and returns the result
as a tuple of integers.
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple (3 of 10) [12/7/2009 4:31:58 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple

Raises [Hom:hou.TypeError] if a value cannot be converted to an integer.

::`evalAsIntsAtFrame(self, frame)` -> tuple of `int`:


#cppname: HOM_ParmTuple::evalAsIntsAtFrame
Evaluates this parameter tuple at a certain frame and returns the result as
a tuple of integers.

Raises [Hom:hou.TypeError] if a value cannot be converted to an integer.

::`evalAsRamps(self)` -> [Hom:hou.Ramp]:


#cppname: HOM_ParmTuple::evalAsRamps
Evaluates this parameter tuple at the current frame and returns the result
as a tuple containing a [Hom:hou.Ramp] object.

Raises [Hom:hou.TypeError] if this is not a ramp parameter.

::`evalAsRampsAtFrame(self, frame)` -> [Hom:hou.Ramp]:


#cppname: HOM_ParmTuple::evalAsRampsAtFrame
Evaluates this parameter tuple at a certain frame and returns the result as
a tuple containing a [Hom:hou.Ramp] object.

Raises [Hom:hou.TypeError] if this is not a ramp parameter.

::`evalAsStrings(self)` -> tuple of `str`:


#cppname: HOM_ParmTuple::evalAsStrings
Evaluates this parameter tuple at the current frame and returns the result
as a tuple of strings.

Raises [Hom:hou.TypeError] if a value cannot be converted to a string.

::`evalAsStringsAtFrame(self, frame)` -> tuple of `str`:


#cppname: HOM_ParmTuple::evalAsStringsAtFrame
Evaluates the parameter tuple at a frame and returns the result as a tuple
of strings.

Raises [Hom:hou.TypeError] if a value cannot be converted to a string.

::`set(self, values)`:
#cppname: HOM_ParmTuple::set
#replaces: Cmd:opparm
Sets the value of a parameter in the tuple at the current frame.

values:
A sequence of floats or strings, corresponding to the components of
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple (4 of 10) [12/7/2009 4:31:58 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple

this parameter tuple.

For example, the parameter tuple for "translation" contains Parm objects for
translation along each of the axes, "tx", "ty" and "tz". If set is called
with following tuple of floats, (2.5, 4.0, 5.5), then the parameter "tx"
with be set to 2.5, "ty" will be set to 4.0 and "tz" will be set to 5.5.

Raises [Hom:hou.InvalidSize] if `values` has a different length than this


parameter tuple. Raises [Hom:hou.PermissionError] if any of the parameters
in this parameter tuple are not writable.

::`setPending(self, values)`:
#cppname: HOM_ParmTuple::setPending
#replaces: Cmd:opparm
Sets the value of a parameter in the tuple at the current frame and marks
it as pending if the parameter is keyed.

values:
A sequence of floats or strings, corresponding to the components of
this parameter tuple.

For example, the parameter tuple for "translation" contains Parm objects for
translation along each of the axes, "tx", "ty" and "tz". If set is called
with following tuple of floats, (2.5, 4.0, 5.5), then the parameter "tx"
with be set to 2.5, "ty" will be set to 4.0 and "tz" will be set to 5.5.

Raises [Hom:hou.InvalidSize] if `values` has a different length than this


parameter tuple. Raises [Hom:hou.PermissionError] if any of the parameters
in this parameter tuple are not writable.

::`deleteAllKeyframes(self)`:
#cppname: HOM_ParmTuple::deleteAllKeyframes
Remove all the keyframes from this parameter tuple.

This method be approximately implemented as follows:


{{{
#!python
def deleteAllKeyframes(self):
for parm in self:
parm.deleteAllKeyframes()
}}}

See also [Hom:hou.Parm#deleteAllKeyframes].

::`revertToAndRestorePermanentDefaults(self)`:
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple (5 of 10) [12/7/2009 4:31:58 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple

#cppname: HOM_ParmTuple::revertToAndRestorePermanentDefaults
Changes the value back to the defaults that ship with Houdini, and
restore those defaults.

See also the `revertToDefaults()` method.

::`revertToDefaults(self)`:
#cppname: HOM_ParmTuple::revertToDefaults
Changes the value back to the default(s).
See also the `revertToAndRestoreFactoryDefaults()` method.

::`isSpare(self)` -> `bool`:


#cppname: HOM_ParmTuple::isSpare
Returns whether the parameter is a "spare" (user-defined) parameter.

::`isMultiParmInstance(self)` -> `bool`:


#cppname: HOM_ParmTuple::isMultiParmInstance
Return whether this parameter is an instance of a multi parm. For example,
the `pt0`, `pt1`, `pt2`, etc. parameter tuples in an `add` SOP are
instances of a multiparm.

::`lock(self, bool_values)`:
#cppname: HOM_ParmTuple::lock
#replaces: Cmd:chlock
Lock or unlock all the parameters in this tuple. Houdini displays locked
parameters as disabled and does not let you change their values.

bool_values:
A sequence of `True` or `False` values, where each value corresponds
to a component of this parameter. Where an element of `bool_values`
is `True`, that component will be locked (uneditable), and where
an element is `False`, the corresponding component will be unlocked
(editable).

For example, the parameter tuple for "translation" contains Parm objects for
translation along each of the axes, "tx", "ty" and "tz". If lock is called
with the following tuple of boolean values, (True, True, False), then the
parameter "tx" and "ty" will be locked and made non-editable, while "tz"
will be unlocked and made editable.

Raises [Hom:hou.InvalidSize] if `bool_values` has a different length than


this parameter tuple. Raises [Hom:hou.PermissionError] if any of the
parameters in this parameter tuple are not writable.

::`hide(self, on)`:
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple (6 of 10) [12/7/2009 4:31:58 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple

#cppname: HOM_ParmTuple::hide
Show or hide this parameter tuple in its node. Calling this method is
equivalent to changing the `Invisible` checkbox on the `Edit Parameter
Interface` dialog.

To change the visibility of all new instances of the node type, use
[Hom:hou.HDADefinition#replaceParmTuple].

::`setAutoscope(self, bool_values)`:
#cppname: HOM_ParmTuple::setAutoscope
#replaces: Cmd:chautoscope
Changes the autoscope property of components of this parameter tuple.

bool_values:
A sequence of `True` or `False` values, where each value corresponds
to a component of this parameter. Where an element of `bool_values`
is `True`, that component will be autoscope.

For example, the parameter tuple for "translation" contains Parm objects for
translation along each of the axes, "tx", "ty" and "tz". If setAutoscope is
called with the following tuple of boolean values, (True, True, False), then
the parameter "tx" and "ty" will be automatically scoped, while "tz" will
not.

Raises [Hom:hou.InvalidSize] if `values` has a different length than this


parameter tuple. Raises [Hom:hou.PermissionError] if any of the parameters
in this parameter tuple are not writable.

::`createClip(self, parent_node, name, create_new, apply_immediately, current_value_only)` -> [Hom:hou.ChopNode]:


#cppname: HOM_ParmTuple::createClip
Creates a Channel CHOP representing this parameter. The Channel CHOP is
created with the given name as a child of the given parent node. The
parent_node is typically created via
[Hom:hou.Node#findOrCreateMotionEffectsNetwork].

create_new:
Always create a new Channel CHOP. If set to False, then if a Channel
CHOP already exists with the same name, it will be re-used. If the
parameter already exists on the Channel CHOP, the older parameter will
be removed first.

apply_immediately:
If set to True, then the export flag on the Channel CHOP will be set.

current_value_only:
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple (7 of 10) [12/7/2009 4:31:58 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple

If set to True, then only the current value of the parameter will be
stored.

See also [Hom:hou.Node#findOrCreateMotionEffectsNetwork].

::`asCode(self, brief=False, save_values=True, save_keyframes=True, save_keys_in_frames=False, save_flag_values=True, save_aliases=True, function_name=None)` -> `str`:
#cppname: HOM_Parm::asCode
Returns a script of Python statements that can be executed to
set the parameter tuple's values, flags and other properties.
To run the script, use either Python's `exec` or `execfile` functions.

`brief`:
When <<brief>> is True, the output script omits commands for
setting values and flags that are set to the factory defaults.
The script also omits keyframe commands that set unused
values, slopes and accelerations. The value of <<brief>> must
be either True or False.
`save_values`:
When <<save_values>> is True, `asCode` outputs commands
for setting the parameter tuple's values. The value of
<<save_values>> must be either True or False.

`save_keyframes`:
When <<save_keyframes>> is True, `asCode` outputs commands
for creating the parameter tuple's keyframes (if any). The value
of <<save_keyframes>> must be either True or False.

`save_keys_in_frames`:
When <<save_keys_in_frames>> is True, `asCode` outputs commands
for setting channel and key times in samples (frames) instead
of seconds. This parameter has no effect if <<save_keyframes>>
is set to False. The value of <<save_keys_in_frames>> must be either
True or False.

`save_flag_values`:
When <<save_flag_values>> is True, `asCode` outputs commands
for setting the parameter tuple's flag values. The value of
<<save_flag_values>> must be either True or False.

`save_aliases`:
When <<save_aliases>> is True, `asCode` outputs commands for
setting the parameter tuple's channel aliases. The value of
<<save_aliases>> must be either True or False.

`function_name`:
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple (8 of 10) [12/7/2009 4:31:58 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple

If <<function_name>> is specified, then the output script


is wrapped in a Python function definition with the given name.
<<function_name>> must be a non-zero length string consisting of
only alphanumeric and underscore characters. Any invalid characters
are internally converted to underscores.

The wrapper function takes in a single argument which must be a


reference to an existing node parameter tuple. For symmetry,
the function also returns the parameter tuple reference.

Here is an example of saving the output to a file and then loading


it back into Houdini:
{{{
#!python
# Get a reference to the target parameter tuple.
pt = hou.parmTuple("/obj/geo1/t")

# Execute asCode and write the output script to file.


script = pt.asCode()
f = open("set_parm_tuple_properties.py", "w")
f.write(script)
f.close()

# Execute the script. This will set the values, flag values
# and other properties on /obj/geo1's t parameter tuple. It will
# also store a reference to the t parameter tuple into a variable
# named 'hou_parm_tuple'.
execfile("set_parm_tuple_properties.py")
}}}

Here is an example of saving the output into a function and then


calling it in Houdini:
{{{
#!python
# Get a reference to the target parameter tuple.
node = hou.parmTuple("/obj/geo1/t")

# Execute asCode and write the function definition to file.


func = p.asCode(function_name="setParmTupleProperties")
f = open("parmtuplelib.py", "w")
f.write(func)
f.close()

# Call the function definition to set the properties on another


# parameter tuple.
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple (9 of 10) [12/7/2009 4:31:58 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple

import parmtuplelib
hou_parm_tuple = parmtuplelib.setParmTupleProperties(node.parm("t"))
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmTuple (10 of 10) [12/7/2009 4:31:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ch

= hou.ch =

#type: homfunction
#cppname: hom::ch
#category: Parameters

"""The same as evalParm(). Provided for backward compatibility."""

@usage
`ch(path)` -> int, float, or string

@related

- [Hom:hou.evalParm]
- [Hom:hou.evalParmTuple]
- [Hom:hou.chsop]
- [Hom:hou.parm]
- [Hom:hou.parmTuple]

@replaces

- [Exp:ch]
- [Exp:chs]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ch [12/7/2009 4:31:59 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/chsop

= hou.chsop =

#type: homfunction
#cppname: hom::chsop
#category: Parameters

"""Evaluate a parameter that references a node, and return the absolute


path to the node."""

@usage
`chsop(path) -> string`

@related

- [Hom:hou.evalParm]

@replaces

- [Exp:chsop]

http://www.sidefx.com/docs/houdini10.0/hom/hou/chsop [12/7/2009 4:31:59 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/evalParm

= hou.evalParm =

#type: homfunction
#cppname: hom::evalParm
#category: Parameters

"""Evaluate a parameter, given either an absolute or a relative path to


it. Relative path searches are done from the node returned by . This
function is a shortcut for hou.parm(path).eval()."""

@usage
`evalParm(path)` -> int, float, or string

The return type will depend on the type of the parameter.

When a parameter is evaluating, [Hom:hou.pwd] returns the node


containing that parameter, so hou.evalParm() can be used inside
expressions to perform relative parameter references.

This function throws a hou.NotAvailable exception if you call it from


mplay.

@related

- [Hom:hou.evalParmTuple]
- [Hom:hou.parm]
- [Hom:hou.parmTuple]

@replaces

- [Exp:ch]
- [Exp:chs]

http://www.sidefx.com/docs/houdini10.0/hom/hou/evalParm [12/7/2009 4:32:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/evalParmTuple

= hou.evalParmTuple =

#type: homfunction
#cppname: hom::evalParmTuple
#category: Parameters

"""Evaluate a parameter, given either an absolute or a relative path to


it. Relative path searches are done from the node returned by . This
function is a shortcut for hou.parmTuple(path).eval()."""

@usage
`evalParmTuple(path)` -> tuple of `int`, `float`, or `str`, or [Hom:hou.Ramp]

The return type will depend on the type of the parameter.

When a parameter is evaluating, [Hom:hou.pwd] returns the node


containing that parameter, so hou.evalParmTuple() can be used inside
expressions to perform relative parameter references.

This function throws a hou.NotAvailable exception if you call it from


mplay.

@related

- [Hom:hou.evalParm]
- [Hom:hou.parm]
- [Hom:hou.parmTuple]

@replaces

- [Exp:ch]
- [Exp:chramp]
- [Exp:chs]

http://www.sidefx.com/docs/houdini10.0/hom/hou/evalParmTuple [12/7/2009 4:32:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/exprLanguage

= hou.exprLanguage =
#type: hommodule
#cppname: HOM_exprLanguage
#category: Parameters

"""Enumeration of available expression languages."""

* hou.exprLanguage.Python
* hou.exprLanguage.Hscript

http://www.sidefx.com/docs/houdini10.0/hom/hou/exprLanguage [12/7/2009 4:32:01 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/fileType

= hou.fileType =
#type: hommodule
#cppname: HOM_fileType
#category: Parameters
#status: nd

"""Enumeration of file types."""

* hou.fileType.Any
* hou.fileType.Image
* hou.fileType.Geometry
* hou.fileType.Ramp
* hou.fileType.Capture
* hou.fileType.Clip
* hou.fileType.Lut
* hou.fileType.Cmd
* hou.fileType.Midi
* hou.fileType.I3d
* hou.fileType.Chan
* hou.fileType.Sim
* hou.fileType.SimData
* hou.fileType.Hip
* hou.fileType.Otl
* hou.fileType.Dae
* hou.fileType.Gallery
* hou.fileType.Directory

@related

- [Hom:hou.ui.selectFile]

http://www.sidefx.com/docs/houdini10.0/hom/hou/fileType [12/7/2009 4:32:01 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/loadParmSamples

= hou.loadParmSamples =

#type: homfunction
#cppname: hom::loadParmSamples
#category: Parameters
#status: ni

@usage
`loadParmSamples(chan_or_bchan_file_name, parm_list)`

@replaces
- [Cmd:chread]

http://www.sidefx.com/docs/houdini10.0/hom/hou/loadParmSamples [12/7/2009 4:32:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/lvar

= hou.lvar =
#type: homfunction
#cppname: hom::lvar
#category: Parameters

"""Return the value of a node's local variable. Call this function from
expressions inside node parameters."""

@usage
`lvar(name)` -> float

Many SOP and POP algorithms involve iterating over a series of points
(or primitives or vertices, but we'll use points for the examples). These
SOP and POP nodes evaluate their parameters for each point, setting
a variable that you can access from an expression in that parameter to
a value specific to that point. For example, the TX variable is set to
evaluate to the X value of the position of the current point. These variables
are called local variables because they are local to the expressions inside
parameters in the node.

In the Hscript expression language, you use $ to evaluate local variables,


just like how you evaluate global variables. In Python, you use
the lvar function. So, the Python equivalent of `$TX` is `lvar("TX")`.

TIP:
Inside a parameter expression you can drop the `hou.` prefix from the
call to lvar, since Houdini implicitly runs `from hou import *` when
it evaluates expressions.

If you call this function from outside a parameter expression it will raise
[Hom:hou.NotAvailable]. If you call it with an invalid variable name,
it will raise [Hom:hou.OperationFailed]. Note that you cannot use this
function to evaluate Houdini global variables; instead use
[Hom:hou.expandString].

Note that [Hom:hou.SopNode#curPoint] and similar methods on the


[Hom:hou.SopNode] and [Hom:hou.PopNode] classes return the current point
that the node is iterating over. Using the point, you can evaluate attributes,
etc, to perform the equivalent of a local variable. You can also access
information that may not be accessible through local variables.

@related

http://www.sidefx.com/docs/houdini10.0/hom/hou/lvar (1 of 2) [12/7/2009 4:32:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/lvar

- [Hom:hou.SopNode#curPoint]
- [Hom:hou.SopNode#curPoint2]
- [Hom:hou.SopNode#curPrim]
- [Hom:hou.SopNode#curPrim2]
- [Hom:hou.SopNode#curVertex]
- [Hom:hou.SopNode#curVertex2]
- [Hom:hou.PopNode#curPoint]
- [Hom:hou.expandString]

http://www.sidefx.com/docs/houdini10.0/hom/hou/lvar (2 of 2) [12/7/2009 4:32:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/parm_

= hou.parm =
#type: homfunction
#cppname: hom::parm
#category: Parameters

"""Given a path string, return a Parm object. Return None if the path
does not refer to a parameter."""

@usage
`parm(path)` -> [Hom:hou.Parm] or `None`

If the path starts with a `/`, Houdini will look for a parameter with
that exact path. Otherwise, the Houdini searches relative to the current node
path. For each occurrence of `..` in the path, Houdini will move up one node
from the current node location.

{{{
#!pycon
>>> node = hou.node("/obj").createNode("geo")
>>> node.path()
'/obj/geo1'
>>> hou.parmTuple("/obj/geo1/t")
<hou.ParmTuple t in /obj/geo1>
>>> hou.parmTuple("/obj/geo1/t")[0]
<hou.Parm tx in /obj/geo1>
>>> hou.parm("/obj/geo1/tx")
<hou.Parm tx in /obj/geo1>
>>> hou.setPwd(node)
>>> hou.parm("t")
<hou.Parm tx in /obj/geo1>
}}}

Raises [Hom:hou.NotAvailable] if you call it from MPlay.

@related

- [Hom:hou.Parm]
- [Hom:hou.evalParm]
- [Hom:hou.parmTuple_]

@replaces

http://www.sidefx.com/docs/houdini10.0/hom/hou/parm_ (1 of 2) [12/7/2009 4:32:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/parm_

- [Exp:ch]
- [Exp:chs]
- [Exp:chexist]

http://www.sidefx.com/docs/houdini10.0/hom/hou/parm_ (2 of 2) [12/7/2009 4:32:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/parmTuple_

= hou.parmTuple =
#type: homfunction
#cppname: hom::parmTuple
#category: Parameters

"""Given a path string, return a ParmTuple object. Return None if the path
does not refer to a parameter tuple."""

@usage
`parmTuple(path)` -> [Hom:hou.ParmTuple] or `None`

If the path starts with a `/`, Houdini will look for a parameter tuple with
that exact path. Otherwise, the Houdini searches relative to the current node
path. For each occurrence of `..` in the path, Houdini will move up one node
from the current node location.

When a parameter is evaluating, [Hom:hou.pwd] returns the node


containing that parameter, so hou.parmTuple() can be used inside
expressions to perform relative parameter references.

{{{
#!pycon
>>> node = hou.node("/obj").createNode("geo")
>>> node.path()
'/obj/geo1'
>>> hou.parmTuple("/obj/geo1/t")
<hou.ParmTuple t in /obj/geo1>
>>> hou.setPwd(node)
>>> hou.parmTuple("tx")
<hou.ParmTuple t in /obj/geo1>
}}}

Raises [Hom:hou.NotAvailable] if you call it from MPlay.

@related

- [Hom:hou.ParmTuple]
- [Hom:hou.evalParmTuple]
- [Hom:hou.parm_]

@replaces

http://www.sidefx.com/docs/houdini10.0/hom/hou/parmTuple_ (1 of 2) [12/7/2009 4:32:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/parmTuple_

- [Exp:ch]
- [Exp:chexist]
- [Exp:chramp]
- [Exp:chs]

http://www.sidefx.com/docs/houdini10.0/hom/hou/parmTuple_ (2 of 2) [12/7/2009 4:32:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/saveParmSamples

= hou.saveParmSamples =

#type: homfunction
#cppname: hom::saveParmSamples
#category: Parameters
#status: ni

@usage
`saveParmSamples(parm_list, chan_or_bchan_file_name, frame_range=None)`

@replaces
- [Cmd:chwrite]

http://www.sidefx.com/docs/houdini10.0/hom/hou/saveParmSamples [12/7/2009 4:32:04 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/scope

= hou.scope =
#type: hommodule
#cppname: HOM_scope
#category: Parameters
#status: ni

@functions

::`addParms(parm_list)`:
#cppname: HOM_scope::addParms
#status: ni

::`clear()`:
#cppname: HOM_scope::clear
#status: ni

::`parms()` -> tuple of Parms:


#cppname: HOM_scope::parms
#status: ni

::`pinParms(parm_list)`:
#cppname: HOM_scope::pinParms
#status: ni

::`removeParms(parm_list)`:
#cppname: HOM_scope::removeParms
#status: ni

::`scopedParmsOfNode(node)` -> tuple of Parms:


#cppname: HOM_scope::scopedParmsOfNode
#status: ni

::`setToParms(parm_list)`:
#cppname: HOM_scope::setToParms
#status: ni

::`unpinParms(parm_list)`:
#cppname: HOM_scope::unpinParms
#status: ni

@replaces

http://www.sidefx.com/docs/houdini10.0/hom/hou/scope (1 of 2) [12/7/2009 4:32:04 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/scope

- [Cmd:chaneditor]
- [Cmd:chscope]

http://www.sidefx.com/docs/houdini10.0/hom/hou/scope (2 of 2) [12/7/2009 4:32:04 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/scriptLanguage

= hou.scriptLanguage =
#type: hommodule
#cppname: HOM_scriptLanguage
#category: Parameters
#status: nd

"""Enumeration of available script languages."""

* hou.scriptLanguage.Python
* hou.scriptLanguage.Hscript

http://www.sidefx.com/docs/houdini10.0/hom/hou/scriptLanguage [12/7/2009 4:32:04 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/topLevelParmGroup

= hou.topLevelParmGroup =

#type: homfunction
#cppname: hom::topLevelParmGroup
#category: Parameters
#status: ni

@usage
`topLevelParmGroup()` -> ParmGroup

@replaces
- [Cmd:chgls]

http://www.sidefx.com/docs/houdini10.0/hom/hou/topLevelParmGroup [12/7/2009 4:32:05 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/updateMode

= hou.updateMode =
#type: hommodule
#cppname: HOM_updateMode
#category: Parameters
#status: nd

"""Enumeration of interface update modes."""

* hou.updateMode.AutoUpdate
* hou.updateMode.OnMouseUp
* hou.updateMode.Manual

http://www.sidefx.com/docs/houdini10.0/hom/hou/updateMode [12/7/2009 4:32:05 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ActiveRender

= hou.ActiveRender =
#type: homclass
#cppname: HOM_ActiveRender
#category: Rendering
#status: ni

@methods

::`command(self)`:
#cppname: HOM_ActiveRender::command
#status: ni

::`frame(self)`:
#cppname: HOM_ActiveRender::frame
#status: ni

::`host(self)`:
#cppname: HOM_ActiveRender::host
#status: ni

::`isSuspended(self)` -> `bool`:


#cppname: HOM_ActiveRender::isSuspended
#status: ni

::`kill(self)`:
#cppname: HOM_ActiveRender::kill
#status: ni

::`processId(self)`:
#cppname: HOM_ActiveRender::processId
#status: ni

::`resume(self)`:
#cppname: HOM_ActiveRender::resume
#status: ni

::`suspend(self)`:
#cppname: HOM_ActiveRender::suspend
#status: ni

@replaces

http://www.sidefx.com/docs/houdini10.0/hom/hou/ActiveRender (1 of 2) [12/7/2009 4:32:06 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ActiveRender

- [Cmd:rkill]
- [Cmd:rps]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ActiveRender (2 of 2) [12/7/2009 4:32:06 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/RenderMachineVariable

= hou.RenderMachineVariable =
#type: homclass
#cppname: HOM_RenderMachineVariable
#category: Rendering
#status: ni

@methods

::`hostRestriction(self)`:
#cppname: HOM_RenderMachineVariable::hostRestriction
#status: ni

::`name(self)`:
#cppname: HOM_RenderMachineVariable::name
#status: ni

::`setValue(self, value)`:
#cppname: HOM_RenderMachineVariable::setValue
#status: ni

::`value(self)`:
#cppname: HOM_RenderMachineVariable::value
#status: ni

@replaces

- [Cmd:rexport]

http://www.sidefx.com/docs/houdini10.0/hom/hou/RenderMachineVariable [12/7/2009 4:32:06 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/RopNode

= hou.RopNode =
#type: homclass
#cppname: HOM_RopNode
#superclass: hou.Node
#category: Rendering

"""Represents a render output node."""

@methods

::`bypass(self, on)`:
#cppname: HOM_RopNode::bypass
Turns the node's bypass flag on or off, making this node have no effect.

::`inputDependencies(self)` -> (tuple of [Hom:hou.RopNode], tuple of tuples of `float`):


#cppname: HOM_RopNode::inputDependencies
Returns the input dependencies of the ROP node, consisting of ROPs, and
the frames that need to be be rendered prior to rendering the ROP.

This method returns a tuple of two elements:

- The first element is a sequence of the [Hom:hou.RopNode] objects


representing the input dependencies.

- The second element is a sequence, where each element corresponds to the


RopNode object at the same position in the first sequence, and is a
sequence of floats representing the frames that must be rendered for the
corresponding RopNode.

::`isBypassed(self)` -> `bool`:


#cppname: HOM_RopNode::isBypassed
Returns whether this node's bypass flag is on.

::`isLocked(self)` -> `bool`:


#cppname: HOM_RopNode::isLocked
Returns whether this node's lock flag is on.

::`render(self, frame_range=(), res=(), output_file=None, output_format=None, to_flipbook=False, quality=2, ignore_inputs=False, method=RopByRop, ignore_bypass_flags=False, ignore_lock_flags=False)`:
#cppname: HOM_RopNode::render
Renders this node and optionally any of its inputs. Inputs are
recursively processed (unless `ignore_inputs` is `True`), so that all
descendents are rendered in the proper order before this node is
rendered.

frame_range:
Sequence of 2 or 3 values, overrides the frame range and frame increment
to render. The first two values specify the start and end frames, and
the third value (if given) specifies the frame increment. If no frame
increment is given and the ROP node doesn't specify a frame increment,
then a value of 1 will be used. If no frame range is given, and the ROP
node doesn't specify a frame range, then the current frame will be
rendered.
http://www.sidefx.com/docs/houdini10.0/hom/hou/RopNode (1 of 2) [12/7/2009 4:32:07 PM]
http://www.sidefx.com/docs/houdini10.0/hom/hou/RopNode

res:
Sequence of two scaling factors that will be used to scale the
resolution of the image, along the x- and y-axes. The
scaling factors will be applied to the node and all dependencies that
are also rendered.

output_file:
Overrides the location to which the image is written.

output_format:
Overrides the format of the image.

to_flipbook:
If `True`, renders this node to a flipbook.

quality:
Overrides the render quality.

ignore_inputs:
If `True`, renders only this node (does not render any of its
dependencies).

method:
Either `hou.renderMethod.RopByRop` or `hou.renderMethod.FrameByFrame`.
The default is ROP by ROP: each ROP will render its entire sequence
before proceeding to the next ROP. If you specify FrameByFrame, all ROPs
will render the first frame, then the second, etc.

This parameter is only relevant when rendering ROPs in a dependency


network.

ignore_bypass_flags:
If `True`, renders this node even if its bypass flag is on.

ignore_lock_flags:
If `True`, ignores any lock flags on this node and its dependencies.

::`setLocked(self, on)`:
#cppname: HOM_RopNode::setLocked
Sets this node's lock flag on or off. The lock flag caches the node's data
and the data from its inputs and prevents them from being recalculated
during cooking.

@replaces

- [Cmd:opset]
- [Cmd:render]
- [Exp:opflag]
- [Cmd:opget]

http://www.sidefx.com/docs/houdini10.0/hom/hou/RopNode (2 of 2) [12/7/2009 4:32:07 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/activeRenders

= hou.activeRenders =

#type: homfunction
#cppname: hom::activeRenders
#category: Rendering
#status: ni

@usage
`activeRenders()` -> tuple of [Hom:hou.ActiveRender]

@replaces

- [Cmd:rps]

http://www.sidefx.com/docs/houdini10.0/hom/hou/activeRenders [12/7/2009 4:32:08 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/renderMachineVariables

= hou.renderMachineVariables =
#type: hommodule
#cppname: HOM_renderMachineVariables
#category: Rendering
#status: ni

@functions

::`add(name, value, host_restriction=None)`:


#cppname: HOM_renderMachineVariables::add
#status: ni

::`asCode()`:
#cppname: HOM_renderMachineVariables::asCode
#status: ni

::`clear()`:
#cppname: HOM_renderMachineVariables::clear
#status: ni

::`remove(name, host_restriction=None)`:
#cppname: HOM_renderMachineVariables::remove
#status: ni

::`renderProcessIds()` -> tuple of ints:


#cppname: HOM_renderMachineVariables::renderProcessIds
#status: ni

@replaces

- [Cmd:rexport]
- [Cmd:rkill]
- [Cmd:rps]

http://www.sidefx.com/docs/houdini10.0/hom/hou/renderMachineVariables [12/7/2009 4:32:09 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/renderMethod

= hou.renderMethod =
#type: hommodule
#cppname: HOM_renderMethod
#category: Rendering
#status: nd

"""Enumeration of dependency rendering methods."""

* `hou.renderMethod.RopByRop`
* `hou.renderMethod.FrameByFrame`

http://www.sidefx.com/docs/houdini10.0/hom/hou/renderMethod [12/7/2009 4:32:10 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ShellIO

= hou.ShellIO =
#type: homclass
#cppname: HOM_ShellIO
#category: Scripting
#status: nd

@methods

::`addDataForReading(self, data)`:
#cppname: HOM_ShellIO::addDataForReading
#status: nd

::`addEOFForReading(self)`:
#cppname: HOM_ShellIO::addEOFForReading
#status: nd

::`getAndClearWrittenData(self)` -> string:


#cppname: HOM_ShellIO::getAndClearWrittenData
#status: nd

::`interruptShellThread(self)`:
#cppname: HOM_ShellIO::interruptShellThread
#status: nd

::`isatty(self)` -> `bool`:


#cppname: HOM_ShellIO::isatty

Implemented as part of the "file-like object" interface.

::`isWaitingForCommand(self)` -> bool:


#cppname: HOM_ShellIO::isWaitingForCommand
#status: nd

::`readline(self, size=-1)` -> string:


#cppname: HOM_ShellIO::readline
#status: nd

::`setIsWaitingForCommand(self, on)`:
#cppname: HOM_ShellIO::setIsWaitingForCommand
#status: nd

::`write(self, data)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/ShellIO (1 of 2) [12/7/2009 4:32:11 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ShellIO

#cppname: HOM_ShellIO::write
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/ShellIO (2 of 2) [12/7/2009 4:32:11 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Textport

= hou.Textport =
#type: homclass
#cppname: HOM_Textport
#category: Scripting
#status: ni

@methods

::`clear(self)`:
#cppname: HOM_Textport::clear
#status: ni

::`prompt(self)`:
#cppname: HOM_Textport::prompt
#status: ni

::`setPrompt(self, prompt_command)`:
#cppname: HOM_Textport::setPrompt
#status: ni

@replaces

- [Cmd:clear]
- [Cmd:prompt]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Textport [12/7/2009 4:32:11 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/TextportPane

= hou.TextportPane =
#type: homclass
#cppname: HOM_TextportPane
#superclass: hou.Pane
#category: Scripting
#status: ni

@methods

::`textport(self)`:
#cppname: HOM_TextportPane::textport
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/TextportPane [12/7/2009 4:32:11 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/_addPreloadIcon

= hou._addPreloadIcon =

#type: homfunction
#cppname: hom::_addPreloadIcon
#category: Scripting

"""Used internally by Houdini to preload icons for speed."""

@usage
`_addPreloadIcon(name, w, h)`

http://www.sidefx.com/docs/houdini10.0/hom/hou/_addPreloadIcon [12/7/2009 4:32:12 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/_getArgumentAutoComplete

= hou._getArgumentAutoComplete =

#type: homfunction
#cppname: hom::_getArgumentAutoComplete
#category: Scripting

"""This function is used internally by the Houdini Python shell for


argument auto-completion on functions of the hou module."""

@usage
`_getArgumentAutoComplete(method_name, arguments)` -> tuple of strings

http://www.sidefx.com/docs/houdini10.0/hom/hou/_getArgumentAutoComplete [12/7/2009 4:32:12 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/endListeningOnPort

= hou.endListeningOnPort =

#type: homfunction
#cppname: hom::endListeningOnPort
#category: Scripting
#status: ni

@usage
`endListeningOnPort(port)`

@replaces
- [Cmd:closeport]

http://www.sidefx.com/docs/houdini10.0/hom/hou/endListeningOnPort [12/7/2009 4:32:13 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/exitScript

= hou.exitScript =

#type: homfunction
#cppname: hom::exitScript
#category: Scripting
#status: ni

@usage
`exitScript()`

@replaces
- [Cmd:exit]

http://www.sidefx.com/docs/houdini10.0/hom/hou/exitScript [12/7/2009 4:32:13 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/expandString

= hou.expandString =
#type: homfunction
#cppname: hom::expandString
#category: Scripting

"""Evaluates the given string expression and returns the result."""

@usage
`expandString(str) -> string`

Given a string, evaluate it as though it is in the contents of an non-animated


string parameter.

Global variables in the string are expanded, and anything inside backticks
is evaluated as an hscript expression. For example, `hou.expandString('$F')`
returns the current frame number while
`hou.expandString('\`ch("/obj/geo1/tx")\`')`
returns the value of the translate X parameter for geo1.

See [Hom:hou.hscriptExpression] for examples and differences between


[Hom:hou.expandString] and [Hom:hou.hscriptExpression] with respect to variable
expansion.

{{{
#!pycon
>>> hou.expandString("$HIP/file.geo")
'/dir/containing/hip/file/file.geo'
>>> hou.expandString("file`$F+1`.pic")
'file2.pic'
}}}

http://www.sidefx.com/docs/houdini10.0/hom/hou/expandString [12/7/2009 4:32:14 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/expandStringAtFrame

= hou.expandStringAtFrame =

#type: homfunction
#cppname: hom::expandStringAtFrame
#category: Scripting

"""Evaluates the given string expression at a certain frame and


returns the result."""

@usage
`expandStringAtFrame(str) -> string`

Global variables found in the expression are expanded, as well as any channel
references. For example, hou.expandString('$F', 10) returns the string '10'
while hou.expandString('`ch("/obj/geo1/tx")`', hou.frame()) returns the value
of the translate X parameter for geo1 at the current time.

This function throws a hou.OperationFailed exception if the string that is


passed in is None.

http://www.sidefx.com/docs/houdini10.0/hom/hou/expandStringAtFrame [12/7/2009 4:32:14 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/expressionGlobals

= hou.expressionGlobals =
#type: homfunction
#cppname: hom::expressionGlobals
#category: Scripting

"""Return the globals dictionary used by the parameter expression evaluation


namespace."""

@usage
`expressionGlobals()` -> dict

When Houdini evaluates a Python expression inside a parameter, it uses a


separate namespace. This way, Houdini can run `from hou import *` and
`from hou.session import *` in that namespace, allowing you to drop the
`hou.` and `hou.session.` prefixes in your expressions, and the global
namespace does not get polluted.

In Python, namespaces are stored as dictionaries. This function returns the


dictionary for the Python parameter expression namespace. It is analagous to
the builtin `globals` function, which returns you the dictionary for the
current namespace.

You might use this function from the `pythonrc.py` file to set up Python
functions that can be called from any Python parameter expression. For
example, if you put your functions in a module called `expr`, you might
put the following in `pythonrc.py`:

{{{
#!python
import expr
hou.expressionGlobals()['expr'] = expr
}}}

Then, from a Python expression, you could write `expr.foo()`, where `foo` is
a function defined in your `expr` module.

You can also use this dictionary with Python's `exec` statement. The following
example also imports the `expr` module into the both the global and expression
namespaces:

{{{
#!python

http://www.sidefx.com/docs/houdini10.0/hom/hou/expressionGlobals (1 of 2) [12/7/2009 4:32:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/expressionGlobals

code = compile("import expr", "<generated_code>", "exec")


exec code
exec code in hou.expressionGlobals()
}}}

See [Python Parameter Expressions|/hom/expressions] for more information on


using Python expressions in parameters. See [Session Independent
Scripts|/hom/independent] for more information about `pythonrc.py`.

http://www.sidefx.com/docs/houdini10.0/hom/hou/expressionGlobals (2 of 2) [12/7/2009 4:32:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscript

= hou.hscript =

#type: homfunction
#cppname: hom::hscript
#category: Scripting

"""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."""

@usage
`hscript(command)` -> tuple of strings

@replaces
- [Exp:execute]

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscript [12/7/2009 4:32:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptCommandHelp

= hou.hscriptCommandHelp =

#type: homfunction
#cppname: hom::hscriptCommandHelp
#category: Scripting

"""Return the text help of an hscript command. This function is used to


help re-implement hscript commands in Python."""

@usage
`hscriptCommandHelp(command_name)` -> string

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptCommandHelp [12/7/2009 4:32:16 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptExpandString

= hou.hscriptExpandString =
#type: homfunction
#cppname: hom::hscriptExpandString
#category: Scripting

"""Deprecated: Use expandString."""

@usage
`hscriptExpandString(str) -> string`

WARNING:
This is deprecated. Use [Hom:hou.expandString] instead.

@related

- [Hom:hou.expandString]

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptExpandString [12/7/2009 4:32:16 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptExpression

= hou.hscriptExpression =
#type: homfunction
#cppname: hom::hscriptExpression
#category: Scripting

"""Evaluate an Hscript expression."""

@usage
`hscriptExpression(expression)` -> float, string, or tuple

Given an expression string, this function evaluates it as though it was an


Hscript expression on a parameter. The return type depends on the expression
that's evaluated.

Raises [Hom:hou.OperationFailed] if the expression is invalid or generates an


error occur during evaluation.

{{{
#!pycon
>>> hou.hscriptExpression("$HIP")
'/path/to/hip/directory'
>>> hou.hscriptExpression("$F")
1.0
>>> hou.hscriptExpression('vector("[1, 2, 3]")')
(1.0, 2.0, 3.0)
>>> hou.hscriptExpression('matrix("[[1, 2][3, 4]]")')
((1.0, 2.0), (3.0, 4.0))
>>> hou.hscriptExpression("hello")
'hello'
>>> hou.hscriptExpression("'hello'")
'hello'
>>> hou.hscriptExpression("'hello' + ' world'")
'hello world'
>>> hou.hscriptExpression('"$F"')
'1'
>>> hou.hscriptExpression("'$F'")
'$F'
}}}

This function is somewhat similar to [Hom:hou.expandString] with respect to


variable expansion. However, expandString will replace the portions of the
string containing variables, leaving the rest of the string unchanged. If the

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptExpression (1 of 3) [12/7/2009 4:32:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptExpression

variable is unknown, it will not do any expansion.


{{{
#!pycon
>>> hou.expandString("$HOME")
'/home/me'
>>> hou.expandString("HOME is $HOME")
'HOME is /home/me'
>>> hou.hscriptExpression("HOME is $HOME")
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/opt/hfs9.5/houdini/scripts/python/hou.py", line 19331, in hscriptExpression
return _hou.hscriptExpression(*args)
OperationFailed: The attempted operation failed.
Syntax error - extra tokens detected in expression
>>> hou.expandString("$F")
'1'
>>> hou.expandString('"$F"')
'"1"'
>>> hou.hscriptExpression("$GARBAGE")
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/opt/hfs9.5/houdini/scripts/python/hou.py", line 19331, in hscriptExpression
return _hou.hscriptExpression(*args)
OperationFailed: The attempted operation failed.
Undefined variable
>>> hou.expandString("$GARBAGE")
'$GARBAGE'
>>> hou.hscript("echo -n $GARBAGE")[0]
''
>>> hou.expandString("")
''
>>> hou.hscriptExpression("")
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/opt/hfs9.5/houdini/scripts/python/hou.py", line 19331, in hscriptExpression
return _hou.hscriptExpression(*args)
OperationFailed: The attempted operation failed.
Invalid expression
}}}

See [Hom:hou.expandString] for information about backtick expansion.

@related

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptExpression (2 of 3) [12/7/2009 4:32:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptExpression

- [Hom:hou.hscriptFloatExpression]
- [Hom:hou.hscriptStringExpression]
- [Hom:hou.hscriptVectorExpression]
- [Hom:hou.hscriptMatrixExpression]

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptExpression (3 of 3) [12/7/2009 4:32:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptFloatExpression

= hou.hscriptFloatExpression =
#type: homfunction
#cppname: hom::hscriptFloatExpression
#category: Scripting

"""Evaluate an Hscript expression as a float."""

@usage
`hscriptFloatExpression(expression)` -> float

This function will force the return type to be a float.

Most of the time, you want to use [Hom:hou.hscriptExpression] over this


function. See it for more examples.

Raises [Hom:hou.OperationFailed] if the expression is invalid or generates an


error occur during evaluation.

If the expression contains variables, Houdini will attempt to evaluate them


as floats, and use the value 0.0 if they cannot be converted to floats.
However, if the expression definitely evaluates to a string that does not
start with a number, this function raises [Hom:hou.OperationFailed].

{{{
#!pycon
>>> hou.hscriptFloatExpression("3")
3.0
>>> hou.hscriptFloatExpression("'3'")
3.0
>>> hou.hscriptFloatExpression("'3X'")
3.0
>>> hou.hscriptFloatExpression("'X3'")
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/opt/hfs9.5/houdini/scripts/python/hou.py", line 9359, in hscriptFloatExpression
return _hou.hscriptFloatExpression(*args)
OperationFailed: The attempted operation failed.
Bad data type for function or operation
>>> hou.hscriptFloatExpression("3X")
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/opt/hfs9.5/houdini/scripts/python/hou.py", line 9359, in hscriptFloatExpression

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptFloatExpression (1 of 2) [12/7/2009 4:32:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptFloatExpression

return _hou.hscriptFloatExpression(*args)
OperationFailed: The attempted operation failed.
Syntax error - extra tokens detected in expression
>>> hou.hscriptFloatExpression("$F")
1.0
>>> hou.hscriptFloatExpression('"$F"')
1.0
>>> hou.hscriptFloatExpression("$HOME")
0.0
>>> hou.hscriptFloatExpression('"$HOME"')
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/opt/hfs9.5/houdini/scripts/python/hou.py", line 9359, in hscriptFloatExpression
return _hou.hscriptFloatExpression(*args)
OperationFailed: The attempted operation failed.
Bad data type for function or operation
>>> hou.hscriptFloatExpression("'$F'")
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/opt/hfs9.5/houdini/scripts/python/hou.py", line 9359, in hscriptFloatExpression
return _hou.hscriptFloatExpression(*args)
OperationFailed: The attempted operation failed.
Bad data type for function or operation
}}}

@related

- [Hom:hou.hscriptExpression]
- [Hom:hou.hscriptStringExpression]
- [Hom:hou.hscriptVectorExpression]
- [Hom:hou.hscriptMatrixExpression]

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptFloatExpression (2 of 2) [12/7/2009 4:32:17 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptMatrixExpression

= hou.hscriptMatrixExpression =
#type: homfunction
#cppname: hom::hscriptMatrixExpression
#category: Scripting

"""Evaluate an Hscript expression as a vector."""

@usage
`hscriptMatrixExpression(expression)` -> tuple of tuple of floats

This function will force the return type to be an Hscript matrix.


Because Hscript matrices can be be of different sizes, the value is
returned as a tuple of tuples of floats. If you know the matrix is a
particular size, you can construct a Matrix3/Matrix4 out of the return
value.

Most of the time, you want to use [Hom:hou.hscriptExpression] over this


function.

{{{
#!python
xform = hou.Matrix4(hou.hscriptMatrixExpression('doptransform("/obj/dopnet1", "obj0", "Geometry")'))
}}}

Raises [Hom:hou.OperationFailed] if the expression is invalid or generates an


error during evaluation.

@related

- [Hom:hou.hscriptExpression]
- [Hom:hou.hscriptFloatExpression]
- [Hom:hou.hscriptStringExpression]
- [Hom:hou.hscriptVectorExpression]
- [Hom:hou.Matrix3]
- [Hom:hou.Matrix4]

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptMatrixExpression [12/7/2009 4:32:18 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptStringExpression

= hou.hscriptStringExpression =
#type: homfunction
#cppname: hom::hscriptStringExpression
#category: Scripting

"""Evaluate an Hscript expression as a float."""

@usage
`hscriptStringExpression(expression)` -> string

This function will force the return type to be a string. If the expression
does not evaluate to a string, this function returns its string representation.

Most of the time, you want to use [Hom:hou.hscriptExpression] over this


function. See it for more examples.

Raises [Hom:hou.OperationFailed] if the expression is invalid or generates an


error occur during evaluation.

{{{
#!pycon
>>> hou.hscriptStringExpression("3")
'3'
>>> hou.hscriptStringExpression('"3"')
'3'
>>> hou.hscriptStringExpression("$F")
'1'
>>> hou.hscriptStringExpression('vector("[1, 2, 3]")')
'[1,2,3]'
}}}

@related

- [Hom:hou.hscriptExpression]
- [Hom:hou.hscriptFloatExpression]
- [Hom:hou.hscriptVectorExpression]
- [Hom:hou.hscriptMatrixExpression]

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptStringExpression [12/7/2009 4:32:18 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptVectorExpression

= hou.hscriptVectorExpression =
#type: homfunction
#cppname: hom::hscriptVectorExpression
#category: Scripting

"""Evaluate an Hscript expression as a vector."""

@usage
`hscriptVectorExpression(expression)` -> tuple of floats

This function will force the return type to be an Hscript vector.


Because Hscript vectors can be be of different lengths, the value is
returned as a tuple of floats. If you know the vector is a particular
length, you can construct a Vector2/Vector3/Vector4 out of the return
value.

Most of the time, you want to use [Hom:hou.hscriptExpression] over this


function.

{{{
#!python
vector = hou.Vector3(hou.hscriptVectorExpression('vtorigin("/obj/geo1", "/obj/geo2")'))
print vector.length()
}}}

Raises [Hom:hou.OperationFailed] if the expression is invalid or generates an


error occur during evaluation.

@related

- [Hom:hou.hscriptExpression]
- [Hom:hou.hscriptFloatExpression]
- [Hom:hou.hscriptStringExpression]
- [Hom:hou.hscriptMatrixExpression]
- [Hom:hou.Vector2]
- [Hom:hou.Vector3]
- [Hom:hou.Vector4]

http://www.sidefx.com/docs/houdini10.0/hom/hou/hscriptVectorExpression [12/7/2009 4:32:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/listenOnPortAndBlockUntilClosed

= hou.listenOnPortAndBlockUntilClosed =

#type: homfunction
#cppname: hom::listenOnPortAndBlockUntilClosed
#category: Scripting
#status: ni

@usage
`listenOnPortAndBlockUntilClosed(port, ipmask='+.+.+.+', safety=AllowAllCommands, language=hou.scriptLanguage.Python)`

@replaces
- [Cmd:openport]

http://www.sidefx.com/docs/houdini10.0/hom/hou/listenOnPortAndBlockUntilClosed [12/7/2009 4:32:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/runJava

= hou.runJava =

#type: homfunction
#cppname: hom::runJava
#category: Scripting
#status: ni

@usage
`runJava(class, classPath=None, as_daemon=False, wait=True, only_safe_commands=False)`

@replaces
- [Cmd:java]

http://www.sidefx.com/docs/houdini10.0/hom/hou/runJava [12/7/2009 4:32:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/runTcl

= hou.runTcl =

#type: homfunction
#cppname: hom::runTcl
#category: Scripting
#status: ni

@usage
`runTcl(file_name)`

@replaces
- [Cmd:tcl]

http://www.sidefx.com/docs/houdini10.0/hom/hou/runTcl [12/7/2009 4:32:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/runTclTk

= hou.runTclTk =

#type: homfunction
#cppname: hom::runTclTk
#category: Scripting
#status: ni

@usage
`runTclTk(file_name)`

@replaces
- [Cmd:tk]

http://www.sidefx.com/docs/houdini10.0/hom/hou/runTclTk [12/7/2009 4:32:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/startListeningOnPort

= hou.startListeningOnPort =

#type: homfunction
#cppname: hom::startListeningOnPort
#category: Scripting
#status: ni

@usage
`startListeningOnPort(port, ipmask='+.+.+.+', safety=AllowAllCommands, language=hou.scriptLanguage.Python)`

@replaces
- [Cmd:openport]

http://www.sidefx.com/docs/houdini10.0/hom/hou/startListeningOnPort [12/7/2009 4:32:21 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/stopNonDaemonJavaProcesses

= hou.stopNonDaemonJavaProcesses =

#type: homfunction
#cppname: hom::stopNonDaemonJavaProcesses
#category: Scripting
#status: ni

@usage
`stopNonDaemonJavaProcesses()`

@replaces
- [Cmd:java]

http://www.sidefx.com/docs/houdini10.0/hom/hou/stopNonDaemonJavaProcesses [12/7/2009 4:32:21 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/tempVarStack

= hou.tempVarStack =

#type: homfunction
#cppname: hom::tempVarStack
#category: Scripting
#status: ni

@usage
`tempVarStack()`

http://www.sidefx.com/docs/houdini10.0/hom/hou/tempVarStack [12/7/2009 4:32:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/unusedPort

= hou.unusedPort =

#type: homfunction
#cppname: hom::unusedPort
#category: Scripting
#status: ni

@usage
`unusedPort(start_port=None)`

@replaces
- [Cmd:openport]

http://www.sidefx.com/docs/houdini10.0/hom/hou/unusedPort [12/7/2009 4:32:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Shelf

= hou.Shelf =
#type: homclass
#cppname: HOM_Shelf
#superclass: hou.ShelfElement
#category: Shelf
#status: nd

@methods

::`destroy(self)`:
#cppname: HOM_Shelf::destroy
#status: nd

::`setTools(self, tools)`:
#cppname: HOM_Shelf::setTools
#status: nd

::`tools(self)` -> tuple of Tools:


#cppname: HOM_Shelf::tools
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/Shelf [12/7/2009 4:32:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ShelfDock

= hou.ShelfDock =
#type: homclass
#cppname: HOM_ShelfDock
#category: Shelf

"""Represents the shelf area at the top of the screen, within which
shelf sets and shelf tabs exist."""

The shelf docking area on any given desktop has space for any number of shelf
sets, each of which may contain shelf tabs.

@methods

::`addShelfSet(self, shelfset)`:
#cppname: HOM_ShelfDock::addShelfSet
#status: ni

::`iconsize(self)` -> (`int`, `int`):


#cppname: HOM_ShelfDock::iconsize

Returns the height and width, in pixels, of the icons in the shelf at the
current "Display Tools As" setting.

::`removeShelfSet(self, shelfset)`:
#cppname: HOM_ShelfDock::removeShelfSet
#status: ni

::`shelfSets(self)` -> tuple of [Hom:hou.ShelfSet]:


#cppname: HOM_ShelfDock::shelfSets

Returns a list of the shelf sets in the current shelf dock.

::`show(self, on)`:
#cppname: HOM_ShelfDock::show
#replaces: Cmd:shelfdock
Show or hide the shelf dock by uncollapsing or collapsing its stow bar.

@related
- [Hom:hou.Desktop]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ShelfDock [12/7/2009 4:32:23 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ShelfElement

= hou.ShelfElement =
#type: homclass
#cppname: HOM_ShelfElement
#category: Shelf
#status: nd

@methods

::`filePath(self)` -> `str`:


#cppname: HOM_ShelfElement::filePath
#status: nd

::`label(self)` -> `str`:


#cppname: HOM_ShelfElement::label
#status: nd

::`name(self)` -> `str`:


#cppname: HOM_ShelfElement::name
#status: nd

::`setFilePath(self, file_path)`:
#cppname: HOM_ShelfElement::setFilePath
#status: nd

::`setLabel(self, label)`:
#cppname: HOM_ShelfElement::setLabel
#status: nd

::`setName(self, name)`:
#cppname: HOM_ShelfElement::setName
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/ShelfElement [12/7/2009 4:32:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ShelfSet

= hou.ShelfSet =
#type: homclass
#cppname: HOM_ShelfSet
#superclass: hou.ShelfElement
#category: Shelf
#status: nd

@methods

::`destroy(self)`:
#cppname: HOM_ShelfSet::destroy
#status: nd

::`setShelves(self, shelves)`:
#cppname: HOM_ShelfSet::setShelves
#status: nd

::`shelves(self)` -> tuple of Shelf:


#cppname: HOM_ShelfSet::shelves
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/ShelfSet [12/7/2009 4:32:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Tool

= hou.Tool =
#type: homclass
#cppname: HOM_Tool
#superclass: hou.ShelfElement
#category: Shelf
#status: nd

@methods

::`destroy(self)`:
#cppname: HOM_Tool::destroy
#status: nd

::`help(self)` -> `str`:


#cppname: HOM_Tool::help
#status: nd

::`helpURL(self)` -> `str`:


#cppname: HOM_Tool::helpURL
#status: nd

::`icon(self)` -> `str`:


#cppname: HOM_Tool::icon
#status: nd

::`language(self)` -> [Hom:hou.scriptLanguage] enum value:


#cppname: HOM_Tool::language
#status: nd

::`script(self)` -> `str`:


#cppname: HOM_Tool::script
#status: nd

::`setData(self, script='', language=hou.scriptLanguage.Python, icon='', help='', help_url='', network_categories=(), viewer_categories=(), pop_viewer_categories=(), cop_viewer_categories=(), network_op_type='', viewer_op_type='', locations=())`:
#cppname: HOM_Tool::setData
#status: nd

::`setHelp(self, help)`:
#cppname: HOM_Tool::setHelp
#status: nd

::`setHelpURL(self, help_url)`:
#cppname: HOM_Tool::setHelpURL
#status: nd

::`setIcon(self, icon)`:
#cppname: HOM_Tool::setIcon
#status: nd

::`setLanguage(self, language)`:
#cppname: HOM_Tool::setLanguage
#status: nd

::`setScript(self, script)`:
#cppname: HOM_Tool::setScript
#status: nd

::`setToolLocations(self, locations)`:
#cppname: HOM_Tool::setToolLocations
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/Tool (1 of 2) [12/7/2009 4:32:25 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Tool

::`setToolMenuCategories(self, pane_type, categories)`:


#cppname: HOM_Tool::setToolMenuCategories
#status: nd

::`setToolMenuLocations(self, locations)`:
#cppname: HOM_Tool::setToolMenuLocations
#status: ni

::`setToolMenuOpType(self, pane_type, op_type)`:


#cppname: HOM_Tool::setToolMenuOpType
#status: nd

::`toolMenuCategories(self, pane_type)` -> tuple of [Hom:hou.NodeTypeCategory]:


#cppname: HOM_Tool::toolMenuCategories
#status: nd

::`toolMenuLocations(self)` -> tuple of `str`:


#cppname: HOM_Tool::toolMenuLocations
#status: nd

::`toolMenuOpType(self, pane_type)` -> `str`:


#cppname: HOM_Tool::toolMenuOpType
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/Tool (2 of 2) [12/7/2009 4:32:25 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/shelves

= hou.shelves =
#type: hommodule
#cppname: HOM_shelves
#category: Shelf
#status: nd

@functions

::`defaultFilePath()` -> `str`:


#cppname: HOM_shelves::defaultFilePath
#status: nd

::`newShelf(file_path=None, name=None, label=None)` -> [Hom:hou.Shelf]:


#cppname: HOM_shelves::newShelf
#status: nd

::`newShelfSet(file_path=None, name=None, label=None)` -> [Hom:hou.ShelfSet]:


#cppname: HOM_shelves::newShelfSet
#status: nd

::`newTool(file_path=None, name=None, label=None, script=None, language=hou.scriptLanguage.Python, icon=None, help=None, help_url=None, network_categories=(), viewer_categories=(), pop_viewer_categories=(), cop_viewer_categories=(), network_op_type=None, viewer_op_type=None, locations=())` -> [Hom:hou.Tool]:
#cppname: HOM_shelves::newTool
#status: nd

::`runningTool()` -> [Hom:hou.Tool] or `None`:


#cppname: HOM_shelves::runningTool
#status: nd

::`shelfSets()` -> dict of `str` to [Hom:hou.ShelfSet]:


#cppname: HOM_shelves::shelfSets
#status: nd

::`shelves()` -> dict of `str` to [Hom:hou.Shelf]:


#cppname: HOM_shelves::shelves
#status: nd

::`tools()` -> dict of `str` to [Hom:hou.Tool]:


#cppname: HOM_shelves::tools
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/shelves [12/7/2009 4:32:25 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Take

= hou.Take =
#type: homclass
#cppname: HOM_Take
#category: Takes
#status: ni

@methods

::`addChildTake(self, name)` -> Take:


#cppname: HOM_Take::addChildTake
#status: ni

::`addNodeBypassFlag(self, node)`:
#cppname: HOM_Take::addNodeBypassFlag
#status: ni

::`addNodeDisplayFlag(self, node)`:
#cppname: HOM_Take::addNodeDisplayFlag
#status: ni

::`addNodeRenderFlag(self, node)`:
#cppname: HOM_Take::addNodeRenderFlag
#status: ni

::`addParm(self, parm)`:
#cppname: HOM_Take::addParm
#status: ni

::`addParmsFromTake(self, take, overwrite_existing=True)`:


#cppname: HOM_Take::addParmsFromTake
#status: ni

::`allAllParmsOfNode(self, node)`:
#cppname: HOM_Take::allAllParmsOfNode
#status: ni

::`asCode(self)`:
#cppname: HOM_Take::asCode
#status: ni

::`asXML(self)`:
#cppname: HOM_Take::asXML

http://www.sidefx.com/docs/houdini10.0/hom/hou/Take (1 of 4) [12/7/2009 4:32:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Take

#status: ni

::`children(self)` -> tuple of Takes:


#cppname: HOM_Take::children
#status: ni

::`destroy(self, recursive=False)`:
#cppname: HOM_Take::destroy
#status: ni

::`fullPath(self)`:
#cppname: HOM_Take::fullPath
#status: ni

::`hasParm(self, parm)`:
#cppname: HOM_Take::hasParm
#status: ni

::`insertTakeAbove(self, name)` -> Take:


#cppname: HOM_Take::insertTakeAbove
#status: ni

::`loadChildTakeFromFile(self, filename)`:
#cppname: HOM_Take::loadChildTakeFromFile
#status: ni

::`memoryUsageInBytes(self)`:
#cppname: HOM_Take::memoryUsageInBytes
#status: ni

::`moveUnderTake(self, take)`:
#cppname: HOM_Take::moveUnderTake
#status: ni

::`name(self)`:
#cppname: HOM_Take::name
#status: ni

::`parms(self)` -> tuple of Parms:


#cppname: HOM_Take::parms
#status: ni

::`removeAllParmsOfNode(self, node)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/Take (2 of 4) [12/7/2009 4:32:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Take

#cppname: HOM_Take::removeAllParmsOfNode
#status: ni

::`removeNodeBypassFlag(self, node)`:
#cppname: HOM_Take::removeNodeBypassFlag
#status: ni

::`removeNodeDisplayFlag(self, node)`:
#cppname: HOM_Take::removeNodeDisplayFlag
#status: ni

::`removeNodeRenderFlag(self, node)`:
#cppname: HOM_Take::removeNodeRenderFlag
#status: ni

::`removeParm(self, parm)`:
#cppname: HOM_Take::removeParm
#status: ni

::`saveToFile(self, filename, recursive=False)`:


#cppname: HOM_Take::saveToFile
#status: ni

::`setName(self, name)`:
#cppname: HOM_Take::setName
#status: ni

@related

- [Hom:hou.takes]

@replaces

- [Cmd:takeadd]
- [Cmd:takeinclude]
- [Cmd:takeload]
- [Cmd:takels]
- [Cmd:takemerge]
- [Cmd:takemove]
- [Cmd:takename]
- [Cmd:takerm]
- [Cmd:takesave]
- [Cmd:takescript]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Take (3 of 4) [12/7/2009 4:32:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Take

http://www.sidefx.com/docs/houdini10.0/hom/hou/Take (4 of 4) [12/7/2009 4:32:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/takes

= hou.takes =
#type: hommodule
#cppname: HOM_takes
#category: Takes
#status: ni

@functions

::`allTakes()` -> tuple of [Hom:hou.Take]:


#cppname: HOM_takes::allTakes
#status: ni

::`curTake()` -> [Hom:hou.Take]:


#cppname: HOM_takes::curTake
#status: ni

::`findTake(take_name)` -> [Hom:hou.Take] or `None`:


#cppname: HOM_takes::findTake
#status: ni

::`prefixForNewTakeNames()`:
#cppname: HOM_takes::prefixForNewTakeNames
#status: ni

::`rootTake()` -> [Hom:hou.Take]:


#cppname: HOM_takes::rootTake
#status: ni

::`setCurTake(take)`:
#cppname: HOM_takes::setCurTake
#status: ni

::`setPrefixForNewTakeNames()`:
#cppname: HOM_takes::setPrefixForNewTakeNames
#status: ni

@replaces

- [Cmd:takename]
- [Cmd:takels]
- [Cmd:takeset]

http://www.sidefx.com/docs/houdini10.0/hom/hou/takes [12/7/2009 4:32:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/TimeGroup

= hou.TimeGroup =
#type: homclass
#cppname: HOM_TimeGroup
#category: Timeline
#status: ni

@methods

::`addKeysOnParm(self, parm, start_frame, end_frame)`:


#cppname: HOM_TimeGroup::addKeysOnParm
#status: ni

::`clear(self)`:
#cppname: HOM_TimeGroup::clear
#status: ni

::`destroy(self)`:
#cppname: HOM_TimeGroup::destroy
#status: ni

::`handleFrame(self)`:
#cppname: HOM_TimeGroup::handleFrame
#status: ni

::`moveToFrame(self, frame, maintain_keyframe_boundaries=False)`:


#cppname: HOM_TimeGroup::moveToFrame
#status: ni

::`name(self)`:
#cppname: HOM_TimeGroup::name
#status: ni

::`parmFrameTuples(self)` -> tuple of Parm and float tuples:


#cppname: HOM_TimeGroup::parmFrameTuples
#status: ni

::`removeKeysOnParm(self, parm, start_frame, end_frame)`:


#cppname: HOM_TimeGroup::removeKeysOnParm
#status: ni

::`setHandleFrame(self, frame)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/TimeGroup (1 of 2) [12/7/2009 4:32:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/TimeGroup

#cppname: HOM_TimeGroup::setHandleFrame
#status: ni

::`setName(self, name)`:
#cppname: HOM_TimeGroup::setName
#status: ni

::`shiftByFrames(self, num_frames, maintain_keyframe_boundaries=False)`:


#cppname: HOM_TimeGroup::shiftByFrames
#status: ni

@replaces

- [Cmd:tmgls]
- [Cmd:tmgname]
- [Cmd:tmgop]
- [Cmd:tmgrm]
- [Cmd:tmgshift]

http://www.sidefx.com/docs/houdini10.0/hom/hou/TimeGroup (2 of 2) [12/7/2009 4:32:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/addTimeGroup

= hou.addTimeGroup =

#type: homfunction
#cppname: hom::addTimeGroup
#category: Timeline
#status: ni

@usage
`addTimeGroup(name, handle_frame)` -> TimeGroup

@replaces

- [Cmd:tmgadd]

http://www.sidefx.com/docs/houdini10.0/hom/hou/addTimeGroup [12/7/2009 4:32:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/decrementFrame

= hou.decrementFrame =

#type: homfunction
#cppname: hom::decrementFrame
#category: Timeline
#status: ni

@usage
`decrementFrame()`

http://www.sidefx.com/docs/houdini10.0/hom/hou/decrementFrame [12/7/2009 4:32:28 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/findTimeGroup

= hou.findTimeGroup =

#type: homfunction
#cppname: hom::findTimeGroup
#category: Timeline
#status: ni

@usage
`findTimeGroup(name)` -> TimeGroup

http://www.sidefx.com/docs/houdini10.0/hom/hou/findTimeGroup [12/7/2009 4:32:28 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/fps

= hou.fps =

#type: homfunction
#cppname: hom::fps
#category: Timeline

"""Return the number of frames per second."""

@usage
`fps()` -> float

This value is used when converting between frames and time.

@related

- [Hom:hou.setFps]
- [Hom:hou.frame]
- [Hom:hou.time]

@replaces

- [Cmd:fps]

http://www.sidefx.com/docs/houdini10.0/hom/hou/fps [12/7/2009 4:32:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/frame

= hou.frame =
#type: homfunction
#cppname: hom::frame
#category: Timeline

"""Return the playbar's current frame. Note that Houdini can be on a


fractional frame if fractional frames are enabled."""

@usage
`frame()` -> `float`

Note that this function is equivalent to Hscript's `$FF` variable. If you


want hscript's `$F` variable, use [Hom:hou.intFrame], which rounds the frame
to the nearest integer.

To enable fractional frames, turn off the __Integer Frame Values__ in the
__Global Animation Options__ dialog.

This function rounds its output to 3 decimal places, just like Hscript's `$FF`
variable does. Note, though, that because a Python float may not be able to
precisely represent a floating point value, and because Python does not round
numbers when it displays them, the frame number might end with 9999999999999
or 0000000000001 when you print it to the Python shell. When you convert the
number to a string, though, Python will round the value, so it will contain at
most 3 decimal places.

{{{
#!pycon
>>> 2.759
2.7589999999999999
>>> 2.757
2.7570000000000001
>>> str(2.759)
'2.759'
}}}

If Houdini is on a fractional frame and you


do not want the rounded value, use `hou.timeToFrame(hou.time())`.

{{{
#!pycon
>>> hou.setFrame(13.193)

http://www.sidefx.com/docs/houdini10.0/hom/hou/frame (1 of 2) [12/7/2009 4:32:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/frame

>>> hou.frame()
13.193
>>> hou.timeToFrame(hou.time())
13.192999839782715
>>> hou.setFrame(2.759)
>>> hou.frame()
2.7589999999999999
>>> int(hou.frame())
2
>>> hou.intFrame()
3
}}}

@related
- [Hom:hou.intFrame]
- [Hom:hou.setFrame]
- [Hom:hou.time]
- [Hom:hou.fps]

@replaces
- [Cmd:fcur]

http://www.sidefx.com/docs/houdini10.0/hom/hou/frame (2 of 2) [12/7/2009 4:32:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/frameToTime

= hou.frameToTime =

#type: homfunction
#cppname: hom::frameToTime
#category: Timeline

"""Convert from a given frame value to a time value."""

@usage
`frameToTime(frame)` -> float

Calling this function is the same as evaluating `(frame - 1.0) /


hou.fps()`. Unlike hou.timeToFrame(), no rounding is performed.

@related

- [Hom:hou.fps]
- [Hom:hou.time]
- [Hom:hou.frame]

@replaces

- [Cmd:fps]

http://www.sidefx.com/docs/houdini10.0/hom/hou/frameToTime [12/7/2009 4:32:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/frameToTimecode

= hou.frameToTimecode =

#type: homfunction
#cppname: hom::frameToTimecode
#category: Timeline
#status: ni

@usage
`frameToTimecode(frame)`

@replaces
- [Cmd:ftimecode]

http://www.sidefx.com/docs/houdini10.0/hom/hou/frameToTimecode [12/7/2009 4:32:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/globalFrameRange

= hou.globalFrameRange() =

#type: homfunction
#cppname: hom::globalFrameRange
#category: Timeline
#status: ni

@usage
`globalFrameRange()`

@replaces
- [Cmd:fset]
- [Cmd:tset]

http://www.sidefx.com/docs/houdini10.0/hom/hou/globalFrameRange [12/7/2009 4:32:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/goToFirstFrame

= hou.goToFirstFrame =

#type: homfunction
#cppname: hom::goToFirstFrame
#category: Timeline
#status: ni

@usage
`goToFirstFrame()`

http://www.sidefx.com/docs/houdini10.0/hom/hou/goToFirstFrame [12/7/2009 4:32:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/goToLastFrame

= hou.goToLastFrame =

#type: homfunction
#cppname: hom::goToLastFrame
#category: Timeline
#status: ni

@usage
`goToLastFrame()`

http://www.sidefx.com/docs/houdini10.0/hom/hou/goToLastFrame [12/7/2009 4:32:32 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/goToNextKeyframe

= hou.goToNextKeyframe =

#type: homfunction
#cppname: hom::goToNextKeyframe
#category: Timeline
#status: ni

@usage
`goToNextKeyframe()`

@replaces
- [Cmd:nextkey]

http://www.sidefx.com/docs/houdini10.0/hom/hou/goToNextKeyframe [12/7/2009 4:32:32 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/goToPreviousKeyframe

= hou.goToPreviousKeyframe =

#type: homfunction
#cppname: hom::goToPreviousKeyframe
#category: Timeline
#status: ni

@usage
`goToPreviousKeyframe()`

@replaces
- [Cmd:nextkey]

http://www.sidefx.com/docs/houdini10.0/hom/hou/goToPreviousKeyframe [12/7/2009 4:32:33 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/incrementFrame

= hou.incrementFrame =

#type: homfunction
#cppname: hom::incrementFrame
#category: Timeline
#status: ni

@usage
`incrementFrame()`

http://www.sidefx.com/docs/houdini10.0/hom/hou/incrementFrame [12/7/2009 4:32:33 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/intFrame

= hou.intFrame =
#type: homfunction
#cppname: hom::intFrame
#category: Timeline

"""Return the playbar's current frame, rounded to the nearest integer."""

@usage
`intFrame()` -> `int`

Note that this function is equivalent to Hscript's `$F` variable. If you


want hscript's `$FF` variable, use [Hom:hou.frame].

@related
- [Hom:hou.frame]
- [Hom:hou.setFrame]
- [Hom:hou.time]
- [Hom:hou.fps]

@replaces
- [Cmd:fcur]

http://www.sidefx.com/docs/houdini10.0/hom/hou/intFrame [12/7/2009 4:32:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/playbar

= hou.playbar =
#type: hommodule
#cppname: HOM_playbar
#category: Timeline
#status: ni

@functions

::`moveToBottom(self)`:
#cppname: HOM_playbar::moveToBottom
#status: ni

::`moveToPane(self, pane)`:
#cppname: HOM_playbar::moveToPane
#status: ni

::`play(self)`:
#cppname: HOM_playbar::play
#status: ni

::`reverse(self)`:
#cppname: HOM_playbar::reverse
#status: ni

::`setFrameIncrement(self, increment)`:
#cppname: HOM_playbar::setFrameIncrement
#status: ni

::`setPlaybackRange(self, start, end)`:


#cppname: HOM_playbar::setPlaybackRange
#status: ni

::`setPlayMode(self, mode)`:
#cppname: HOM_playbar::setPlayMode
#status: ni

::`setRealTime(self, on)`:
#cppname: HOM_playbar::setRealTime
#status: ni

::`setRealTimeFactor(self, factor)`:
#cppname: HOM_playbar::setRealTimeFactor

http://www.sidefx.com/docs/houdini10.0/hom/hou/playbar (1 of 2) [12/7/2009 4:32:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/playbar

#status: ni

::`setRestrictRange(self, on)`:
#cppname: HOM_playbar::setRestrictRange
#status: ni

::`setUseIntegerFrames(self, on)`:
#cppname: HOM_playbar::setUseIntegerFrames
#status: ni

::`showAudio(self, on)`:
#cppname: HOM_playbar::showAudio
#status: ni

::`showKeys(self, on)`:
#cppname: HOM_playbar::showKeys
#status: ni

::`showRangeSlider(self, on)`:
#cppname: HOM_playbar::showRangeSlider
#status: ni

::`showTicks(self, on)`:
#cppname: HOM_playbar::showTicks
#status: ni

::`stop(self)`:
#cppname: HOM_playbar::stop
#status: ni

@replaces

- [Cmd:fplayback]
- [Cmd:frange]
- [Cmd:pane]
- [Cmd:play]

http://www.sidefx.com/docs/houdini10.0/hom/hou/playbar (2 of 2) [12/7/2009 4:32:34 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setFps

= hou.setFps =

#type: homfunction
#cppname: hom::setFps
#category: Timeline

"""Set the number of frames per second."""

@usage
`setFps(fps)`

@related

- [Hom:hou.fps]

@replaces

- [Cmd:fps]

http://www.sidefx.com/docs/houdini10.0/hom/hou/setFps [12/7/2009 4:32:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setFrame

= hou.setFrame =

#type: homfunction
#cppname: hom::setFrame
#category: Timeline

"""Set the playbar's current frame. Note that the frame may be a
fractional value."""

@usage
`setFrame(frame)`

@related

- [Hom:hou.time]
- [Hom:hou.setFrame]

@replaces

- [Cmd:tcur]

http://www.sidefx.com/docs/houdini10.0/hom/hou/setFrame [12/7/2009 4:32:35 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setGlobalFrameRange

= hou.setGlobalFrameRange =

#type: homfunction
#cppname: hom::setGlobalFrameRange
#category: Timeline
#status: ni

@usage
`setGlobalFrameRange(start, end)`

@replaces
- [Cmd:fset]
- [Cmd:tset]

http://www.sidefx.com/docs/houdini10.0/hom/hou/setGlobalFrameRange [12/7/2009 4:32:36 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setPlaybackFrameRange

= hou.setPlaybackFrameRange =

#type: homfunction
#cppname: hom::setPlaybackFrameRange
#category: Timeline
#status: ni

@usage
`setPlaybackFrameRange(start, end)`

http://www.sidefx.com/docs/houdini10.0/hom/hou/setPlaybackFrameRange [12/7/2009 4:32:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setTime

= hou.setTime =

#type: homfunction
#cppname: hom::setTime
#category: Timeline

"""Set the playbar's time."""

@usage
`setTime(time)`

@related

- [Hom:hou.time]
- [Hom:hou.setFrame]

@replaces

- [Cmd:tcur]

http://www.sidefx.com/docs/houdini10.0/hom/hou/setTime [12/7/2009 4:32:37 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/time

= hou.time =

#type: homfunction
#cppname: hom::time
#category: Timeline

"""Return the playbar's current time, in seconds of playback."""

@usage
`time()` -> float

Note that the time at frame 1 is 0s.

@related

- [Hom:hou.setTime]
- [Hom:hou.frame]
- [Hom:hou.fps]

@replaces

- [Cmd:tcur]

http://www.sidefx.com/docs/houdini10.0/hom/hou/time [12/7/2009 4:32:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/timeGroups

= hou.timeGroups =

#type: homfunction
#cppname: hom::timeGroups
#category: Timeline
#status: ni

@usage
`timeGroups()` -> tuple of TimeGroups

@replaces
- [Cmd:tmgls]

http://www.sidefx.com/docs/houdini10.0/hom/hou/timeGroups [12/7/2009 4:32:38 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/timeToFrame

= hou.timeToFrame =

#type: homfunction
#cppname: hom::timeToFrame
#category: Timeline

"""Convert from a given time value to a frame value, rounding the result
to a integer if it is close to an integer."""

@usage
`timeToFrame(time)` -> float

Calling this function is the same as evaluating `time * hou.fps() +


1.0`, with rounding performed if the result is nearly an integer.

@related

- [Hom:hou.fps]
- [Hom:hou.frame]
- [Hom:hou.time]

@replaces

- [Cmd:fps]

http://www.sidefx.com/docs/houdini10.0/hom/hou/timeToFrame [12/7/2009 4:32:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/timecodeToFrame

= hou.timecodeToFrame =

#type: homfunction
#cppname: hom::timecodeToFrame
#category: Timeline
#status: ni

@usage
`timecodeToFrame(timecode)`

@replaces
- [Cmd:ftimecode]

http://www.sidefx.com/docs/houdini10.0/hom/hou/timecodeToFrame [12/7/2009 4:32:39 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/BundleListPane

= hou.BundleListPane =
#type: homclass
#cppname: HOM_BundleListPane
#superclass: hou.PathBasedPaneTab
#category: UI
#status: ni

@methods

::`setCullingBasedOnFilter(self, on)`:
#cppname: HOM_BundleListPane::setCullingBasedOnFilter
#status: ni

::`setEnableGuessBundleFilter(self, on)`:
#cppname: HOM_BundleListPane::setEnableGuessBundleFilter
#status: ni

::`setFilter(self, node_type_filter)`:
#cppname: HOM_BundleListPane::setFilter
#status: ni

::`setHorizontalFraction(self, fraction)`:
#cppname: HOM_BundleListPane::setHorizontalFraction
#status: ni

::`setLinkTreeToNodeSelection(self, on)`:
#cppname: HOM_BundleListPane::setLinkTreeToNodeSelection
#status: ni

::`setShowBundleControls(self, on)`:
#cppname: HOM_BundleListPane::setShowBundleControls
#status: ni

::`setShowTree(self, on)`:
#cppname: HOM_BundleListPane::setShowTree
#status: ni

@replaces

- [Cmd:bundlelist]

http://www.sidefx.com/docs/houdini10.0/hom/hou/BundleListPane [12/7/2009 4:32:40 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop

= hou.Desktop =
#type: homclass
#cppname: HOM_Desktop
#category: UI

"""Class representing a Houdini desktop (a pane layout)."""

A desktop contains one or more panes. Each pane contains one or more pane
tabs of various types (scene viewer, parameters, network editor, etc.) The
main desktop window can be split horizontally or vertically into two panes,
and each pane can itself be split horizontally or vertically.

Note that a floating panel also contains one or more panes and a floating panel
may optionally be attached to a desktop.

The methods in this class that return pane tabs, panes, and floating panels
only return those objects that are attached to (i.e. saved with) the desktop.
To access all the visible pane tabs, panes, and floating panels, including
those not attached to any desktop, use the functions in [Hom:hou.ui].

See also [Hom:hou.ui#curDesktop], [Hom:hou#ui.desktops], [Hom:hou.Pane],


[Hom:hou.PaneTab], and [Hom:hou.FloatingPanel].

@methods

::`name(self)` -> `str`:


#cppname: HOM_Desktop::name
#replaces: Cmd:desk
Return the desktop's name.

Each desktop has a unique name. The desktop's name cannot


be changed through either the scripting interface or through Houdini.

::`setAsCurrent(self)`:
#cppname: HOM_Desktop::setAsCurrent
#replaces: Cmd:desk
Make this desktop the currently selected one. See also
[Hom:hou.ui#desktops].

This example changes to the animate desktop:


{{{
#!python

http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop (1 of 6) [12/7/2009 4:32:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop

desktops_dict = dict((d.name(), d) for d in hou.ui.desktops())


desktops_dict['Animate'].setAsCurrent()
}}}

::`panes(self)` -> tuple of [Hom:hou.Pane]:


#cppname: HOM_Desktop::panes
#replaces: Cmd:pane
Return the panes inside this desktop. Note that the result includes panes
in floating panels as long as they are attached to the desktop.

The following function will return all visible panes, regardless of


whether or not they are attached to a desktop:
{{{
#!python
def allPanes():
'''Return a tuple of all visible panes, regardless of whether or not
they are attached to a desktop.'''
# Loop through all the pane tabs and add each tab's pane to the result
# if it's not already there. Note that the only way to uniquely
# identify a pane is using its id.
ids_to_panes = {}
for pane_tab in hou.ui.paneTabs():
pane = pane_tab.pane()
if pane.id() not in ids_to_panes:
ids_to_panes[pane.id()] = pane
return ids_to_panes.values()
}}}

::`floatingPanels(self)` -> tuple of [Hom:hou.FloatingPanel]:


#cppname: HOM_Desktop::floatingPanels
Return all the floating panels attached to this desktop.

Use [Hom:hou.ui#floatingPanels] to get all the visible floating panels,


including those not attached to this desktop.

See also [Hom:hou.Desktop#floatingPaneTabs].

::`paneTabs(self)` -> tuple of [Hom:hou.PaneTab]:


#cppname: HOM_Desktop::paneTabs
#replaces: Cmd:pane
Return the pane tabs that are contained in this desktop or are in floating
panels attached to this desktop.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop (2 of 6) [12/7/2009 4:32:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop

This method does not return floating pane tabs that are not attached to
this desktop. Use [Hom:hou.ui#paneTabs] to get all the visible pane tabs,
regardless of whether they are attached to this desktop.

::`floatingPaneTabs(self)` -> tuple of [Hom:hou.PaneTab]:


#cppname: HOM_Desktop::floatingPaneTabs
Return all the pane tabs in floating panels that are attached to this
desktop.

::`paneTabOfType(self, type, index=0)` -> [Hom:hou.PaneTab] or `None`:


#cppname: HOM_Desktop::paneTabOfType
Find and return the pane tab with the desired type. If no such tab
exists, return None. Like [Hom:hou.Desktop#paneTabs], this method
searches pane tabs in the desktop or in floating panels attached to the
desktop.

Use [Hom:hou.ui#paneTabOfType] to search all the visible pane tabs,


regardless of whether they are attached to this desktop.

type:
A [Hom:hou.paneTabType] enumerated variable.

index:
If there are multiple tabs with the desired type, this parameter
determines which one is returned. Use `index=0` to return the first
found tab, `index=1` to return the second found tab, etc. By default,
index is 0.

This method can be approximately implemented as follows:


{{{
#!python
def paneTabOfType(self, tab_type, index=0):
pane_tabs = [t for t in self.paneTabs() if t.type() == tab_type]

if max(index, 0) > len(pane_tabs):


return None
return pane_tabs[max(index, 0)]
}}}

::`findPaneTab(self, name)` -> [Hom:hou.PaneTab] or None:


#cppname: HOM_Desktop::findPaneTab
Return the pane tab with the given name, or `None` if no such tab exists.
Like [Hom:hou.Desktop#paneTabs], this method searches pane tabs in the

http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop (3 of 6) [12/7/2009 4:32:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop

desktop or in floating panels attached to the desktop.

The name may optionally be prefixed by the desktop name and a period.

Use [Hom:hou.ui#findPaneTab] to search all the visible pane tabs,


regardless of whether they are attached to this desktop.

::`sceneViewers(self)` -> tuple of [Hom:hou.SceneViewer]:


#cppname: HOM_Desktop::sceneViewers
#replaces: Cmd:viewls
#status: ni

::`createFloatingPaneTab(self, pane_tab_type, position=(), size=())` -> [Hom:hou.PaneTab]:


#cppname: HOM_Desktop::createFloatingPaneTab
#replaces: Cmd:pane
Create and return a new floating window containing a single pane tab. Note
that this method creates a floating panel with a single pane tab, and the
graphical interface to add more tabs or split the pane inside the panel
is not exposed.

pane_tab_type:
A [Hom:hou.paneTabType] enumerated variable.

position:
A tuple of two floats specifying the X and Y positions of the new
window, respectively. The window will open near this position,
not necessarily exactly at this position. If this value is an empty
tuple, Houdini will choose a default location.

size:
A tuple of two floats specifying the width and height of the new
window, respectively. If this value is an empty tuple, Houdini will
choose a default size.

Also note that the floating panel containing the new pane tab does not
contain any panes: calling [Hom:hou.PaneTab#pane] on the pane tab returns
None, and calling [Hom:hou.FloatingPanel#panes] on its floating panel
returns an empty tuple. See [Hom:hou.FloatingPanel] for more information
on these stripped down floating panels.

See also [Hom:hou.Desktop#createFloatingPanel].

The following example function takes a [Hom:hou.Node] and opens a floating

http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop (4 of 6) [12/7/2009 4:32:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop

parameter pane pinned to that node.


{{{
#!python
def openParmPane(node):
'''Open a floating parameter pane for a particular node.'''
pane_tab = hou.ui.curDesktop().createFloatingPaneTab(hou.paneTabType.Parm)
pane_tab.setCurrentNode(node)
pane_tab.setPin(True)
return pane_tab
}}}

::`createFloatingPanel(self, pane_tab_type, position=(), size=())` -> [Hom:hou.FloatingPanel]:


#cppname: HOM_Desktop::createFloatingPanel
Create a floating panel and return it. The returned floating panel
contains one pane which contains one pane tab of the desired type.

See [Hom:hou.Desktop#createFloatingPaneTab] for a description of the


parameters. This method differs from createFloatingPaneTab in two ways:
First, it returns the floating panel instead of the pane tab. Second,
the floating panel that is created from this method is not locked down,
and the user can add more pane tabs and split the panes.

The following example creates a floating panel with a parameters pane tab
and a channel viewer (motion viewer) pane tab:
{{{
#!python
panel = hou.ui.curDesktop().createFloatingPanel(hou.paneTabType.Parm)
pane1 = panel.panes()[0]
pane2 = pane1.splitVertically()
pane2.tabs()[0].setType(hou.paneTabType.ChannelViewer)
}}}

::`shelfDock(self)` -> [Hom:hou.ShelfDock]:


#cppname: HOM_Desktop::shelfDock
Return the shelf dock for the current desktop.

::`displaySideHelp(self, show=True)` -> [Hom:hou.PaneTab]:


#cppname: HOM_Desktop::displaySideHelp
Show or hide the side help pane.

If show is set to True (default) this method displays the help pane and
returns a help browser pane tab. If set to False then this method hides
the help browser pane at the side of the desktop and returns None.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop (5 of 6) [12/7/2009 4:32:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop

::`homePage(self)`:
#cppname: HOM_Desktop::homePage
#replaces: Cmd:helpbrowser
#status: ni

::`setHomePage(self, home_page)`:
#cppname: HOM_Desktop::setHomePage
#replaces: Cmd:helpbrowser
#status: ni

::`paneTabLinkNumbers(self)` -> tuple of numbers / `None`:


#cppname: HOM_Desktop::paneLinkNumbers
#status: ni

::`panesTabInLinkNumber(self, number)` -> tuple of [Hom:hou.Pane]:


#cppname: HOM_Desktop::panesInLinkNumber
#status: ni

::`pathBasedPaneTabLinkNumbers(self)` -> tuple of numbers / `None`:


#cppname: HOM_Desktop::pathBasedPaneLinkNumbers
#replaces: Cmd:panepath
#status: ni

::`pathBasedPanesTabInLinkNumber(self, number)` -> tuple of [Hom:hou.Pane]:


#cppname: HOM_Desktop::pathBasedPanesInLinkNumber
#status: ni

::`setPathForAllPaneTabs(self, path)`:
#cppname: HOM_Desktop::setPathForAllPanes
#replaces: Cmd:panepath
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Desktop (6 of 6) [12/7/2009 4:32:41 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/FloatingPanel

= hou.FloatingPanel =
#type: homclass
#cppname: HOM_FloatingPanel
#category: UI

"""A floating window that contains one or more panes."""

Much like a desktop, a floating panel contains panes. A floating panel


may be attached to a desktop, in which case it is saved with the desktop,
hidden when the desktop is closed, and shown when the desktop is opened.
You can use floating panels to create desktops that span multiple monitors.

When you create a new floating panel, for example, it contains a single pane,
which in turn contains a single pane tab showing the network editor.

Note that a floating panel may be locked to one particular pane tab. These
stripped down panels do not display the interface for adding new pane tabs or
splitting panes. In fact, these stripped down floating panels do not contain
any panes at all, and [Hom:hou.FloatingPanel#panes] will return an empty tuple.
You can create such a stripped down floating panel with
[Hom:hou.Desktop#createFloatingPaneTab].

See [Hom:hou.Desktop] for more information about panes and pane tabs.

@methods

::`name(self)` -> `str`:


#cppname: HOM_FloatingPanel::name
Return the name of the floating panel. The panel's name is displayed in
its window's title.

::`setName(self, name)`:
#cppname: HOM_FloatingPanel::setName
Set this panel's name. Any characters in the name that are not letters,
numbers, or underscores are replaced with underscores.

Raises [Hom:hou.OperationFailed] if the name is an empty string.

::`panes(self)` -> tuple of [Hom:hou.Pane]:


#cppname: HOM_FloatingPanel::panes
Return all the panes inside the panel. As mentioned in the documentation
for this class, a floating panel may be stripped down and locked to one

http://www.sidefx.com/docs/houdini10.0/hom/hou/FloatingPanel (1 of 4) [12/7/2009 4:32:43 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/FloatingPanel

particular pane tab, and these stripped down floating panels do not contain
any panes.

::`paneTabs(self)` -> tuple of [Hom:hou.PaneTab]:


#cppname: HOM_FloatingPanel::paneTabs
Return all the pane tabs that are in this floating panel, regardless of
which pane they are in.

::`paneTabOfType(self, type, index=0)` -> [Hom:hou.PaneTab] or `None`:


#cppname: HOM_FloatingPanel::paneTabOfType
Find and return the pane tab with the desired type or `None` if no such
pane tab exists.

type:
A [Hom:hou.paneTabType] enumerated variable.

index:
If there are multiple tabs with the desired type, this parameter
determines which one is returned. Use `index=0` to return the first
found tab, `index=1` to return the second found tab, etc. By default,
index is 0.

::`findPaneTab(self, name)` -> [Hom:hou.PaneTab] or `None`:


#cppname: HOM_FloatingPanel::findPaneTab
Return the pane tab with the given name, or `None` if no such tab exists.

::`close(self)`:
#cppname: HOM_FloatingPanel::close
Close the floating panel's window, closing all the pane tabs inside it.

::`isAttachedToDesktop(self)` -> `bool`:


#cppname: HOM_FloatingPanel::isAttachedToDesktop
Return whether or not this panel is attached to the desktop. Panels
attached to the desktop are saved with the desktop and are opened when
the desktop is opened and closed when the desktop is closed.

See also [Hom:hou.FloatingPanel#attachToDesktop].

::`attachToDesktop(self, on)`:
#cppname: HOM_FloatingPanel::attachToDesktop
Attach this panel to the desktop. See
[Hom:hou.FloatingPanel#isAttachedToDesktop] for more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/FloatingPanel (2 of 4) [12/7/2009 4:32:43 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/FloatingPanel

::`containsPlaybar(self)` -> `bool`:


#cppname: HOM_FloatingPanel::containsPlaybar
Return whether or not this panel contains Houdini's playbar.

See also [Hom:hou.FloatingPanel#setContainsPlaybar].

::`setContainsPlaybar(self, on)`:
#cppname: HOM_FloatingPanel::setContainsPlaybar
If `on` is True, move Houdini's playbar to this panel. Otherwise, move
it back to the main desktop window.

See also [Hom:hou.FloatingPanel#containsPlaybar].

::`containsShelf(self)` -> `bool`:


#cppname: HOM_FloatingPanel::containsShelf
Return whether or not this panel contains Houdini's shelf.

See also [Hom:hou.FloatingPanel#setContainsShelf].

::`setContainsShelf(self, on)`:
#cppname: HOM_FloatingPanel::setContainsShelf
If `on` is True, move Houdini's shelf to this panel. Otherwise, move
it back to the main desktop window.

See also [Hom:hou.FloatingPanel#containsShelf].

::`containsStatusBar(self)` -> `bool`:


#cppname: HOM_FloatingPanel::containsStatusBar
Return whether or not this panel contains Houdini's status bar (the bar
at the bottom of the desktop for status messages).

See also [Hom:hou.FloatingPanel#setContainsStatusBar].

::`setContainsStatusBar(self, on)`:
#cppname: HOM_FloatingPanel::setContainsStatusBar
If `on` is True, move Houdini's status bar to this panel. Otherwise, move
it back to the main desktop window.

See also [Hom:hou.FloatingPanel#containsStatusBar].

::`containsMenuBar(self)` -> `bool`:


#cppname: HOM_FloatingPanel::containsMenuBar
Return whether or not this panel contains Houdini's main menu bar.

http://www.sidefx.com/docs/houdini10.0/hom/hou/FloatingPanel (3 of 4) [12/7/2009 4:32:43 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/FloatingPanel

See also [Hom:hou.FloatingPanel#setContainsMenuBar].

::`setContainsMenuBar(self, on)`:
#cppname: HOM_FloatingPanel::setContainsMenuBar
If `on` is True, move Houdini's main menu bar to this panel. Otherwise,
move it back to the main desktop window.

See also [Hom:hou.FloatingPanel#containsMenuBar].

::`isFullscreen(self)` -> `bool`:


#cppname: HOM_FloatingPanel::isFullscreen
Return whether or not this panel is in fullscreen mode.

See also [Hom:hou.FloatingPanel#setIsFullscreen].

::`setIsFullscreen(self, on)`:
#cppname: HOM_FloatingPanel::setIsFullscreen
Set whether or not this panel is in fullscreen mode.

See also [Hom:hou.FloatingPanel#isFullscreen].

http://www.sidefx.com/docs/houdini10.0/hom/hou/FloatingPanel (4 of 4) [12/7/2009 4:32:43 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HandleListPane

= hou.HandleListPane =
#type: homclass
#cppname: HOM_HandleListPane
#superclass: hou.Pane
#category: UI
#status: ni

@methods

::`setSplitFraction(self, fraction)`:
#cppname: HOM_HandleListPane::setSplitFraction
#status: ni

::`showHandleArea(self, on)`:
#cppname: HOM_HandleListPane::showHandleArea
#status: ni

::`showHandleGroupArea(self, on)`:
#cppname: HOM_HandleListPane::showHandleGroupArea
#status: ni

@replaces

- [Cmd:pilist]

http://www.sidefx.com/docs/houdini10.0/hom/hou/HandleListPane [12/7/2009 4:32:43 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HelpBrowser

= hou.HelpBrowser = #type: homclass #cppname: HOM_HelpBrowser #superclass: hou.PaneTab


#category: UI """Class representing a help browser pane tab. Provides methods for controlling the help
browser.""" @methods ::`displayData(self, data, base_uri="")`: #cppname: HOM_HelpBrowser::
displayData Loads the contents of a string directly into the help browser, either in plain text or html
format. If the data begins with ``, the browser will treat it as html; otherwise it will treat it as ascii text.
Use base_uri to specify the base URI when loading data into the browser, which is used to resolve
relative links from html data. Raises HOM_ObjectWasDeleted if the help browser pane tab was deleted,
and raises HOM_Error if data is not given. ::`displayHelp(self, node_type)`: #cppname:
HOM_HelpBrowser::displayHelp Loads the help for the specified node type. Raises
HOM_ObjectWasDeleted if the help browser pane tab was deleted. ::`displayHelpPath(self, help_path)`:
#cppname: HOM_HelpBrowser::displayHelpPath #status: nd ::`homePage(self)` -> `str`: #cppname:
HOM_HelpBrowser::homePage Returns the home page URL of this help browser. Raises
HOM_ObjectWasDeleted if the help browser pane tab was deleted. ::`setHomePage(self, home_page)`:
#cppname: HOM_HelpBrowser::setHomePage Sets the home page for this help browser to the specified
URL. Raises HOM_ObjectWasDeleted if the help browser pane tab was deleted, and raises HOM_Error
if home_page is not given. ::`setUrl(self, url)`: #cppname: HOM_HelpBrowser::setUrl Loads the
specified URL. Raises HOM_ObjectWasDeleted if the help browser pane tab was deleted, and raises
HOM_Error if url is not given. ::`showUI(self, show)`: #cppname: HOM_HelpBrowser::showUI Shows
or hides the help browser's navigation controls. Raises HOM_ObjectWasDeleted if the help browser
pane tab was deleted. ::`url(self)` -> `str`: #cppname: HOM_HelpBrowser::url Return the current URL
of this help browser. Raises HOM_ObjectWasDeleted if the help browser pane tab was deleted.
@replaces - [Cmd:helpbrowser]

http://www.sidefx.com/docs/houdini10.0/hom/hou/HelpBrowser [12/7/2009 4:32:44 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer

= hou.IPRViewer =
#type: homclass
#cppname: HOM_IPRViewer
#superclass: hou.Pane
#category: UI

"""An interactive preview render (IPR) window."""

The IPR viewer progressively refines a render, first providing a rough view
of the rendered image and eventually providing the fully rendered image.
When you change a shader value, move an object, etc., the viewer will re-render
the image.

When you Ctrl+click on a pixel in the rendered image, Houdini searches


`$HOUDINI_PATH` for `scripts/ipr/pickpixel.py` and runs it. The version of
this file that ships with Houdini pops up the shader contributing the pixel, or
an information window if there is is no shader. If Houdini cannot find that
Python file it then looks for the Hscript file `scripts/ipr/pickpixel.cmd`.

When you drag a SHOP node onto the rendered image, Houdini searches for
and runs `scripts/ipr/dragdrop.py`. By default, this script assigns the
SHOP to the object contributing the pixel. If it cannot find a Python
version, Houdini then looks for `scripts/ipr/dragdrop.cmd`.

Note that shelf scripts can access the last location the user clicked on with
[Hom:hou.IPRViewer#lastClickLocation].

@methods

::`isIPREnabled(self)` -> `bool`:


#cppname: HOM_IPRViewer::isIPREnabled
#replaces: Exp:iprquery
Return whether or not the Preview checkbox is checked. When it is
unchecked, the viewer will not progressively refine the image using IPR,
and will instead use the rendering engine from the ROP node to render it.

See also [Hom:hou.IPRViewer#enableIPR].

::`enableIPR(self, on)`:
#cppname: HOM_IPRViewer::enableIPR
#replaces: Exp:iprquery
Check or uncheck the Preview checkbox.

http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer (1 of 6) [12/7/2009 4:32:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer

See [Hom:hou.IPRViewer#isIPREnabled] for more information.

::`isAutoUpdateOn(self)` -> `bool`:


#cppname: HOM_IPRViewer::isAutoUpdateOn
#replaces: Cmd:iprview
Return whether or not the Auto-Update checkbox is checked. When it is
unchecked, the viewer will not refresh when objects, shaders, lights, etc.
change. In this case, you can force a re-render by clicking on the Render
button.

See also [Hom:hou.IPRViewer#setAutoUpdate].

::`setAutoUpdate(self, on)`:
#cppname: HOM_IPRViewer::setAutoUpdate
#replaces: Cmd:iprview
Check or uncheck the Auto-Update checkbox.

See [Hom:hou.IPRViewer#isAutoUpdateOn] for more information.

::`delay(self)` -> float:


#cppname: HOM_IPRViewer::delay
#replaces: Cmd:iprview
Return the contents of the viewer's Delay field. This value determines how
long Houdini waits between when you change a parameter value and when it
starts re-rendering.

See also [Hom:hou.IPRViewer#setDelay] and [Hom:hou.IPRViewer#updateTime].

::`setDelay(self, time)`:
#cppname: HOM_IPRViewer::setDelay
#replaces: Cmd:iprview
Set the contents of the viewer's Delay field.

See [Hom:hou.IPRViewer#delay] for more information.

::`updateTime(self)` -> float:


#cppname: HOM_IPRViewer::updateTime
Return the contents of the viewer's Update Time field. This value
determines approximately how long each progressive refinement should take.
Smaller values will produce more progressive renders where detail is
added more gradually.

http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer (2 of 6) [12/7/2009 4:32:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer

See also [Hom:hou.IPRViewer#setUpdateTime] and [Hom:hou.IPRViewer#delay].

::`setUpdateTime(self, time)`:
#cppname: HOM_IPRViewer::setUpdateTime
Set the contents of the viewer's Update Time field.

See [Hom:hou.IPRViewer#updateTime] for more information.

::`lastClickLocation(self)` -> (`int`, `int`):


#cppname: HOM_IPRViewer::lastClickLocation
Return the x and y coordinates for the pixel location where the user last
clicked in the IPR viewer. Note that this location might be outside the
image: the x and y coordinates can be negative and can be greater than
or equal to the image resolution. Note that if the user never clicked in
the viewer, the x and y coordinates will be negative.

You would typically call this method from a shelf script. For example,
a user can click on a pixel in the IPR viewer and then click on the shelf
to perform an action on that pixel (e.g. display the shader parameters,
assign a shader, etc.).

Use [Hom:hou.IPRViewer#imageResolution] to get the valid range for pixel


coordinates.

Note that when you Ctrl-click on a pixel, Houdini searches `$HOUDINI_PATH`


for `scripts/ipr/pickpixel.py` and runs it. This script can access the
viewer with `kwargs["viewer"]` and the location where the user clicked with
`kwargs["position"]`.

The following script opens a floating parameter window for the shader
corresponding to the pixel the user last clicked on.
{{{
#!python
viewer = hou.ui.paneTabOfType(hou.paneTabType.IPRViewer)
px, py = viewer.lastClickLocation()

if (px < 0 or px > viewer.imageResolution()[0] or


py < 0 or py >= viewer.imageResolution()[1]):
hou.ui.displayMessage("Click on the image and then run this script again")
else:
material = viewer.materialNode(px, py)

if material is not None:

http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer (3 of 6) [12/7/2009 4:32:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer

parm_window = hou.ui.curDesktop().createFloatingPaneTab(
hou.paneTabType.Parm)
parm_window.setCurrentNode(material)
parm_window.setPin(True)
else:
hou.ui.displayMessage("Click on an object to bring up the shader.")
}}}

::`ropNode(self)` -> [Hom:hou.RopNode] or `None`:


#cppname: HOM_IPRViewer::ropNode
#replaces: Exp:iprquerys
Return the ROP node that is selected in the viewer, or `None` if nothing
is selected.

::`imageResolution(self)` -> (`int`, `int`):


#cppname: HOM_IPRViewer::imageResolution
#replaces: Exp:iprquery
Return the resolution of the image.

Raises [Hom:hou.OperationFailed] if the viewer does not contain an image.

::`cropRegion(self)` -> (`float`, `float`, `float`, `float`):


#cppname: HOM_IPRViewer::cropRegion
#replaces: Exp:iprquery
Return the `x0`, `x1`, `y0`, and `y1` normalized coordinates of the
subregion that is selected, where `(x0, y0)` is the bottom-left corner
and `(x1, y1)` is the top-right corner of the subregion.

You can optionally tell the IPR viewer to only re-render only a portion of
the image. To select a subportion of the image, hold down shift and
select the box.

Note that the bottom-left corner is `(0.0, 0.0)` and the top-right corner
is `(1.0, 1.0)`. For example, if the entire image is being rendered, this
method returns `(0.0, 1.0, 0.0, 1.0)`.

::`planes(self)` -> `tuple` of `str`:


#cppname: HOM_IPRViewer::planes
#replaces: Exp:iprquery, Exp:iprquerys
Return the names of the image planes in the rendered output.

Note that the special `Op_Id` image plane contains the


[Hom:hou.Node#sessionId] ids of the object nodes in the image, plus 1. 0

http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer (4 of 6) [12/7/2009 4:32:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer

indicates that there is no object node associated with the pixel.


Use [Hom:hou.IPRViewer#objectNode] to access the object corresponding to
that id.

Similarly, the `Prim_Id` plane contains the [Hom:hou.Prim#number] ids of


the primitives in the image, plus 1. Use [Hom:hou.IPRViewer#prim] to
access the primitive corresponding to that id.

Raises [Hom:hou.OperationFailed] if the viewer does not contain an image.

::`pixel(self, plane_name, x, y)` -> `tuple` of `float`:


#cppname: HOM_IPRViewer::pixel
#replaces: Exp:iprquery
Return the value of a pixel in one plane of the image. This method returns
a tuple of 1 to 4 floats, depending on the type of image plane.

Note that the color plane is named `C`.

Raises [Hom:hou.OperationFailed] if the plane name is invalid, the pixel


location is outside the image, or the viewer does not contain an image.

You can determine the number of components in the image plane using the
following: `len(viewer.pixel(plane_name, 0, 0))`.

{{{
#!pycon
>>> viewer.pixel("C", 300, 200)
(0.69970703125, 0.46728515625, 0.289794921875, 1.0)
}}}

::`objectNode(self, x, y)` -> [Hom:hou.ObjNode] or `None`:


#cppname: HOM_IPRViewer::objectNode
#replaces: Exp:iprquerys
Return the object node contributing the pixel at the specified location,
or `None` if there is no object at the pixel or if the pixel location
is outside the image bounds

The following function returns the SOP node containing the geometry that
contributes the pixel to the final image:
{{{
#!python
def sopNode(viewer, x, y):
obj_node = viewer.objectNode(x, y)

http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer (5 of 6) [12/7/2009 4:32:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer

return (obj_node.renderNode() if obj_node is not None else None)


}}}

Raises [Hom:hou.OperationFailed] if the viewer does not contain an image.

::`prim(self, x, y)` -> [Hom:hou.Prim] or `None`:


#cppname: HOM_IPRViewer::prim
#replaces: Exp:iprquery
Return the geometry primitive contributing the pixel at the specified
location, or `None` if there is nothing at the pixel or if the pixel
location is outside the image bounds

Raises [Hom:hou.OperationFailed] if the viewer does not contain an image.

::`materialNode(self, x, y)` -> [Hom:hou.ShopNode] or `None`:


#cppname: HOM_IPRViewer::materialNode
#replaces: Exp:iprquerys
Return the SHOP node contributing the pixel at the specified location, or
`None` if there is nothing at the pixel, the pixel location is outside the
image bounds, or there is no shader on the geometry.

This method first checks the primitive corresponding to the pixel and
returns the SHOP corresponding to its `shop_materialpath` attribute.
If the primitive does not have this attribute then it returns the SHOP
assigned to the object. If no SHOP is assigned to the object, it returns
`None`.

Raises [Hom:hou.OperationFailed] if the viewer does not contain an image.

http://www.sidefx.com/docs/houdini10.0/hom/hou/IPRViewer (6 of 6) [12/7/2009 4:32:45 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/LightLinkerPane

= hou.LightLinkerPane =
#type: homclass
#cppname: HOM_LightLinkerPane
#superclass: hou.PathBasedPaneTab
#category: UI
#status: ni

@methods

::`linkSourceTreeNodeToCamera(self, on)`:
#cppname: HOM_LightLinkerPane::linkSourceTreeNodeToCamera
#status: ni

::`makeTargetTreeSelectionReadOnly(self, on)`:
#cppname: HOM_LightLinkerPane::makeTargetTreeSelectionReadOnly
#status: ni

::`setLinkTypeAndMode(self, type_and_mode)`:
#cppname: HOM_LightLinkerPane::setLinkTypeAndMode
#status: ni

::`setSourceTargetTreeSplitFraction(self, fraction)`:
#cppname: HOM_LightLinkerPane::setSourceTargetTreeSplitFraction
#status: ni

::`setSourceTreeFilter(self, node_type_filter)`:
#cppname: HOM_LightLinkerPane::setSourceTreeFilter
#status: ni

::`setSourceTreeSelectionMask(self, mask)`:
#cppname: HOM_LightLinkerPane::setSourceTreeSelectionMask
#status: ni

::`setSourceTreeSpreadsheetSplitFraction(self, fraction)`:
#cppname: HOM_LightLinkerPane::setSourceTreeSpreadsheetSplitFraction
#status: ni

::`setTargetTreeFilter(self, node_type_filter)`:
#cppname: HOM_LightLinkerPane::setTargetTreeFilter
#status: ni

::`setTargetTreeSelectionMask(self, mask)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/LightLinkerPane (1 of 2) [12/7/2009 4:32:46 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/LightLinkerPane

#cppname: HOM_LightLinkerPane::setTargetTreeSelectionMask
#status: ni

::`setTargetTreeSpreadsheetSplitFraction(self, fraction)`:
#cppname: HOM_LightLinkerPane::setTargetTreeSpreadsheetSplitFraction
#status: ni

::`showSourceTreeParmSpreadsheet(self, on)`:
#cppname: HOM_LightLinkerPane::showSourceTreeParmSpreadsheet
#status: ni

::`showSourceTreeSelectionToolbar(self, on)`:
#cppname: HOM_LightLinkerPane::showSourceTreeSelectionToolbar
#status: ni

::`showTargetTreeParmSpreadsheet(self, on)`:
#cppname: HOM_LightLinkerPane::showTargetTreeParmSpreadsheet
#status: ni

::`showTargetTreeSelectionToolbar(self, on)`:
#cppname: HOM_LightLinkerPane::showTargetTreeSelectionToolbar
#status: ni

@replaces

- [Cmd:linker]

http://www.sidefx.com/docs/houdini10.0/hom/hou/LightLinkerPane (2 of 2) [12/7/2009 4:32:46 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkEditor

= hou.NetworkEditor =
#type: homclass
#cppname: HOM_NetworkEditor
#superclass: hou.PathBasedPaneTab
#category: UI
#status: nd

@methods

::`autoPlaceNodes(self)` -> bool:


#cppname: HOM_NetworkEditor::autoPlaceNodes
#status: nd

::`graph(self)` -> NetworkGraph:


#cppname: HOM_NetworkEditor::graph
#status: ni

::`homeToSelection(self)`:
#cppname: HOM_NetworkEditor::homeToSelection

Centers the nodes within the network editor to show the current
selection.

::`list(self)` -> NetworkList:


#cppname: HOM_NetworkEditor::list
#status: ni

::`listMode(self)` -> bool:


#cppname: HOM_NetworkEditor::listMode
#status: nd

::`selectPosition(self, input_node=None, output_index=0, output_node=None, input_index=0)` -> Vector2:


#cppname: HOM_NetworkEditor::selectPosition
#status: nd

::`setGroupDialogSplitFraction(self, fraction)`:
#cppname: HOM_NetworkEditor::setGroupDialogSplitFraction
#status: ni

::`setListMode(self, list_mode)`:
#cppname: HOM_NetworkEditor::setListMode
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkEditor (1 of 2) [12/7/2009 4:32:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkEditor

::`showGraph(self)`:
#cppname: HOM_NetworkEditor::showGraph
#status: ni

::`showGroupDialog(self, on)`:
#cppname: HOM_NetworkEditor::showGroupDialog
#status: ni

::`showList(self)`:
#cppname: HOM_NetworkEditor::showList
#status: ni

::`showNodeToolbar(self, on)`:
#cppname: HOM_NetworkEditor::showNodeToolbar
#status: ni

::`showParmWindow(self, on)`:
#cppname: HOM_NetworkEditor::showParmWindow
#status: ni

::`showTreeControl(self, on)`:
#cppname: HOM_NetworkEditor::showTreeControl
#status: ni

@replaces

- [Cmd:neteditor]

http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkEditor (2 of 2) [12/7/2009 4:32:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkGraph

= hou.NetworkGraph =
#type: homclass
#cppname: HOM_NetworkGraph
#category: UI
#status: ni

@methods

::`centerOnPosition(self, x, y)`:
#cppname: HOM_NetworkGraph::centerOnPosition
#status: ni

::`colorNamesFor(self, tuple of node_qualities)`:


#cppname: HOM_NetworkGraph::colorNamesFor
#status: ni

::`setBGImageFileName(self, file_name)`:
#cppname: HOM_NetworkGraph::setBGImageFileName
#status: ni

::`setBGImageQuality(self, quality)`:
#cppname: HOM_NetworkGraph::setBGImageQuality
#status: ni

::`setConnectionStyle(self, style)`:
#cppname: HOM_NetworkGraph::setConnectionStyle
#status: ni

::`setGridSize(self, width, height)`:


#cppname: HOM_NetworkGraph::setGridSize
#status: ni

::`setGridStyle(self, style)`:
#cppname: HOM_NetworkGraph::setGridStyle
#status: ni

::`setLockBGImage(self, on)`:
#cppname: HOM_NetworkGraph::setLockBGImage
#status: ni

::`setSnapGravity(self, snap_gravity)`:
#cppname: HOM_NetworkGraph::setSnapGravity

http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkGraph (1 of 2) [12/7/2009 4:32:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkGraph

#status: ni

::`setSnappingAreas(self, tuple of areas)`:


#cppname: HOM_NetworkGraph::setSnappingAreas
#status: ni

::`setSnapToGrid(self, on)`:
#cppname: HOM_NetworkGraph::setSnapToGrid
#status: ni

::`setZoomLevel(self, level)`:
#cppname: HOM_NetworkGraph::setZoomLevel
#status: ni

::`showBGImage(self, on)`:
#cppname: HOM_NetworkGraph::showBGImage
#status: ni

::`showColorPalette(self, on)`:
#cppname: HOM_NetworkGraph::showColorPalette
#status: ni

::`showNodeNames(self, on)`:
#cppname: HOM_NetworkGraph::showNodeNames
#status: ni

::`showOverview(self, on)`:
#cppname: HOM_NetworkGraph::showOverview
#status: ni

@replaces

- [Cmd:neteditor]

http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkGraph (2 of 2) [12/7/2009 4:32:47 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkList

= hou.NetworkList =
#type: homclass
#cppname: HOM_NetworkList
#category: UI
#status: ni

@methods

::`setSortOrder(self, order)`:
#cppname: HOM_NetworkList::setSortOrder
#status: ni

::`showExposeFlag(self, on)`:
#cppname: HOM_NetworkList::showExposeFlag
#status: ni

@replaces

- [Cmd:neteditor]

http://www.sidefx.com/docs/houdini10.0/hom/hou/NetworkList [12/7/2009 4:32:48 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Pane

= hou.Pane =
#type: homclass
#cppname: HOM_Pane
#category: UI

"""A rectangular area of the desktop that contains one or more pane tabs."""

Desktops (and floating panels) are composed of one or more panes. Initially
a desktop contains one pane, and more panes are added to it by splitting
existing panes in two, either horizontally or vertically.

See [Hom:hou.Desktop] for more information about panes and pane tabs. See
[Hom:hou.FloatingPanel] for more information about floating panels.

@methods

::`tabs(self)` -> tuple of [Hom:hou.PaneTab]:


#cppname: HOM_Pane::tabs
Return the pane tabs in this pane.

::`tabOfType(self, type, index=0)` -> [Hom:hou.PaneTab] or `None`:


#cppname: HOM_Pane::tabOfType
Find and return a pane tab with the desired type, or `None` if no such tab
exists in the pane.

If there are multiple tabs in the pane with the desired type, then the
first found tab is returned. Use 'index' to return the other tabs. For
example, use 'index=0' to return the first found tab, use 'index=1' to
return the second found tab, etc.

See also [Hom:hou.ui#paneTabOfType].

::`currentTab(self)` -> [hom:hou.PaneTab]:


#cppname: HOM_Pane::currentTab
Return the currently focused pane tab.

See also [Hom:hou.PaneTab#setIsCurrentTab].

::`createTab(self, type)` -> [Hom:hou.PaneTab]:


#cppname: HOM_Pane::createTab
Create a new pane tab with the desired type and return it. The new pane
tab will be current (i.e. it will be the pane tab that's open).

http://www.sidefx.com/docs/houdini10.0/hom/hou/Pane (1 of 3) [12/7/2009 4:32:49 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Pane

::`splitHorizontally(self)` -> [Hom:hou.Pane]:


#cppname: HOM_Pane::splitHorizontally
#replaces: Cmd:pane
Split the pane, adding a new pane to the right, and return the new pane.
The new pane will have a single tab whose type is the same as the type of
this pane's current tab.

See also [Hom:hou.Pane#splitVertically].

::`splitVertically(self)` -> [Hom:hou.Pane]:


#cppname: HOM_Pane::splitVertically
#replaces: Cmd:pane
Split the pane, adding a new pane to the bottom, and return the new pane.
The new pane will have a single tab whose type is the same as the type of
this pane's current tab.

See also [Hom:hou.Pane#splitHorizontally].

::`desktop(self)` -> [Hom:hou.Desktop] or `None`:


#cppname: HOM_Pane::desktop
Return the desktop in which this pane exists, or `None` if it is in
a floating panel that's not attached to the desktop.

::`isMaximized(self)`:
#cppname: HOM_Pane::isMaximized
#status: ni

::`setIsMaximized(self, on)`:
#cppname: HOM_Pane::setIsMaximized
#status: ni

::`showsPaneBar(self)`:
#cppname: HOM_Pane::showsPaneBar
#status: ni

::`showPaneBar(self, on)`:
#cppname: HOM_Pane::showPaneBar
#status: ni

::`sendKey(self, hotkey_name)`:
#cppname: HOM_Pane::sendKey
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Pane (2 of 3) [12/7/2009 4:32:49 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Pane

::`swapWithPane(self, pane)`:
#cppname: HOM_Pane::swapWithPane
#replaces: Cmd:desk
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Pane (3 of 3) [12/7/2009 4:32:49 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PaneTab

= hou.PaneTab =
#type: homclass
#cppname: HOM_PaneTab
#category: UI

"""One of the tabs inside a desktop pane."""

Each pane type is of a particular type (e.g. scene viewer, network view,
parameters, etc.). A pane may contain multiple tabs and displays the contents
of one tab at a time.

See [Hom:hou.Desktop] for more information about panes and pane tabs.

@methods

::`name(self)` -> `str`:


#cppname: HOM_PaneTab::name
#replaces: Cmd:pane
Return the name of this tab.

::`setName(self, name)`:
#cppname: HOM_PaneTab::setName
#replaces: Cmd:pane
Set the name of this pane tab. A pane tab name may contain spaces.

Note that this name is the internal name of the tab, and is different from
the label displayed in the interface.

::`type(self)` -> [Hom:hou.paneTabType] enum value:


#cppname: HOM_PaneTab::type
Return the type of this tab (i.e. whether it is a scene viewer, parameter
editor, network editor, etc.).

::`setType(self, type)` -> [Hom:hou.PaneTab]:


#cppname: HOM_PaneTab::setType
#replaces: Cmd:pane
Create a new pane tab of the given type, replace this tab with it, and
return the new pane tab. Use the returned pane tab afterward; references
to this tab become invalid.

::`close(self)`:
#cppname: HOM_PaneTab::close

http://www.sidefx.com/docs/houdini10.0/hom/hou/PaneTab (1 of 3) [12/7/2009 4:32:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PaneTab

#replaces: Cmd:pane
Close the pane tab.

::`pane(self)` -> [Hom:hou.Pane] or `None`:


#cppname: HOM_PaneTab::pane
Return the pane in the desktop that contains this pane tab. Note that pane
tabs in regular floating panels are always in a pane, since regular
floating panels contain one or more panes.

However, some floating panels have their content stripped down to only
contain one particular pane tab type, and do not display the user interface
to add more pane tabs, split the pane, etc. This method returns None for
these stripped down floating panels.

::`isCurrentTab(self)` -> `bool`:


#cppname: HOM_PaneTab::isCurrentTab
Return whether this tab is the selected tab in the containing pane.

::`setIsCurrentTab(self)`:
#cppname: HOM_PaneTab::setIsCurrentTab
Set this tab as the selected tab in the containing pane.

::`isFloating(self)` -> `bool`:


#cppname: HOM_PaneTab::isFloating
#replaces: Cmd:pane
Return whether this pane tab is in a floating panel.

This method can be approximately implemented as follows:


{{{
#!python
def isFloating(self):
return self.pane() is None or self.pane().floatingPanel() is not None
}}}

::`clone(self)` -> [Hom:hou.PaneTab]:


#cppname: HOM_PaneTab::clone
Create a floating copy of the pane tab and return the cloned pane tab.
The new pane tab is in a new floating panel.

::`linkGroup(self)` -> [Hom:hou.paneLinkType] enum value:


#cppname: HOM_PaneTab::linkGroup
Return the link group that this pane tab belongs to.

http://www.sidefx.com/docs/houdini10.0/hom/hou/PaneTab (2 of 3) [12/7/2009 4:32:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PaneTab

See also [Hom:hou.PaneTab#isPin].

::`setLinkGroup(self, group)`:
#cppname: HOM_PaneTab::setLinkGroup
Set the link group membership of this pane tab.

::`isPin(self)` -> `bool`:


#cppname: HOM_PaneTab::isPin
Return whether this pane tab is pinned. This method is equivalent to
`(self.linkGroup() == hou.paneLinkType.Pinned)`

See also [Hom:hou.PaneTab#linkGroup].

::`setPin(self, pin)`:
#cppname: HOM_PaneTab::setPin
If pin is `True`, set the link group membership to hou.paneLinkType.Pinned.
Otherwise, set it to hou.paneLinkType.FollowSelection. This method can be
implemented using [Hom:hou.PaneTab#setLinkGroup] as follows:

{{{
#!python
def setPin(self, pin):
if pin:
self.setLinkGroup(hou.paneLinkType.Pinned)
else:
self.setLinkGroup(hou.paneLinkType.FollowSelection)
}}}

See also [Hom:hou.PaneTab#setLinkGroup].

http://www.sidefx.com/docs/houdini10.0/hom/hou/PaneTab (3 of 3) [12/7/2009 4:32:50 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmPane

= hou.ParmPane =
#type: homclass
#cppname: HOM_ParmPane
#superclass: hou.PathBasedPaneTab
#category: UI
#status: ni

@methods

::`setWorldTreeSplitFraction(self, fraction)`:
#cppname: HOM_ParmPane::setWorldTreeSplitFraction
#status: ni

::`showWorldTree(self, on)`:
#cppname: HOM_ParmPane::showWorldTree
#status: ni

@replaces

- [Cmd:parmeditor]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmPane [12/7/2009 4:32:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmSpreadsheetPane

= hou.ParmSpreadsheetPane =
#type: homclass
#cppname: HOM_ParmSpreadsheetPane
#superclass: hou.Pane
#category: UI
#status: ni

@methods

::`applyFilterToTree(self, on)`:
#cppname: HOM_ParmSpreadsheetPane::applyFilterToTree
#status: ni

::`setNodeMask(self, mask)`:
#cppname: HOM_ParmSpreadsheetPane::setNodeMask
#status: ni

::`setNodeTypeFilter(self, node_type_filter)`:
#cppname: HOM_ParmSpreadsheetPane::setNodeTypeFilter
#status: ni

::`setParmMask(self, mask)`:
#cppname: HOM_ParmSpreadsheetPane::setParmMask
#status: ni

::`setTreeSplitFraction(self, fraction)`:
#cppname: HOM_ParmSpreadsheetPane::setTreeSplitFraction
#status: ni

::`showFlagsInTree(self, on)`:
#cppname: HOM_ParmSpreadsheetPane::showFlagsInTree
#status: ni

::`showFullNodePaths(self, on)`:
#cppname: HOM_ParmSpreadsheetPane::showFullNodePaths
#status: ni

::`showParmsInTree(self, on)`:
#cppname: HOM_ParmSpreadsheetPane::showParmsInTree
#status: ni

::`showTreeView(self, on)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmSpreadsheetPane (1 of 2) [12/7/2009 4:32:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmSpreadsheetPane

#cppname: HOM_ParmSpreadsheetPane::showTreeView
#status: ni

@replaces

- [Cmd:parmsheet]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParmSpreadsheetPane (2 of 2) [12/7/2009 4:32:51 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PathBasedPaneTab

= hou.PathBasedPaneTab =
#type: homclass
#cppname: HOM_PathBasedPaneTab
#superclass: hou.Pane
#category: UI
#status: nd

@methods

::`addBookmark(self, path)`:
#cppname: HOM_PathBasedPaneTab::addBookmark
#status: ni

::`bookmarks(self)`:
#cppname: HOM_PathBasedPaneTab::bookmarks
#status: ni

::`cd(self, path)`:
#cppname: HOM_PathBasedPaneTab::cd
#status: nd

::`currentNode(self)` -> `Node`:


#cppname: HOM_PathBasedPaneTab::currentNode
#status: nd

::`followsParent(self)`:
#cppname: HOM_PathBasedPaneTab::followsParent
#status: ni

::`pwd(self)` -> Node:


#cppname: HOM_PathBasedPaneTab::pwd
#status: nd

::`removeBookmarks(self, path_pattern)`:
#cppname: HOM_PathBasedPaneTab::removeBookmarks
#status: ni

::`setCurrentNode(self, node)`:
#cppname: HOM_PathBasedPaneTab::setCurrentNode
#status: nd

::`setFollowParent(self, on)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/PathBasedPaneTab (1 of 2) [12/7/2009 4:32:52 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PathBasedPaneTab

#cppname: HOM_PathBasedPaneTab::setFollowParent
#status: ni

::`setPwd(self, node)`:
#cppname: HOM_PathBasedPaneTab::setPwd
#status: nd

::`showNetworkControls(self, on)`:
#cppname: HOM_PathBasedPaneTab::showNetworkControls
#status: ni

::`showsNetworkControls(self)`:
#cppname: HOM_PathBasedPaneTab::showsNetworkControls
#status: ni

@replaces

- [Cmd:bookmark]
- [Cmd:pane]
- [Exp:mousepath]

http://www.sidefx.com/docs/houdini10.0/hom/hou/PathBasedPaneTab (2 of 2) [12/7/2009 4:32:52 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/TakeListPane

= hou.TakeListPane =
#type: homclass
#cppname: HOM_TakeListPane
#superclass: hou.Pane
#category: UI
#status: ni

@methods

::`setSplitFraction(self, fraction)`:
#cppname: HOM_TakeListPane::setSplitFraction
#status: ni

::`showContents(self, on)`:
#cppname: HOM_TakeListPane::showContents
#status: ni

::`splitFraction(self)`:
#cppname: HOM_TakeListPane::splitFraction
#status: ni

@replaces

- [Cmd:takelist]

http://www.sidefx.com/docs/houdini10.0/hom/hou/TakeListPane [12/7/2009 4:32:52 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/fileChooserMode

= hou.fileChooserMode =
#type: hommodule
#cppname: HOM_fileChooserMode
#category: UI

"""Enumeration of possible read/write modes for the file chooser."""

See [Hom:hou.ui#selectFile] for more information.

* hou.fileChooserMode.Read
* hou.fileChooserMode.Write
* hou.fileChooserMode.ReadAndWrite

http://www.sidefx.com/docs/houdini10.0/hom/hou/fileChooserMode [12/7/2009 4:32:53 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/isUIAvailable

= hou.isUIAvailable =

#type: homfunction
#cppname: isUIAvailable
#category: UI

"""Return whether or not the hou.ui module is available."""

@usage
`isUIAvailable()` -> bool

The hou.ui module is not available in the command-line interpreter or in


mplay, and this function helps you to write scripts that will run in
Houdini and command-line and/or mplay.

@related

- [Hom:hou.ui]

http://www.sidefx.com/docs/houdini10.0/hom/hou/isUIAvailable [12/7/2009 4:32:53 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/paneLinkType

= hou.paneLinkType =
#type: hommodule
#cppname: HOM_paneLinkType
#category: UI
#status: nd

"""Enumeration of possible pane link values."""

* hou.paneLinkType.Pinned
* hou.paneLinkType.Group1
* hou.paneLinkType.Group2
* hou.paneLinkType.Group3
* hou.paneLinkType.Group4
* hou.paneLinkType.Group5
* hou.paneLinkType.Group6
* hou.paneLinkType.Group7
* hou.paneLinkType.Group8
* hou.paneLinkType.FollowSelection

http://www.sidefx.com/docs/houdini10.0/hom/hou/paneLinkType [12/7/2009 4:32:53 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/paneTabType

= hou.paneTabType =
#type: hommodule
#cppname: HOM_paneTabType
#category: UI
#status: nd

"""Enumeration of pane tab types."""

* hou.paneTabType.SceneViewer
* hou.paneTabType.ChannelViewer
* hou.paneTabType.CompositorViewer
* hou.paneTabType.ParticleViewer
* hou.paneTabType.OutputViewer
* hou.paneTabType.MaterialPalette
* hou.paneTabType.IPRViewer
* hou.paneTabType.NetworkEditor
* hou.paneTabType.Parm
* hou.paneTabType.DetailsView
* hou.paneTabType.ChannelEditor
* hou.paneTabType.ChannelList
* hou.paneTabType.Textport
* hou.paneTabType.HandleList
* hou.paneTabType.BundleList
* hou.paneTabType.TakeList
* hou.paneTabType.TreeView
* hou.paneTabType.HelpBrowser
* hou.paneTabType.ParmSpreadsheet
* hou.paneTabType.LightLinker

http://www.sidefx.com/docs/houdini10.0/hom/hou/paneTabType [12/7/2009 4:32:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/reloadChannelGroupMenuFile

= hou.reloadChannelGroupMenuFile =

#type: homfunction
#cppname: hom::reloadChannelGroupMenuFile
#category: UI
#status: ni

@usage
`reloadChannelGroupMenuFile()`

@replaces
- [Cmd:menurefresh]

http://www.sidefx.com/docs/houdini10.0/hom/hou/reloadChannelGroupMenuFile [12/7/2009 4:32:54 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/reloadNodeMenuFile

= hou.reloadNodeMenuFile =

#type: homfunction
#cppname: hom::reloadNodeMenuFile
#category: UI
#status: ni

@usage
`reloadNodeMenuFile()`

@replaces
- [Cmd:menurefresh]

http://www.sidefx.com/docs/houdini10.0/hom/hou/reloadNodeMenuFile [12/7/2009 4:32:55 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/reloadParmMenuFile

= hou.reloadParmMenuFile =

#type: homfunction
#cppname: hom::reloadParmMenuFile
#category: UI
#status: ni

@usage
`reloadParmMenuFile()`

@replaces
- [Cmd:menurefresh]

http://www.sidefx.com/docs/houdini10.0/hom/hou/reloadParmMenuFile [12/7/2009 4:32:55 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/severityType

= hou.severityType =
#type: hommodule
#cppname: HOM_severityType
#category: UI
#status: nd

"""Enumeration of dialog message severities."""

* hou.severityType.Message
* hou.severityType.Warning
* hou.severityType.Error
* hou.severityType.Fatal

http://www.sidefx.com/docs/houdini10.0/hom/hou/severityType [12/7/2009 4:32:56 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ui

= hou.ui =
#type: hommodule
#cppname: HOM_ui
#category: UI

"""Module containing user interface related functions."""

@functions

::`curDesktop()` -> [Hom:hou.Desktop]:


#cppname: HOM_ui::curDesktop
#replaces: Cmd:desk
Return the current desktop.

::`desktops()` -> `tuple` of [Hom:hou.Desktop]:


#cppname: HOM_ui::desktops
#replaces: Cmd:desk
Return all the desktops.

See [Hom:hou.Desktop#setAsCurrent] for an example.

::`addDesktop(name)`:
#cppname: HOM_ui::addDesktop
#replaces: Cmd:desk
#status: ni

::`paneTabs(self)` -> `tuple` of [Hom:hou.PaneTab]:


#cppname: HOM_ui::paneTabs
Return a tuple of all visible pane tabs, including those in all floating
windows.

See also [Hom:hou.Desktop#paneTabs].

::`floatingPaneTabs(self)` -> `tuple` of [Hom:hou.PaneTab]:


#cppname: HOM_ui::floatingPaneTabs
Return all the pane tabs in floating panels.

See also [Hom:hou.Desktop#floatingPaneTabs].

::`paneTabOfType(self, type, index=0)` -> [Hom:hou.PaneTab] or `None`:


#cppname: HOM_ui::paneTabOfType
Find and return the pane tab with the desired type. If no such tab
exists, return None.

type:
A [Hom:hou.paneTabType] enumerated variable.

index:
If there are multiple tabs with the desired type, this parameter
determines which one is returned. Use `index=0` to return the first
found tab, `index=1` to return the second found tab, etc. By default,
index is 0.

See also [Hom:hou.Desktop#paneTabOfType].

::`paneTabUnderMouse()` -> `[Hom:hou.PaneTab]` or None:


#cppname: HOM_ui::paneUnderMouse
#replaces: Exp:mousepane
#status: ni

::`findPaneTab(self, name)` -> [Hom:hou.PaneTab] or None:


#cppname: HOM_ui::findPaneTab

http://www.sidefx.com/docs/houdini10.0/hom/hou/ui (1 of 6) [12/7/2009 4:32:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ui

Return the pane tab with the given name, or `None` if no such tab exists.

The name may optionally be prefixed by the desktop name and a period.

See also [Hom:hou.Desktop#findPaneTab].

::`floatingPanels(self)` -> `tuple` of [Hom:hou.FloatingPanel]:


#cppname: HOM_ui::floatingPanels
Return all the visible floating panels.

See also [Hom:hou.Desktop#floatingPanels].

::`displayMessage(text, buttons=('OK',), severity=hou.severityType.Message, default_choice=0, help=None, title=None, details=None)` -> int:


#cppname: HOM_ui::displayMessage
#replaces: Cmd:message
Pop up a small window with a message and one or more buttons and wait for
the user to press a button. Return the index of the button the user
pressed.

text:
The message to display.

buttons:
A sequence of strings containing the names of the buttons. By default
the message window contains a single OK button.

severity:
A [Hom:hou.severityType] value that determines which icon to display
on the dialog. Note that using `hou.severityType.Fatal` will exit
Houdini after the user closes the dialog.

default_choice:
The index of the button that is selected if the user presses enter.

help:
Additional help information to display below the main message.

title:
The window's title. If `None`, the title is "Houdini".

details:
A string containing extra messages that is not visible unless the
user clicks "Show Details".

{{{
#!python
def saveIfNeeded():
'''Prompt the user if they want to save, and save the hip file if they choose Yes.'''
if hou.ui.displayMessage("Save the current hip file?", buttons=("Yes", "No")) == 0:
hou.hipFile.save()
}}}

::`readInput(message, severity=hou.severityType.Message, help=None, title=None)` -> (`int`, `str`):


#cppname: HOM_ui::readInput
Pop up a small window with a textbox and wait for the user to enter a line
of text. Return a tuple containing an integer and the text they entered.
The integer is 0 if they pressed OK and -1 if they closed the dialog by
clicking its close button.

message:
The message to display above the text field.

severity:

http://www.sidefx.com/docs/houdini10.0/hom/hou/ui (2 of 6) [12/7/2009 4:32:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ui

A [Hom:hou.severityType] value that determines which icon to display


on the dialog. Note that using `hou.severityType.Fatal` will exit
Houdini after the user closes the dialog.

help:
Additional help information to display below the main message.

title:
The window's title. If `None`, the title is "Houdini".

::`selectFile(start_directory=None, title=None, collapse_sequences=False, file_type=hou.fileType.None, pattern=None, default_value=None, multiple_select=False, image_chooser=False, chooser_mode=hou.fileChooserMode.ReadAndWrite)` -> `str`:
#cppname: HOM_ui::selectFile
#replaces: Cmd:filechooser
Pop up a window with a file chooser dialog and wait for the user to
choose a file name. Return the path to the file that was selected.

start_directory:
The directory the dialog should initially start in.

title:
The window title for the dialog.

collapse_sequences:
Whether sequences of files with common numeric patterns should be
collapsed into patterns containing $F.

file_type:
A [Hom:hou.fileType] enumerated value to say what type of file to
select. The set of visible files is determined by this file type
and the pattern.

pattern:
Only files matching this pattern (and anything restricted by the file
type) will be listed. By default, everything matches the pattern.

default_value:
The default contents of the file name field in the dialog.

multiple_select:
Whether the user may select multiple files.

image_chooser:
Whether the dialog shows image thumbnails.

chooser_mode:
A [Hom:hou.fileChooserMode] enumeration value to say if the user is
being prompted for a file to read from, write to, or either.

::`selectFromList(choices, default_choices=(0,), exclusive=False, message=None, title=None)` -> `tuple` of `int`:


#cppname: HOM_ui::selectFromList
#replaces: Cmd:listchooser
Pop up a window with a set of choices in a list box and prompt the user to
choose zero or more of them.

choices:
A sequence of strings containing the possible choices.

default_choices:
A sequence of integers containing the indices of the choices that
are initially selected.

exclusive:
Whether or not the user must choose exactly one of the possible choices.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ui (3 of 6) [12/7/2009 4:32:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ui

message:
The message to display above the list box.

title:
The window's title. If `None`, the title is "Houdini".

::`selectNode(relative_to_node=None, initial_node=None, node_type_filter=None)` -> `str` or `None`:


#cppname: HOM_ui::selectNode
Pop up a window with a node tree view and prompt the user to choose a node.

If the user selects a node, returns a string containing the path to the
node. If the user presses clear, returns an empty string. If the user
presses cancel, returns `None`.

relative_to_node:
A [Hom:hou.Node] for relative paths, or `None` if relative paths are
not supported. Passing in a node enables the Use Relative Paths
checkbox.

If this parameter is supplied and the user checks the Use Relative
Paths checkbox, this function returns a relative path to the node.

initial_node:
The [Hom:hou.Node] that is initially selected.

node_type_filter:
An optional [Hom:hou.nodeTypeFilter] enumerated value that determines
which types of nodes appear in the tree view.

The following function takes a [Hom:hou.Parm], prompts the user to choose


a node, and sets the value of the parameter as long as the user does not
click cancel.
{{{
#!python
def setParmOnNode(parm, node_type_filter=None):
path = hou.ui.selectNode(relative_to_node=parm.node(), node_type_filter=node_type_filter)
if path is not None:
parm.set(path)
}}}

You might call this function as follows:


{{{
#!pycon
>>> setParmOnNode(hou.parm("/obj/box_object1/shop_materialpath"), hou.nodeTypeFilter.Shop)
}}}

::`displayNodeHelp(node_type)`:
#cppname: HOM_ui::displayNodeHelp
#replaces: Cmd:ophelp
Display the help for the specified node type. If no help browser is open,
this function will create a new one.

If you want to display the help for a node instance, it is easy to access
the [Hom:hou.NodeType] from the node, as illustrated in this example:
{{{
#!python
def displayHelpForNode(node):
'''Given a hou.Node, display its help.'''
hou.ui.displayNodeHelp(node.type())
}}}

::`openTypePropertiesDialog(node_or_node_type, promote_spare_parms=False, immediately_save=False)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/ui (4 of 6) [12/7/2009 4:32:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ui

#cppname: HOM_ui::openTypePropertiesDialog
#replaces: Cmd:otedit, Cmd:propertyedit
Given a [Hom:hou.Node] or [Hom:hou.NodeType] instance, open the spare
properties dialog.

promote_spare_parms:
If this parameter is True and you passed in a node instance,
automatically promote any spare parameters on the node into
parameters on the node type.

immediately_save:
When true, immediately save the current state of the node type,
as if you clicked "Apply" in the type properties dialog.

::`addEventLoopCallback(callback)`:
#cppname: HOM_ui::addEventLoopCallback
Register a Python callback to be called whenever Houdini's event loop is
idle. This callback is called approximately every 50ms, unless Houdini
is busy processing events.

callback:
Any callable Python object that expects no parameters. It could be
a Python function, a bound method, or any object implementing
\_\_call\_\_.

{{{
#!python
def checkForAndProcessEvents():
# Here is where you would check for and process any events.
pass
hou.ui.addEventLoopCallback(checkForAndProcessEvents)
}}}

You might use this function to integrate another user interface toolkit
into Houdini's event loop. See the [PyQt|/hom/cookbook/pyqt/part1] and
[wxPython|/hom/cookbook/wxPython] cookbook examples for example usages.

::`removeEventLoopCallback(callback)`:
#cppname: HOM_ui::removeEventLoopCallback
Remove a Python callback that was previously registered with
[Hom:hou.ui#addEventLoopCallback]. See [Hom:hou.ui#addEventLoopCallback]
for more information.

Raises [Hom:hou.OperationFailed] if the callback was not previously


registered.

::`eventLoopCallbacks()` -> `tuple` of callback:


#cppname: HOM_ui::eventLoopCallbacks
Return a tuple of all the Python callbacks that have been registered with
[Hom:hou.ui#addEventLoopCallback].

::`processPendingEvents()`:
#cppname: HOM_ui::update
#replaces: updateui
#status: ni

::`updateMode()` -> [Hom:hou.updateMode] enum value:


#cppname: HOM_ui::updateMode
Return Houdini's cook update mode (Auto Update/On Mouse Up/Manual) that is
displayed in the status bar.

Houdini's update mode determines when it will recook its nodes after you
make parameter changes. When it is Auto Update, it will recook whenever

http://www.sidefx.com/docs/houdini10.0/hom/hou/ui (5 of 6) [12/7/2009 4:32:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ui

any parameter changes. When it is On Mouse Up, it will not recook while
you are tuning a parameter with a viewport or ladder handle until you
release the mouse. When it is Manual, it will only recook when you press
the update button in the status bar.

See also [Hom:hou.ui#setUpdateMode] and [Hom:hou.ui#triggerUpdate].

::`setUpdateMode(mode)`:
#cppname: HOM_ui::setUpdateMode
Set Houdini's cook update mode to a [Hom:hou.updateMode] enumerated value.
See [Hom:hou.ui#updateMode] for more information.

::`triggerUpdate()`:
#cppname: HOM_ui::triggerUpdate
#replaces: Cmd:viewupdate
Force the viewports to update and perform any cooks necessary. You might
call this function when Houdini's Auto Update mode is on Manual.

::`showFloatingDetailsViewWindow(node)`:
#cppname: HOM_Node::showFloatingDetailsViewWindow
#replaces: Cmd:oppane
#status: ni

::`showFloatingParmWindow(node)`:
#cppname: HOM_Node::showFloatingParmWindow
#replaces: Cmd:oppane
#status: ni

::`makeSureChannelEditorIsOpen()`:
#cppname: HOM_ui::makeSureChannelEditorIsOpen
#replaces: Cmd:chscope
#status: ni

::`isDoubleBufferOn()`:
#cppname: HOM_ui::isDoubleBufferOn
#replaces: Cmd:doublebuffer
#status: ni

::`setDoubleBuffer(on)`:
#cppname: HOM_ui::setDoubleBuffer
#replaces: Cmd:doublebuffer
#status: ni

::`shellIO()` -> [Hom:hou.ShellIO]:


#cppname: HOM_ui::shellIO
Return the [Hom:hou.ShellIO] object used to implement Houdini's graphical
Python shell. This function is used internally by Houdini, and you
shouldn't need to access the ShellIO directly.

::`_getTabMenuIconSize()` -> (`int`, `int`):


#cppname: HOM_ui::_getTabMenuIconSize
Used internally by Houdini to get the current icon size in the tab
menu.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ui (6 of 6) [12/7/2009 4:32:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/BoundingBox

= hou.BoundingBox =
#type: homclass
#cppname: HOM_BoundingBox
#category: Utility

"""An axis-aligned 3D rectangular region."""

For example, a bounding box might describe a piece of geometry's minimum and
maximum values on each of the coordinate axes. See
[Hom:hou.Geometry#boundingBox] for an example of a function that returns
a bounding box.

@methods

::`__init__(self, xmin=0.0, ymin=0.0, zmin=0.0, xmax=0.0, ymax=0.0, zmax=0.0)`:


#cppname: HOM_BoundingBox::HOM_BoundingBox
Construct a new bounding box with the specified minimum and maximum
bounds. Use [Hom:hou.BoundingBox#setTo] to change the position of an
existing bounding box.

::`setTo(self, bounds_sequence)`:
#cppname: HOM_BoundingBox::setTo
Given a sequence of (xmin, ymin, zmin, xmax, ymax, zmax) values, set the
position of the bounding box.

Raises [Hom:hou.InvalidSize] if the tuple does not contain six elements.

::`minvec(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_BoundingBox::minvec
Return a vector describing the corner of the box with the smallest `x`,
`y`, and `z` values.

::`maxvec(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_BoundingBox::maxvec
Return a vector describing the corner of the box with the largest `x`,
`y`, and `z` values.

::`sizevec(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_BoundingBox::sizevec
Return a vector describing the size of the box in each of the `x`, `y`,
and `z` axes.

http://www.sidefx.com/docs/houdini10.0/hom/hou/BoundingBox (1 of 2) [12/7/2009 4:32:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/BoundingBox

This method can be implemented as follows:


{{{
#!python
def sizevec(self):
return self.maxvec() - self.minvec()
}}}

::`center(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_BoundingBox::center
Return the position of the center of the bounding box.

This method can be implemented as follows:


{{{
#!python
def sizevec(self):
return (self.minvec() + self.maxvec()) * 0.5
}}}

::`enlargeToContain(self, point_or_bbox)`:
#cppname: HOM_BoundingBox::enlargeToContain
Enlarge the bounding box to contain the given element. The element
may be a [Hom:hou.Vector3] describing a position or another bounding
box. If this box does not need to grow because it already completely
contains the element, it won't be modified.

::`isAlmostEqual(self, bbox, tolerance=0.00001)` -> `bool`:


#cppname: HOM_BoundingBox::isAlmostEqual
Returns whether this bounding box is equal to another, subject
to numerical tolerances.

::`__mul__(self, matrix4)` -> `BoundingBox`:


#cppname: HOM_BoundingBox::__mul__
Take this bounding box, transform it by the given matrix, compute the
axis-aligned bounding box around this transformed box, and return it.

http://www.sidefx.com/docs/houdini10.0/hom/hou/BoundingBox (2 of 2) [12/7/2009 4:32:58 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Color

= hou.Color =
#type: homclass
#cppname: HOM_Color
#category: Utility
#status: nd

@methods

::`hsl(self)` -> `(float, float, float)`:


#cppname: HOM_Color::hsl
#status: nd

::`hsv(self)` -> `(float, float, float)`:


#cppname: HOM_Color::hsv
#status: nd

::`lab(self)` -> `(float, float, float)`:


#cppname: HOM_Color::lab
#status: nd

::`rgb(self)` -> `(float, float, float)`:


#cppname: HOM_Color::rgb
#status: nd

::`setHSL(self, tuple)`:
#cppname: HOM_Color::setHSL
#status: nd

::`setHSV(self, tuple)`:
#cppname: HOM_Color::setHSV
#status: nd

::`setLAB(self, tuple)`:
#cppname: HOM_Color::setLAB
#status: nd

::`setRGB(self, tuple)`:
#cppname: HOM_Color::setRGB
#status: nd

::`setXYZ(self, tuple)`:
#cppname: HOM_Color::setXYZ

http://www.sidefx.com/docs/houdini10.0/hom/hou/Color (1 of 2) [12/7/2009 4:32:59 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Color

#status: nd

::`xyz(self)` -> `(float, float, float)`:


#cppname: HOM_Color::xyz
#status: nd

::`__add__(self, color)` -> `Color`:


#cppname: HOM_Color::__add__
#status: nd

::`__init__(self [, (r, g, b)])` -> `Color`:


#cppname: HOM_Color::__init__
#status: nd

::`__mul__(self, scalar) -> Color`:


#cppname: HOM_Color::__mul__
#status: nd

@replaces

- [Exp:rgb]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Color (2 of 2) [12/7/2009 4:32:59 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix3

= hou.Matrix3 =
#type: homclass
#cppname: HOM_Matrix3
#category: Utility

"""A 3x3 matrix of floating point values."""

3x3 matrices are typically used in Houdini to represent a 3D rotation (with


a possible scale). Most places in Houdini use [Hom:hou.Matrix4], which can
store generation 3D transformations (including translations).

Note that you can construct a general transformation Matrix4 from a Matrix3
by writing `hou.Matrix4(matrix3)`.

@methods

::`__init__(self, values)`:
#cppname: HOM_Matrix3::Matrix3
#replaces: Exp:matrix
Return a new Matrix3. You can pass no parameters (the result will contain
all zeros), a float (the result's diagonal values will contain that float
and the rest is all zeros), a sequence of 9 floats, or a sequence of
sequences of 3 floats.

{{{
#!pycon
>>> hou.Matrix3()
<hou.Matrix3 [[0, 0, 0], [0, 0, 0], [0, 0, 0]]>

>>> hou.Matrix3(1)
<hou.Matrix3 [[1, 0, 0], [0, 1, 0], [0, 0, 1]]>

>>> hou.Matrix3((0, 1, 2, 3, 4, 5, 6, 7, 8))


<hou.Matrix3 [[0, 1, 2], [3, 4, 5], [6, 7, 8]]>

>>> hou.Matrix3(((0, 1, 2), (3, 4, 5), (6, 7, 8)))


<hou.Matrix3 [[0, 1, 2], [3, 4, 5], [6, 7, 8]]>
}}}

Note that Houdini's matrices are stored in row-major order, so the matrix's
contents are grouped by row.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix3 (1 of 4) [12/7/2009 4:33:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix3

::`at(self, row, col)` -> `double`:


#cppname: HOM_Matrix3::at
Return the value of the matrix at the given row and column.

Raises IndexError if the row or column are not between 0 and 2, inclusive.
Note that negative indices will not index from the end.

::`setAt(self, row, col, value)`:


#cppname: HOM_Matrix3::setAt
Set the value of the matrix at the given row and column.

Raises IndexError if the row or column are not between 0 and 2, inclusive.
Note that negative indices will not index from the end.

::`asTuple(self)` -> `tuple` of `float`:


#cppname: HOM_Matrix3::asTuple
Return the contents of the matrix as a tuple of 9 floats.

::`asTupleOfTuples(self)` -> `tuple` of `tuple` of `float`:


#cppname: HOM_Matrix3::asTupleOfTuples
Return the contents of the matrix as a tuple of tuples of 3 floats.

::`setTo(self, tuple)`:
#cppname: HOM_Matrix3::setTo
Set this matrix's contents. The sequence may contain either 9 floats
or 3 sequences, each with 3 floats.

See [Hom:hou.Matrix3#__init__] for examples of suitable parameter values.

::`setToIdentity(self)`:
#cppname: HOM_Matrix3::setToIdentity
Set this matrix to the multiplicative identity, having 1's in the diagonal.

The matrix will contain the values


`[[1, 0, 0], [0, 1, 0], [0, 0, 1]]`. Note that you can construct a new
matrix with these values using `hou.Matrix3(1)`.

::`setToZero(self)`:
#cppname: HOM_Matrix3::setToZero
Set this matrix to contain all zeros.

Note that you can construct a new matrix with all zeros with
`hou.Matrix3()`.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix3 (2 of 4) [12/7/2009 4:33:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix3

::`__add__(self, matrix3)` -> [Hom:hou.Matrix3]:


#cppname: HOM_Matrix3::__add__
Add two matrices by adding corresponding entries together and return a new
matrix. This method lets you write `m1 + m2`, where `m1` and `m2` are
Matrix3 objects.

::`__sub__(self, matrix3)` -> [Hom:hou.Matrix3]:


#cppname: HOM_Matrix3::__sub__
Subtract another matrix from this one, subtracting corresponding entries,
and return a new matrix. This method lets you write `m1 - m2`, where `m1`
and `m2` are Matrix3 objects.

::`__mul__(self, matrix3_or_scalar)` -> [Hom:hou.Matrix3]:


#cppname: HOM_Matrix3::__mul__
Multiply this matrix by another matrix or by a scalar, returning a new
matrix. This method lets you write `m1 * m2`, where `m1` and `m2` are
Matrix3 objects, or `m1 * s`, where `s` is a float.

See [Wikipedia's matrix multiplication


page|http://en.wikipedia.org/wiki/Matrix_multiplication] for details on how
each element in the result is computed. Also see [Hom:hou.Matrix4].

::`preMult(self, matrix3)` -> [Hom:hou.Matrix3]:


#cppname: HOM_Matrix3::preMult
Returns `matrix3 * self`. Note that `__mul__` returns `self * matrix3`,
which is a different result because matrix multiplication is not
commutative.

::`determinant(self)` -> `double`:


#cppname: HOM_Matrix3::determinant
Return the determinant of the matrix.

See [Wikipedia's determinant page|http://en.wikipedia.org/wiki/Determinant].

::`extractRotates(self, rotate_order="xyz")` -> [Hom:hou.Vector3]:


#cppname: HOM_Matrix3::extractRotates
Return a Vector3 of Euler angles, in degrees, representing the rotation
component of this matrix. Rotating about the coordinate axes in the
specified order by these amounts will yield the rotation contained in this
matrix.

rotate_order:

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix3 (3 of 4) [12/7/2009 4:33:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix3

A string containing a permutation of the letters `x`, `y`, and `z`


that determines the order in which rotations are performed about
the coordinate axes.

Raises [Hom:hou.OperationFailed] if the matrix does not represent a valid


rotation matrix (e.g. it is singular) or the rotate order is not a
permutation of the string `'xyz'`.

See also [Hom:hou.Matrix4#explode] and [Hom:hou.Matrix4#extractRotates].

::`inverted(self)` -> [Hom:hou.Matrix3]:


#cppname: HOM_Matrix3::inverted
Return the inverse of this matrix.

Raises [Hom:hou.OperationFailed] if the matrix is not invertible.


Otherwise,
`(self * self.inverted()).isAlmostEqual(hou.Matrix3(1))` is True.

See [Wikipedia's invertible matrix


page|http://en.wikipedia.org/wiki/Invertible_matrix] for more information.

::`transposed(self)` -> [Hom:hou.Matrix3]:


#cppname: HOM_Matrix3::transposed
Return the transpose of this matrix. The result is such that
`self.at(i, j) == self.transposed().at(j, i)` for `0 <= i,j <= 2`.

See [Wikipedia's transpose page|http://en.wikipedia.org/wiki/Transpose]


for more information.

::`isAlmostEqual(self, matrix3, tolerance=0.00001)` -> `bool`:


#cppname: HOM_Matrix3::isAlmostEqual
Returns whether this matrix is equal to another, within a
tolerance.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix3 (4 of 4) [12/7/2009 4:33:00 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4

= hou.Matrix4 =
#type: homclass
#cppname: HOM_Matrix4
#category: Utility

"""A 4x4 matrix of floating point values."""

4x4 matrices are typically used in Houdini to represent a 3D transformation


(e.g. some combination of rotation, scaling, shearing, and translation). A
single matrix compactly represents a transformation, and is much easier to deal
with than multiple translate, rotate, scale, shear, transformation order, and
rotation order values.

Note that Houdini's matrices are stored in row-major format, and vectors that
are multiplied with matrices are treated as row vectors. So, if `p` is a
[Hom:hou.Vector4] representing a point and `M` is a Matrix4, you write
`p*M`, *not* `M*p`. Similarly, `p*M1*M2` will first transform
`p` by `M1`, and then transform it by `M2`.

NOTE:
Most mathematical notations assume matrices are stored in column-major
format and that points are stored as column vectors. They will often
use `A*B*C` (or simply `ABC`) to refer to a combined transform that
first applies `C`'s transform, then `B`'s, and then applies `A`'s.
To represent the same matrix expression in Houdini, you need to
concatenate the transforms in the reverse order. So, you would instead
write `C*B*A`.

You can multiply Vector3s or Vector4s by Matrix4s. If you multiply a


Vector3, it is the same as multiplying a Vector4 where the fourth component
is 1 (see [Hom:hou.Vector3#__mul__]).

To transform a normal (as opposed to a point or vector), you need to multiply by


the inverse transpose of the matrix. For example, suppose:

`p`:
is a [Hom:hou.Vector3] object representing a position (or a
[Hom:hou.Vector4] with `v[4]==1`)
`v`:
is a [Hom:hou.Vector4] object representing a vector (a direction with a
length but no fixed location in space), with `v[3]==0`
`n`:
is a [Hom:hou.Vector4] object representing a normal, with `v[3]==0`
`m`:
is a Matrix4 object representing a transform matrix

Then you would write:

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4 (1 of 7) [12/7/2009 4:33:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4

{{{
#!python
p * m # to transform the point
v * m # to transform the vector
n * m.inverted().transposed() # to transform the normal
# (note that m.inverted().transposed() is mathematically equivalent to m.transposed().inverted())
}}}

Here is a concrete example:

{{{
#!pycon
>>> m = hou.hmath.buildTranslate((1, 1, 2))
>>> m
<hou.Matrix4 [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [1, 1, 2, 1]]>
>>> p = hou.Vector3(1, 2, 3)
>>> p * m
<hou.Vector3 [2, 3, 5]>
}}}

Both VEX and the UT_DMatrix4 class in the Houdini Development Kit (HDK) also
store matrices in row-major format.

@methods

::`__init__(self, values)`:
#cppname: HOM_Matrix4::Matrix4
#replaces: Exp:matrix
Return a new Matrix4. You can pass no parameters (the result will contain
all zeros), a float (the result's diagonal values will contain that float
and the rest is all zeros), a sequence of 16 floats, a sequence of
sequences of 4 floats, or a [Hom:hou.Matrix3].

{{{
#!pycon
>>> hou.Matrix4()
<hou.Matrix4 [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]>

>>> hou.Matrix4(1)
<hou.Matrix4 [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]>

>>> hou.Matrix4((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))


<hou.Matrix4 [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11], [12, 13, 14, 15]]>

>>> hou.Matrix4(((0, 1, 2, 3), (4, 5, 6, 7), (8, 9, 10, 11), (12, 13, 14, 15)))
<hou.Matrix4 [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11], [12, 13, 14, 15]]>

>>> matrix3 = hou.Matrix3((0, 1, 2, 3, 4, 5, 6, 7, 8))


>>> matrix3

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4 (2 of 7) [12/7/2009 4:33:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4

<hou.Matrix3 [[0, 1, 2], [3, 4, 5], [6, 7, 8]]>


>>> hou.Matrix4(matrix3)
<hou.Matrix4 [[0, 1, 2, 0], [3, 4, 5, 0], [6, 7, 8, 0], [0, 0, 0, 1]]>
}}}

Note that Houdini's matrices are stored in row-major order, so the matrix's
contents are grouped by row.

::`at(self, row, col)` -> `float`:


#cppname: HOM_Matrix4::at
Return the value of the matrix at the given row and column.

Raises IndexError if the row or column are not between 0 and 3, inclusive.
Note that negative indices will not index from the end.

::`setAt(self, row, col, value)`:


#cppname: HOM_Matrix4::setAt
Set the value of the matrix at the given row and column.

Raises IndexError if the row or column are not between 0 and 3, inclusive.
Note that negative indices will not index from the end.

::`asTuple(self)` -> `tuple` of `float`:


#cppname: HOM_Matrix4::asTuple
Return the contents of the matrix as a tuple of 16 floats.

::`asTupleOfTuples(self)` -> `tuple` of `tuple` of `float`:


#cppname: HOM_Matrix4::asTupleOfTuples
Return the contents of the matrix as a tuple of tuples of 4 floats.

::`setTo(self, sequence)`:
#cppname: HOM_Matrix4::setTo
Set this matrix's contents. The sequence may contain either 16 floats
or 4 sequences, each with 4 floats.

See [Hom:hou.Matrix4#__init__] for examples of suitable parameter values.

::`setToIdentity(self)`:
#cppname: HOM_Matrix4::setToIdentity
#replaces: Exp:identity
Set this matrix to the multiplicative identity, having 1's in the diagonal.

The matrix will contain the values


`[[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]`. Note that
you can construct a new matrix with these values using
[Hom:hou.hmath#identityTransform] or `hou.Matrix4(1)`.

::`setToZero(self)`:
#cppname: HOM_Matrix4::setToZero

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4 (3 of 7) [12/7/2009 4:33:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4

#replaces: Exp:mzero
Set this matrix to contain all zeros.

Note that you can construct a new matrix with all zeros with
`hou.Matrix4()`.

::`__add__(self, matrix4)` -> [Hom:hou.Matrix4]:


#cppname: HOM_Matrix4::__add__
Add two matrices by adding corresponding entries together and return a new
matrix. This method lets you write `m1 + m2`, where `m1` and `m2` are
Matrix4 objects.

::`__sub__(self, matrix4)` -> [Hom:hou.Matrix4]:


#cppname: HOM_Matrix4::__sub__
Subtract another matrix from this one, subtracting corresponding entries,
and return a new matrix. This method lets you write `m1 - m2`, where `m1`
and `m2` are Matrix4 objects.

::`__mul__(self, matrix4_or_scalar)` -> [Hom:hou.Matrix4]:


#cppname: HOM_Matrix4::__mul__
Multiply this matrix by another matrix or by a scalar, returning a new
matrix. This method lets you write `m1 * m2`, where `m1` and `m2` are
Matrix4 objects, or `m1 * s`, where `s` is a float.

If `m1` and `m2` are transformation matrices and `v` is a vector,


`v * m1 * m2` will transform `v` by `m1`, and then transform it by `m2`.
This ordering occurs because Houdini's Matrices are stored in row-major
format, and is opposite from the ordering used in traditional mathematical
notation. Note that `m1 * v` is not a valid expression in Houdini

See the Matrix4 class documentation and [Hom:hou.Vector3#__mul__] for


more information. See [Wikipedia's matrix multiplication
page|http://en.wikipedia.org/wiki/Matrix_multiplication] for details on
how each element in the result is computed.

::`preMult(self, matrix4)` -> [Hom:hou.Matrix4]:


#cppname: HOM_Matrix4::preMult
Returns `matrix4 * self`. Note that `__mul__` returns `self * matrix4`,
which is a different result because matrix multiplication is not
commutative.

::`determinant(self)` -> `float`:


#cppname: HOM_Matrix4::determinant
#replaces: Exp:determinant
Return the determinant of the matrix.

See [Wikipedia's determinant page|http://en.wikipedia.org/wiki/Determinant].

::`explode(self, transform_order='srt', rotate_order='xyz', pivot=hou.Vector3())` -> `dict` of `str` to [Hom:hou.Vector3]:

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4 (4 of 7) [12/7/2009 4:33:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4

#cppname: HOM_Matrix4::explode
#replaces: Exp:explodematrix, vorigin
Return a dictionary with keys `'rotate'`, `'scale'`, `'translate'`, and
`'shear'` whose values are [Hom:hou.Vector3] objects. When applied in the
specified order, the corresponding rotations, scales (and shears), and
translations will give this matrix.

The rotation is returned as a set of Euler angles, in degrees. See


[Wikipedia's Euler angles
page|http://en.wikipedia.org/wiki/Euler_angles] for more information.

transform_order:
A string containing a permutation of the letters `s`, `r`, and `t`.
The rotate, scale, and translate results are dependent on the order in
which you perform those operations, and this string specifies that
order.

For example, imagine a transformation where you first translate in x


by one unit, then you rotate in z by 45 degrees. With a transform
order of `'trs'` (translate, rotate, scale), the translate component
is (1, 0, 0). However, this same transformation could be constructed,
for example, by first scaling, then rotating, and then translating.
For this transformation order, the translate component would be
`(1.0 / math.sqrt(2), 1.0 / math.sqrt(2), 0)`.

rotate_order:
A string containing a permutation of the letters `x`, `y`, and `z`
that determines the order in which rotations are performed about
the coordinate axes.

pivot:
A Vector3 containing a position about which rotations and scales are
performed. By default, this parameter is set to the origin.

Raises [Hom:hou.OperationFailed] if the matrix does not represent a valid


transform matrix (e.g. it is singular), the transform order is not a
permutation of the string `'srt'`, or the rotate order is not a
permutation of the string `'xyz'`.

See [Hom:hou.hmath#buildRotateAboutAxis] for an example of how to convert


Euler angles into an axis and rotation.

See [Hom:hou.ObjNode#setParmTransform] for an example. This method is


the inverse of [Hom:hou.hmath#buildTransform]. See also the other
functions in [Hom:hou.hmath] that build transformation matrices.

::`extractTranslates(self, transform_order='srt')` -> [Hom:hou.Vector3]:


#cppname: HOM_Matrix4::extractTranslates
#replaces: Exp:vtorigin

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4 (5 of 7) [12/7/2009 4:33:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4

A shortcut for `self.explode(transform_order)['translate']`. See


[Hom:hou.Matrix4#explode] for more information.

{{{
#!pycon
>>> matrix = hou.hmath.buildTranslate(1, 0, 0) * hou.hmath.buildRotate(0, 0, 45)
>>> matrix.extractTranslates('trs')
<hou.Vector3 [4, 0, 0]>
>>> matrix.extractTranslates('srt')
<hou.Vector3 [0.707107, 0.707107, 0]>
}}}

::`extractRotates(self, transform_order='srt', rotate_order='xyz', pivot=hou.Vector3())` -> [Hom:hou.Vector3]:


#cppname: HOM_Matrix4::extractRotates
#replaces: Exp:vrorigin
A shortcut for
`self.explode(transform_order, rotate_order, pivot)['rotate']`. See
[Hom:hou.Matrix4#explode] for more information.

::`extractScales(self, transform_order='srt', pivot=hou.Vector3())` -> [Hom:hou.Vector3]:


#cppname: HOM_Matrix4::extractScales
A shortcut for
`self.explode(transform_order, rotate_order, pivot)['scale']`. See
[Hom:hou.Matrix4#explode] for more information.

::`extractShears(self, transform_order='srt', pivot=hou.Vector3())` -> [Hom:hou.Vector3]:


#cppname: HOM_Matrix4::extractShears
A shortcut for
`self.explode(transform_order, rotate_order, pivot)['shear']`. See
[Hom:hou.Matrix4#explode] for more information.

::`inverted(self)` -> [Hom:hou.Matrix4]:


#cppname: HOM_Matrix4::inverted
#replaces: Exp:invert
Return the inverse of this matrix.

Raises [Hom:hou.OperationFailed] if the matrix is not invertible.


Otherwise,
`(self * self.inverted()).isAlmostEqual(hou.hmath.identityTransform())` is
True.

See [Wikipedia's invertible matrix


page|http://en.wikipedia.org/wiki/Invertible_matrix] for more information.

::`transposed(self)` -> [Hom:hou.Matrix4]:


#cppname: HOM_Matrix4::transposed
#replaces: Exp:transpose
Return the transpose of this matrix. The result is such that
`self.at(i, j) == self.transposed().at(j, i)` for `0 <= i,j <= 3`.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4 (6 of 7) [12/7/2009 4:33:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4

See [Wikipedia's transpose page|http://en.wikipedia.org/wiki/Transpose]


for more information.

::`isAlmostEqual(self, matrix4, tolerance=0.00001)` -> `bool`:


#cppname: HOM_Matrix4::isAlmostEqual
Return whether this matrix is equal to another, within a tolerance.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Matrix4 (7 of 7) [12/7/2009 4:33:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Quaternion

= hou.Quaternion =
#type: homclass
#cppname: HOM_Quaternion
#category: Utility
#status: nd

@methods

::`isAlmostEqual(self, quaternion, tolerance=0.00001)` -> `bool`:


#cppname: HOM_Quaternion::isAlmostEqual

Returns whether this quaternion is equal to another, within


a numerical tolerance.

::`length(self)` -> float:


#cppname: HOM_Quaternion::length
#status: nd

::`normalized(self)` -> Quaternion:


#cppname: HOM_Quaternion::normalized
#status: nd

::`setTo(self, tuple)`:
#cppname: HOM_Quaternion::setTo
#status: nd

::`__add__(self, quaternion)` -> Quaternion:


#cppname: HOM_Quaternion::__add__
#status: nd

::`__getitem__(self, index)` -> float:


#cppname: HOM_Quaternion::__getitem__
#status: nd

::`__len__(self)` -> int:


#cppname: HOM_Quaternion::__len__
#status: nd

::`__mul__(self, scalar) -> Quaternion OR __mul__(self, quaternion)` -> Quaternion:


#cppname: HOM_Quaternion::__mul__
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/Quaternion (1 of 2) [12/7/2009 4:33:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Quaternion

::`__setitem__(self, index, value)`:


#cppname: HOM_Quaternion::__setitem__
#status: nd

::`__sub__(self, quaternion)` -> Quaternion:


#cppname: HOM_Quaternion::__sub__
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/Quaternion (2 of 2) [12/7/2009 4:33:02 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Ramp

= hou.Ramp =
#type: homclass
#cppname: HOM_Ramp
#category: Utility

"""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."""

If you evaluate a ramp parameter on a node, Houdini will return a Ramp object.

@methods

::`__init__(self, basis, keys, values)` -> `float`:


#cppname: HOM_Ramp::__init__
#replaces: Cmd:opramp
`basis`:
A sequence of [Hom:hou.rampBasis] values, one for each key. The
ramp basis for a key determines how Houdini interpolates from the
key up until the next key. If there is no next key, Houdini will
hold the value constant until the end of the [0,1] domain, regardless
of the ramp basis.

`keys`:
A sequence of floats, one for each key, each between 0.0 and 1.0,
inclusive. Each key represents the location in the [0,1] domain
of its corresponding value.

`values`:
A sequence of values, where each value corresponds to a key. When
asked to evaluate at a value where there is no key, Houdini will
interpolate between adjacent values using the basis function for the
key on the left.

This sequence is _either_ a sequence of floats _or_ a sequence of


triples of floats. In the former case, the newly-created ramp will
evaluate to a single floating-point value. In the latter case, it
will evaluate to a color.

Raises [Hom:hou.InvalidSize] if the keys and values sequences are not


not same size, or if `values` contains subsequences of floats that are

http://www.sidefx.com/docs/houdini10.0/hom/hou/Ramp (1 of 3) [12/7/2009 4:33:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Ramp

not 3 elements long.

{{{
#!pycon
>>> lin = hou.rampBasis.Linear

# Create a ramp that linearly interpolates between 2.5 and 4.5.


>>> r = hou.Ramp((lin, lin), (0, 1), (2.5, 4.5))
>>> r
<hou.Ramp is_color=False num_keys=2 data=((t=0, 2.5), (t=1, 4.5))>
>>> r.lookup(0.0)
2.5
>>> r.lookup(0.5)
3.5
>>> r.lookup(1.0)
4.5

# Create a color ramp that linearly interpolates from black to red.


>>> hou.Ramp((lin, lin), (0, 1), ((0.0, 0.0, 0.0), (1.0, 0.0, 0.2)))
<hou.Ramp is_color=True num_keys=2 data=((t=0, rgb=(0, 0, 0)), (t=1, rgb=(1, 1, 1)))>
}}}

::`isColor(self)` -> `bool`:


#cppname: HOM_Ramp::isColor
Return True if this is a color ramp, and False if it is a single float
ramp.

::`colorType(self)` -> `colorType`:


#cppname: HOM_Ramp::colorType
If this is a color ramp, return the color space that is used during
interpolation. The default is hou.colorType.RGB.

Raises [Hom:hou.OperationFailed] if this ramp is not a color ramp.

::`setColorType(self, hou.colorType)`:
#cppname: HOM_Ramp::setColorType
If this is a color ramp, set the color space that is used
during interpolation. The default is hou.colorType.RGB.

To obtain a more perceptually uniform interpolation, use hou.colorType.LAB.


To obtain a ramp that matches the rainbow, use hou.colorType.HSV.

Raises [Hom:hou.OperationFailed] if this ramp is not a color ramp.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Ramp (2 of 3) [12/7/2009 4:33:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Ramp

::`lookup(self, interpolant)` -> `float` or `tuple`:


#cppname: HOM_Ramp::lookup
Return th value of the ramp at a specified position from 0.0 to 1.0,
inclusive.

Returns a float (for floating-point value ramps) or a tuple of 3 floats


(for color ramps).

::`basis(self)` -> `tuple` of [Hom:hou.rampBasis] enum values:


#cppname: HOM_Ramp::basis
Return a tuple of [Hom:hou.rampBasis] enumeration values that determine how
Houdini interpolates between the keys in the ramp. See
[Hom:hou.Ramp#__init__] for more information.

::`keys(self)` -> `tuple` of `float`:


#cppname: HOM_Ramp::keys
Return a tuple of floats between 0.0 and 1.0 containing the ramp key
positions. See [Hom:hou.Ramp#__init__] for more information.

::`values(self)` -> `tuple` of `float` or `tuple` of `tuple` of `float`:


#cppname: HOM_Ramp::values
Return a tuple of floats (for a float ramp) or a tuple of tuples of 3
floats (for a color ramp) corresponding to the values in the ramp stored
at each key. See [Hom:hou.Ramp#__init__] for more information.

@related
- [Vex:spline]

http://www.sidefx.com/docs/houdini10.0/hom/hou/Ramp (3 of 3) [12/7/2009 4:33:03 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ShopNodeType

= hou.ShopNodeType =
#type: homclass
#cppname: HOM_ShopNodeType
#superclass: hou.NodeType
#category: Utility

"""This kind of NodeType contains extra attributes specific to SHOP nodes."""

@methods

::`renderMask(self) -> string`:


#cppname: HOM_ShopNodeType::renderMask
Return a string with space-separated names of the renderers that this
SHOP type supports. Note that some SHOP types, like the switch SHOP,
return `"*"` to indicate that they support all renderers.

See [Hom:hou.ShopNode#shaderString] for an example.

::`shaderType(self) -> [Hom:hou.shaderType] enum value`:


#cppname: HOM_ShopNodeType::shaderType
Return the type of shader for this SHOP type. For example, this shop
type might be a surface shader or a displacement shader. See
[Hom:hou.shaderType] for the possible shader types.

See also [Hom:hou.ShopNode#shaderType].

http://www.sidefx.com/docs/houdini10.0/hom/hou/ShopNodeType [12/7/2009 4:33:04 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector2

= hou.Vector2 =
#type: homclass
#cppname: HOM_Vector2
#category: Utility
"""A sequence of 2 floating point values, with associated mathematical
operations."""

A Vector2 might be used to represent a position in 2D space, a 2D


direction and length, or the size of a rectangle. For example,
[Hom:hou.Node#position] returns a position and [Hom:hou.Node#size] returns
the size of a rectangle.

See also [Hom:hou.Vector3] and [Hom:hou.Vector4].

@methods
::`__init__(self, values)`:
#cppname: HOM_Vector2::Vector2
Return a new Vector2 from a sequence of floats. If this method is called
without parameters, the resulting vector contains the values (0.0, 0.0).

Raises `InvalidSize` if `values` is not 2 elements long, or `TypeError`


if `values` is not a sequence of floats or ints.

::`__getitem__(self, index)` -> `float`:


#cppname: HOM_Vector2::__getitem__
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.

{{{
#!pycon
>>> v = hou.Vector2((1.0, 2.0))
>>> v[-1]
2.0
}}}

::`__setitem__(self, index, value)`:


#cppname: HOM_Vector2::__setitem__
This method lets you use square brackets to set a value on a vector.

{{{

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector2 (1 of 4) [12/7/2009 4:33:05 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector2

#!pycon
>>> v = hou.Vector2((1.5, 2.5))
>>> v[0] = 0.5
>>> print v
[0.5, 2.5]
}}}

::`setTo(self, sequence)`:
#cppname: HOM_Vector2::setTo
Set the contents of this vector to a sequence of floats.

Raises `InvalidSize` if `values` is not 2 elements long, or `TypeError`


if `values` is not a sequence of floats or ints.

::`__len__(self)` -> `int`:


#cppname: HOM_Vector2::__len__
Returns 2. This method lets you call len() on a Vector2.

::`__add__(self, vector2)` -> [Hom:hou.Vector2]:


#cppname: HOM_Vector2::__add__
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 Vector2 objects.

This method is equivalent to


`hou.Vector2(self[0] + vector2[0], self[1] + vector2[1])`.

::`__sub__(self, vector2)` -> [Hom:hou.Vector2]:


#cppname: HOM_Vector2::__sub__
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
Vector2 objects.

This method is equivalent to


`hou.Vector2(self[0] - vector2[0], self[1] - vector2[1])`.

::`__neg__(self)` -> [Hom:hou.Vector2]:


#cppname: HOM_Vector2::__neg__
Return a vector whose components contain the negative values of this
vector's components. This method lets you write `-v`, where `v` is a
Vector2 object.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector2 (2 of 4) [12/7/2009 4:33:05 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector2

This method is equivalent to `hou.Vector2(-self[0], -self[1])`.

::`__mul__(self, scalar)` -> [Hom:hou.Vector2]:


#cppname: HOM_Vector2::__mul__
Multiply a vector with a float scalar, returning a new vector. This method
lets you write `v * s` where `v` is a vector and `s` is a float.

This method is equivalent to


`hou.Vector2(self[0] * scalar, self[1] * scalar)`.

::`length(self)` -> `float`:


#cppname: HOM_Vector2::length
Interpret this vector as a direction vector and return its length.
The result is the same as `math.sqrt(self[0]**2 + self[1]**2)`.

::`lengthSquared(self)` -> `float`:


#cppname: HOM_Vector2::lengthSquared
Interpret this vector as a direction vector and return the square of its
length. The result is the same as `self[0]**2 + self[1]**2`.

::`normalized(self)` -> [Hom:hou.Vector2]:


#cppname: HOM_Vector2::normalized
Interpreting this vector as a direction, return a vector with the same
direction but with a length of 1.

If the vector's length is 0 (or close to it), the result is the original
vector.

For vector's with non-zero lengths, this method is equivalent to


`self * (1.0/self.length())`.

::`distanceTo(self, vector2)` -> `float`:


#cppname: HOM_Vector2::distanceTo
Interpret this vector and the argument as 2D positions, and return the
distance between them. The return value is equivalent to
`(self - vector2).length()`.

::`dot(self, vector2)` -> `float`:


#cppname: HOM_Vector2::dot
Return the dot product between this vector and the one in the parameter.

See [Wikipedia's dot product page|http://en.wikipedia.org/wiki/Dot_product].

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector2 (3 of 4) [12/7/2009 4:33:05 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector2

::`isAlmostEqual(self, vector2, tolerance=0.00001)` -> `bool`:


#cppname: HOM_Vector2::isAlmostEqual
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.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector2 (4 of 4) [12/7/2009 4:33:05 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3

= hou.Vector3 =
#type: homclass
#cppname: HOM_Vector3
#category: Utility
"""A sequence of 3 floating point values, with associated mathematical
operations."""

A Vector3 might be used to represent a position in 3D space, or a 3D


direction with a length.

See also [Hom:hou.Vector2] and [Hom:hou.Vector4].

@methods

::`__init__(self, values)`:
#cppname: HOM_Vector3::Vector3
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 [Hom: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.

::`__getitem__(self, index)` -> `float`:


#cppname: HOM_Vector3::__getitem__
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.

{{{
#!pycon
>>> v = hou.Vector3((1.0, 2.0, 3.0))
>>> v[-1]
3.0
}}}

::`__setitem__(self, index, value)`:


#cppname: HOM_Vector3::__setitem__

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3 (1 of 6) [12/7/2009 4:33:07 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3

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

{{{
#!pycon
>>> v = hou.Vector3((1.5, 2.5, 3.5))
>>> v[1] = 0.5
>>> print v
[1.5, 0.5, 3.5]
}}}

::`setTo(self, sequence)`:
#cppname: HOM_Vector3::setTo
#replaces: Exp:vset
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.

::`__len__(self)` -> `int`:


#cppname: HOM_Vector3::__len__
Returns 3. This method lets you call len() on a Vector3.

::`__add__(self, vector3)` -> [Hom:hou.Vector3]:


#cppname: HOM_Vector3::__add__
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.

This method is equivalent to `hou.Vector3(self[0] + vector3[0],


self[1] + vector3[1], self[2] + vector3[2])`.

::`__sub__(self, vector3)` -> [Hom:hou.Vector3]:


#cppname: HOM_Vector3::__sub__
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.

This method is equivalent to `hou.Vector3(self[0] - vector3[0],


self[1] - vector3[1], self[2] - vector3[2])`.

::`__neg__(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_Vector3::__neg__

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3 (2 of 6) [12/7/2009 4:33:07 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3

Return a vector whose components contain the negative values of this


vector's components. This method lets you write `-v`, where `v` is a
Vector3 object.

This method is equivalent to `hou.Vector3(-self[0], -self[1], -self[2])`.

::`__mul__(self, scalar_or_matrix4)` -> [Hom:hou.Vector3]:


#cppname: HOM_Vector3::__mul__
#replaces: Exp:vscale
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 [Hom: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 [Hom:hou.Vector4]
with the fourth component set to zero:
{{{
#!pycon
# Build a transformation matrix that rotates 180 degrees about z and then translates by 1 in x.
>>> matrix = hou.hmath.buildRotateAboutAxis((0, 0, 1), 180) * hou.hmath.buildTranslate((1, 0, 0))
>>> position = hou.Vector3(0.0, 1.0, 0.0)

# Rotate the point (0,1,0) to (0,-1,0), then translate to (1,-1,0).


>>> position * matrix
<hou.Vector3 [1, -1, 0]>

# Rotate the vector (0,1,0) to (0,-1,0), ignoring the translation.


>>> vector = hou.Vector4(tuple(position) + (0.0,))
>>> vector
<hou.Vector4 [0, 1, 0, 0]>
>>> vector * matrix
<hou.Vector4 [0, -1, 0, 0]>
>>> hou.Vector3(vector * matrix)
<hou.Vector3 [0, -1, 0]>

# We could have wrapped the above in a function:

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3 (3 of 6) [12/7/2009 4:33:07 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3

>>> def transformAsVector(vector3):


... return hou.Vector3(hou.Vector4(tuple(vector3) + (0.0,)) * matrix)
>>> transformAsVector(position)
<hou.Vector3 [0, -1, 0]>

# Change the Vector4's last component to 1 to illustrate that it's transformed as a point again.
>>> vector[-1] = 1.0
>>> vector
<hou.Vector4 [0, 1, 0, 1]>
>>> vector * matrix
<hou.Vector4 [1, -1, 0, 1]>
}}}

See also [Hom:hou.Matrix4].

::`__rmul__(self, scalar)` -> [Hom:hou.Vector3]:


#cppname: HOM_Vector3::__rmul__
#replaces: Exp:vscale
Multiply this vector with a scalar, returning a new vector. This method
lets you write `s * v`, where `v` is a vector and `s` is a float scalar.
See also [Hom:hou.Vector3#__mul__], which lets you write `v * s`.

{{{
#!pycon
>>> v = hou.Vector3(1, 2, 3)
>>> v * 2
<hou.Vector3 [2, 4, 6]>
>>> 2 * v
<hou.Vector3 [2, 4, 6]>
}}}

::`length(self)` -> `float`:


#cppname: HOM_Vector3::length
#replaces: Exp:vlength, Exp:length
Interpret this vector as a direction vector and return its length.
The result is the same as `math.sqrt(self[0]**2 + self[1]**2 + self[2]**2)`.

::`lengthSquared(self)` -> `float`:


#cppname: HOM_Vector3::lengthSquared
#replaces: Exp:vlength2
Interpret this vector as a direction vector and return the square of its
length. The result is the same as `self[0]**2 + self[1]**2 + self[2]**2`.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3 (4 of 6) [12/7/2009 4:33:07 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3

::`normalized(self)` -> [Hom:hou.Vector3]:


#cppname: HOM_Vector3::normalized
#replaces: Exp:normalize
Interpret this vector as a direction and return a vector with the same
direction but with a length of 1.

If the vector's length is 0 (or close to it), the result is the original
vector.

For vectors with non-zero lengths, this method is equivalent to


`self * (1.0/self.length())`.

::`distanceTo(self, vector3)` -> `float`:


#cppname: HOM_Vector3::distanceTo
#replaces: Exp:distance
Interpret this vector and the argument as 3D positions, and return the
distance between them. The return value is equivalent to
`(self - vector3).length()`.

::`dot(self, vector3)` -> `float`:


#cppname: HOM_Vector3::dot
#replaces: Exp:dot
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)))`

See [Wikipedia's dot product page|http://en.wikipedia.org/wiki/Dot_product].

::`cross(self, vector3)` -> [Hom:hou.Vector3]:


#cppname: HOM_Vector3::cross
#replaces: Exp:cross
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)))`.

See [Wikipedia's cross product page|http://en.wikipedia.org/wiki/Cross_product].

::`angleTo(self, vector3)` -> `float`:


#cppname: HOM_Vector3::angleTo

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3 (5 of 6) [12/7/2009 4:33:07 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3

#replaces: Exp:vangle
Interprets this Vector3 and the parameter as directions and returns the
angle (in degrees) formed between the two vectors when you place the
origins at the same location.

::`angularVelocityTo(self, vector3, time_interval)`:


#cppname: HOM_Vector3::angularVelocityTo
#replaces: Exp:angvel
#status: ni

::`clampLengthAsNew(self, min_length, max_length)` -> [Hom:hou.Vector3]:


#cppname: HOM_Vector3::clampLengthAsNew
#replaces: Exp:clamptosphere
#status: ni

::`matrixToRotateTo(self, vector3)` -> [Hom:hou.Matrix4]:


#cppname: HOM_Vector3::matrixToRotateTo
#replaces: Exp:dihedral
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.

::`isAlmostEqual(self, vector3, tolerance=0.00001)` -> `bool`:


#cppname: HOM_Vector3::isAlmostEqual
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.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector3 (6 of 6) [12/7/2009 4:33:07 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector4

= hou.Vector4 =
#type: homclass
#cppname: HOM_Vector4
#category: Utility
"""A sequence of 4 floating point values, with associated mathematical
operations."""

A Vector4 could be used to represent a position or direction in 4D space.


In 3D math, however, it is more commonly used to represent either a position or
a vector, depending on the value of the fourth component. Positions have a
fourth component of 1.0, and vectors have a fourth component of 0.0.
Subtracting a position from another yields a vector, adding two vectors
together yields a vector, and adding a point and a vector yields a point.
Operations that yield a fourth component value other than 0 or 1, like adding
two points together, are not valid. Similarly, is makes sense to speak about
a vector's length but not a position's length. The fourth component also
affects how the position/vector is transformed; see [Hom:hou.Vector3#__mul__]
for more information.

See also [Hom:hou.Vector2] and [Hom:hou.Vector3].

@methods

::`__init__(self, values)`:
#cppname: HOM_Vector4::Vector4
Return a new Vector4 from a sequence of floats. If this method is called
without parameters, the resulting vector contains the values
(0.0, 0.0, 0.0, 0.0).

You can also construct a Vector4 from a [Hom:hou.Vector3]. The new vector
has its fourth component set to 1.0.

Raises `InvalidSize` if `values` is not 4 elements long, or `TypeError`


if `values` is not a sequence of floats or ints.

::`__getitem__(self, index)` -> `float`:


#cppname: HOM_Vector4::__getitem__
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.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector4 (1 of 4) [12/7/2009 4:33:08 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector4

::`__setitem__(self, index, value)`:


#cppname: HOM_Vector4::__setitem__
This method lets you use square brackets to set a value on a vector.

::`setTo(self, sequence)`:
#cppname: HOM_Vector4::setTo
Set the contents of this vector to a sequence of floats.

Raises `InvalidSize` if `values` is not 4 elements long, or `TypeError`


if `values` is not a sequence of floats or ints.

::`__len__(self)` -> int:


#cppname: HOM_Vector4::__len__
Returns 4. This method lets you call len() on a Vector4.

::`__add__(self, vector4)` -> [Hom:hou.Vector4]:


#cppname: HOM_Vector4::__add__
Add two vectors, returning a new vector with each component (including
the last one) equal to the sum of the corresponding components in the two
vectors. This method lets you write `v1 + v2`, where `v1` and `v2` are
Vector4 objects.

This method is equivalent to `hou.Vector4(self[0] + vector4[0],


self[1] + vector4[1], self[2] + vector4[2], self[3] + vector4[3])`.

::`__sub__(self, vector4)` -> [Hom:hou.Vector4]:


#cppname: HOM_Vector4::__sub__
Subtract a vector from another, returning a new vector with each component
(including the last one) 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 Vector4 objects.

This method is equivalent to `hou.Vector4(self[0] - vector4[0],


self[1] - vector4[1], self[2] - vector4[2], self[3] - vector4[3])`.

::`__mul__(self, scalar_or_matrix4)` -> [Hom:hou.Vector4]:


#cppname: HOM_Vector4::__mul__
Multiply a 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 [Hom:hou.Matrix4].

See [Hom:hou.Vector3#__mul__] for more information.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector4 (2 of 4) [12/7/2009 4:33:08 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector4

::`__rmul__(self, scalar)` -> [Hom:hou.Vector4]:


#cppname: HOM_Vector4::__rmul__
Multiply this vector with a scalar, returning a new vector. This method
lets you write `s * v`, where `v` is a vector and `s` is a float scalar.
See also [Hom:hou.Vector4#__mul__], which lets you write `v * s`.

{{{
#!pycon
>>> v = hou.Vector4(1, 2, 3, 4)
>>> v * 2
<hou.Vector3 [2, 4, 6, 8]>
>>> 2 * v
<hou.Vector3 [2, 4, 6, 8]>
}}}

::`length(self)` -> float:


#cppname: HOM_Vector4::length
Interpret this vector as a 4D direction vector and return its length. If
this vector is representing a 3D direction (so the fourth component is 0),
the result is the 3D length.

The result is the same as


`math.sqrt(self[0]**2 + self[1]**2 + self[2]**2 + self[3]**2)`.

::`lengthSquared(self)` -> float:


#cppname: HOM_Vector4::lengthSquared
Return the result of `self.length()**2`. The result is the same as
`self[0]**2 + self[1]**2 + self[2]**2 + self[3]**2`.

::`normalized(self)` -> Vector4:


#cppname: HOM_Vector4::normalized
Interpret this vector as a 4D direction and return a vector with the same
direction but with a length of 1. If this vector being used to represent
a 3D direction (so the fourth component is 0), the result is still
meaningful, and represents the corresponding 3D direction.

If the vector's length is 0 (or close to it), the result is the original
vector.

For vectors with non-zero lengths, this method is equivalent to


`self * (1.0/self.length())`.

::`dot(self, vector4)` -> float:

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector4 (3 of 4) [12/7/2009 4:33:08 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector4

#cppname: HOM_Vector4::dot
Return the dot product between this 4D vector and the one in the parameter.
This value is equal to `self[0]*vector4[0] + self[1]*vector4[1] +
self[2]*vector4[2] + self[3]*vector4[3]`.

::`isAlmostEqual(self, vector4, tolerance=0.00001)` -> `bool`:


#cppname: HOM_Vector4::isAlmostEqual
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.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Vector4 (4 of 4) [12/7/2009 4:33:08 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/colorType

= hou.colorType =
#type: hommodule
#cppname: HOM_colorType
#category: Utility
#status: nd

"""Enumeration of color types."""

* hou.colorType.RGB
* hou.colorType.LAB
* hou.colorType.HSL
* hou.colorType.HSV
* hou.colorType.XYZ

http://www.sidefx.com/docs/houdini10.0/hom/hou/colorType [12/7/2009 4:33:09 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/rampBasis

= hou.rampBasis =
#type: hommodule
#cppname: HOM_rampBasis
#category: Utility

"""Enumeration of ramp interpolation types."""

These interpolation types specify how Houdini interpolates between keyframed


values in a [Hom:hou.Ramp]. See [Hom:hou.Ramp#basis] and
[Hom:hou.Ramp#__init__] for more information about how to get and set ramp
interpolation types.

hou.rampBasis.Linear:
Does a linear (straight line) interpolation between keys.

hou.rampBasis.Constant:
Holds the value constant until the next key.

hou.rampBasis.CatmullRom:
Interpolates smoothly between the keys. See Wikipedia's [Catmull-Rom_spline page|http://en.wikipedia.org/wiki/Catmull-Rom_spline].

hou.rampBasis.MonotonicCubic:
Another smooth interpolation that ensures that there is no overshoot.
For example, if a key's value is smaller than the values in the adjacent
keys, this type ensures that the interpolated value is never less than
the key's value.

http://www.sidefx.com/docs/houdini10.0/hom/hou/rampBasis [12/7/2009 4:33:09 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/rampParmType

= hou.rampParmType =

#type: hommodule
#cppname: HOM_rampParmType
#category: Utility
#status: nd

"""Enumeration of ramp types."""

* hou.rampParmType.Color
* hou.rampParmType.Float

http://www.sidefx.com/docs/houdini10.0/hom/hou/rampParmType [12/7/2009 4:33:09 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/VexContext

= hou.VexContext =
#type: homclass
#cppname: HOM_VexContext
#category: VEX
#status: nd

@methods

::`name(self)` -> string:


#cppname: HOM_VexContext::name
#status: nd

::`nodeTypeCategory(self)` -> NodeTypeCategory:


#cppname: HOM_VexContext::nodeTypeCategory
#status: nd

::`pathsToLoadedVexFunctions(self)` -> dict of names to paths:


#cppname: HOM_VexContext::pathsToLoadedVexFunctions
#status: nd

::`shaderType(self)` -> hou.shaderType enum value or None:


#cppname: HOM_VexContext::shaderType
#status: nd

@replaces

- [Cmd:vexinfo]

http://www.sidefx.com/docs/houdini10.0/hom/hou/VexContext [12/7/2009 4:33:10 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/endVexProfiling

= hou.endVexProfiling =

#type: homfunction
#cppname: hom::endVexProfiling
#category: VEX
#status: ni

@usage
`endVexProfiling()` -> string

http://www.sidefx.com/docs/houdini10.0/hom/hou/endVexProfiling [12/7/2009 4:33:10 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/reloadAllScriptAndVexNodeTypes

= hou.reloadAllScriptAndVexNodeTypes =

#type: homfunction
#cppname: hom::reloadAllScriptAndVexNodeTypes
#category: VEX
#status: ni

@usage
`reloadAllScriptAndVexNodeTypes()`

http://www.sidefx.com/docs/houdini10.0/hom/hou/reloadAllScriptAndVexNodeTypes [12/7/2009 4:33:11 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/startVexProfiling

= hou.startVexProfiling =

#type: homfunction
#cppname: hom::startVexProfiling
#category: VEX
#status: ni

@usage
`startVexProfiling(check_for_nans=False, function_types=None)`

http://www.sidefx.com/docs/houdini10.0/hom/hou/startVexProfiling [12/7/2009 4:33:11 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vexContextForNodeTypeCategory

= hou.vexContextForNodeTypeCategory =

#type: homfunction
#cppname: hom::vexContextForNodeTypeCategory
#category: VEX
#status: nd

@usage
`vexContextForNodeTypeCategory(node_type_category)` -> VexContext or None

http://www.sidefx.com/docs/houdini10.0/hom/hou/vexContextForNodeTypeCategory [12/7/2009 4:33:11 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vexContextForShaderType

= hou.vexContextForShaderType =

#type: homfunction
#cppname: hom::vexContextForShaderType
#category: VEX
#status: nd

@usage
`vexContextForShaderType(shader_type)` -> VexContext or None

http://www.sidefx.com/docs/houdini10.0/hom/hou/vexContextForShaderType [12/7/2009 4:33:12 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/vexContexts

= hou.vexContexts =

#type: homfunction
#cppname: hom::vexContexts
#category: VEX
#status: nd

@usage
`vexContexts()` -> tuple of VexContexts

http://www.sidefx.com/docs/houdini10.0/hom/hou/vexContexts [12/7/2009 4:33:12 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ComponentSelection

= hou.ComponentSelection =

#type: homclass
#cppname: HOM_ComponentSelection
#category: Viewer
#status: ni

@methods

::`componentType(self)` -> [Hom:hou.componentType] enum value:


#cppname: HOM_ComponentSelection::componentType
#status: ni

::`connectivity(self)` -> [Hom:hou.connectivityType] enum value:


#cppname: HOM_ComponentSelection::connectivity
#status: ni

::`dopObjects(self)` -> tuple of DopObjects:


#cppname: HOM_ComponentSelection::dopObjects
#status: ni

::`mergedNode(self, parent)` -> Node:


#cppname: HOM_ComponentSelection::mergedNode
#status: ni

::`mergedSelectionString(self, empty_string_selects_all=True)` -> string:


#cppname: HOM_ComponentSelection::mergedSelectionString
#status: ni

::`needsMergedNode(self, parent)` -> bool:


#cppname: HOM_ComponentSelection::needsMergedNode
#status: ni

::`nodes(self)` -> tuple of Nodes:


#cppname: HOM_ComponentSelection::nodes
#status: ni

::`ordered(self)` -> `bool`:


#cppname: HOM_ComponentSelection::ordered
#status: ni

::`primitiveTypes(self)` -> tuple of [Hom:hou.primitiveType] enum values:

http://www.sidefx.com/docs/houdini10.0/hom/hou/ComponentSelection (1 of 2) [12/7/2009 4:33:13 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ComponentSelection

#cppname: HOM_ComponentSelection::primitiveTypes
#status: ni

::`selectionStrings(self, empty_string_selects_all=True)` -> tuple of strings:


#cppname: HOM_ComponentSelection::selectionStrings
#status: ni

::`setComponentType(self, type)`:
#cppname: HOM_ComponentSelection::setComponentType
#status: ni

::`setConnectivity(self, connectivity)`:
#cppname: HOM_ComponentSelection::setConnectivity
#status: ni

::`setPrimitiveTypes(self, primitive_types)`:
#cppname: HOM_ComponentSelection::setPrimitiveTypes
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/ComponentSelection (2 of 2) [12/7/2009 4:33:13 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ConstructionPlane

= hou.ConstructionPlane =
#type: homclass
#cppname: HOM_ConstructionPlane
#category: Viewer
#status: ni

@methods

::`lockUpVector(self, direction)`:
#cppname: HOM_ConstructionPlane::lockUpVector
#status: ni

::`setGridRuler(self, x_size, y_size)`:


#cppname: HOM_ConstructionPlane::setGridRuler
#status: ni

::`setGridSpacing(self, x_size, y_size)`:


#cppname: HOM_ConstructionPlane::setGridSpacing
#status: ni

::`setNormal(self, normal_vector)`:
#cppname: HOM_ConstructionPlane::setNormal
#status: ni

::`setNumGridCells(self, cells_in_x, cells_in_y)`:


#cppname: HOM_ConstructionPlane::setNumGridCells
#status: ni

::`setOrigin(self, origin_vector)`:
#cppname: HOM_ConstructionPlane::setOrigin
#status: ni

::`setUpVector(self, up_vector)`:
#cppname: HOM_ConstructionPlane::setUpVector
#status: ni

::`setVisible(self, on)`:
#cppname: HOM_ConstructionPlane::setVisible
#status: ni

@replaces

http://www.sidefx.com/docs/houdini10.0/hom/hou/ConstructionPlane (1 of 2) [12/7/2009 4:33:13 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ConstructionPlane

- [Cmd:cplane]

http://www.sidefx.com/docs/houdini10.0/hom/hou/ConstructionPlane (2 of 2) [12/7/2009 4:33:13 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ContextViewer

= hou.ContextViewer =
#type: homclass
#cppname: HOM_ContextViewer
#superclass: hou.PathBasedPaneTab
#category: Viewer

"""A class representing a context viewer pane tab."""

@methods

::`compositorViewer(self)` -> [Hom:hou.CompositorViewer]:


#cppname: HOM_ContextViewer::compositorViewer

Returns a CompositorViewer if the ContextViewer is displaying a compositor


viewer. If not, returns `None`.

::`particleViewer(self)` -> [Hom:hou.ParticleViewer]:


#cppname: HOM_ContextViewer::particleViewer

Returns a ParticleViewer if the ContextViewer is displaying a particle


viewer. If not, returns None.

::`sceneViewer(self)` -> [Hom:hou.SceneViewer]:


#cppname: HOM_ContextViewer::sceneViewer

Returns a SceneViewer if the ContextViewer is displaying a scene


viewer. If not, returns None.

http://www.sidefx.com/docs/houdini10.0/hom/hou/ContextViewer [12/7/2009 4:33:14 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryDisplayToggles

= hou.GeometryDisplayToggles =
#type: homclass
#cppname: HOM_GeometryDisplayToggles
#category: Viewer
#status: ni

@methods

::`isShowingFilledUVBackfaces(self, on)`:
#cppname: HOM_GeometryDisplayToggles::isShowingFilledUVBackfaces
#status: ni

::`isShowingPointNormals(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingPointNormals
#status: ni

::`isShowingPointNumbers(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingPointNumbers
#status: ni

::`isShowingPointPositions(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingPointPositions
#status: ni

::`isShowingPoints(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingPoints
#status: ni

::`isShowingPointTextureCoordinates(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingPointTextureCoordinates
#status: ni

::`isShowingPrimHulls(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingPrimHulls
#status: ni

::`isShowingPrimNormals(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingPrimNormals
#status: ni

::`isShowingPrimNumbers(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingPrimNumbers

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryDisplayToggles (1 of 4) [12/7/2009 4:33:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryDisplayToggles

#status: ni

::`isShowingPrimProfileNumbers(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingPrimProfileNumbers
#status: ni

::`isShowingPrimProfiles(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingPrimProfiles
#status: ni

::`isShowingVertexGrips(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingVertexGrips
#status: ni

::`isShowingVertexNumbers(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingVertexNumbers
#status: ni

::`isShowingVertexTextureCoordinates(self)`:
#cppname: HOM_GeometryDisplayToggles::isShowingVertexTextureCoordinates
#status: ni

::`isUsingFadedLook(self)`:
#cppname: HOM_GeometryDisplayToggles::isUsingFadedLook
#status: ni

::`setShadingMode(self, shading_mode)`:
#cppname: HOM_GeometryDisplayToggles::setShadingMode
#status: ni

::`setUseFadedLook(self, on)`:
#cppname: HOM_GeometryDisplayToggles::setUseFadedLook
#status: ni

::`shadingMode(self)`:
#cppname: HOM_GeometryDisplayToggles::shadingMode
#status: ni

::`showFilledUVBackfaces(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showFilledUVBackfaces
#status: ni

::`showPointNormals(self, on)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryDisplayToggles (2 of 4) [12/7/2009 4:33:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryDisplayToggles

#cppname: HOM_GeometryDisplayToggles::showPointNormals
#status: ni

::`showPointNumbers(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showPointNumbers
#status: ni

::`showPointPositions(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showPointPositions
#status: ni

::`showPoints(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showPoints
#status: ni

::`showPointTextureCoordinates(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showPointTextureCoordinates
#status: ni

::`showPrimHulls(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showPrimHulls
#status: ni

::`showPrimNormals(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showPrimNormals
#status: ni

::`showPrimNumbers(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showPrimNumbers
#status: ni

::`showPrimProfileNumbers(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showPrimProfileNumbers
#status: ni

::`showPrimProfiles(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showPrimProfiles
#status: ni

::`showVertexGrips(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showVertexGrips
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryDisplayToggles (3 of 4) [12/7/2009 4:33:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryDisplayToggles

::`showVertexNumbers(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showVertexNumbers
#status: ni

::`showVertexTextureCoordinates(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showVertexTextureCoordinates
#status: ni

@replaces

- [Cmd:viewdisplay]

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryDisplayToggles (4 of 4) [12/7/2009 4:33:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometrySelection

= hou.GeometrySelection =
#type: homclass
#cppname: HOM_GeometrySelection
#category: Viewer
#status: nd

@methods

::`connectivity(self) -> hou.connectivityType enum value`:


#cppname: HOM_GeometrySelection::connectivity
#status: nd

::`geometryType(self) -> hou.geometryType enum value`:


#cppname: HOM_GeometrySelection::geometryType
#status: nd

::`mergedNode(self, parent, creator_name, force_keep_original_objects=False, display_original_objects=False) -> Node`:


#cppname: HOM_GeometrySelection::mergedNode
#status: nd

::`mergedSelectionString(self, empty_string_selects_all=True) -> string`:


#cppname: HOM_GeometrySelection::mergedSelectionString
#status: nd

::`shrinkSelection(checkuv = true)`:
#cppname: HOM_GeometrySelection::shrinkSelection
#status: nd

::`growSelection(isview3d = true)`:
#cppname: HOM_GeometrySelection::growSelection
#status: nd

::`needsMergedNode(self, parent) -> bool`:


#cppname: HOM_GeometrySelection::needsMergedNode
#status: nd

::`nodes(self) -> tuple of Nodes`:


#cppname: HOM_GeometrySelection::nodes
#status: nd

::`ordered(self) -> bool`:


#cppname: HOM_GeometrySelection::ordered
#status: nd

::`primitiveTypes(self) -> tuple of hou.primitiveType enum values`:


#cppname: HOM_GeometrySelection::primitiveTypes
#status: nd

::`selectionStrings(self, empty_string_selects_all=True) -> tuple of strings`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometrySelection (1 of 2) [12/7/2009 4:33:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometrySelection

#cppname: HOM_GeometrySelection::selectionStrings
#status: nd

::`setConnectivity(self, connectivity)`:
#cppname: HOM_GeometrySelection::setConnectivity
#status: nd

::`setGeometryType(self, type)`:
#cppname: HOM_GeometrySelection::setGeometryType
#status: nd

::`setPrimitiveTypes(self, primitive_types)`:
#cppname: HOM_GeometrySelection::setPrimitiveTypes
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometrySelection (2 of 2) [12/7/2009 4:33:15 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewport

= hou.GeometryViewport =
#type: homclass
#cppname: HOM_GeometryViewport
#category: Viewer
#status: nd

@methods

::`home(self)`:
#cppname: HOM_GeometryViewport::home
#status: nd

::`homeSelected(self)`:
#cppname: HOM_GeometryViewport::homeSelected
#status: ni

::`isOpen(self)`:
#cppname: HOM_GeometryViewport::isOpen
#status: ni

::`name(self)` -> string:


#cppname: HOM_GeometryViewport::name
#status: nd

::`saveFlipbook(self, file_name, only_at_keys=False, append_to_sequence=False, frame_range=None, frame_increment=Non, res=None, audio_file_name=None, audio_sync_time=None, spool_dir=None, object_mask='*', initialize_sim_nodes=False)`:
#cppname: HOM_GeometryViewport::saveFlipbook
#status: ni

(File_name can be `ip` or `md`.)

::`saveViewToCamera(self, camera_node)`:
#cppname: HOM_GeometryViewport::saveViewToCamera

Saves the viewport's current view into the given camera node. It does this
by setting the camera's transform parameters to match the viewport's view
transform matrix.

::`setCamera(self, camera_node)`:
#cppname: HOM_GeometryViewport::setCamera

Makes the viewport look through the given camera node.

::`settings(self)` -> GeometryViewportSettings:


#cppname: HOM_GeometryViewport::settings
#status: nd

::`type(self)` -> hou.geometryViewportType enum value:


#cppname: HOM_GeometryViewport::type
#status: nd

@replaces

- [Cmd:viewcamera]
- [Cmd:viewhome]
- [Cmd:viewwrite]

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewport [12/7/2009 4:33:16 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

= hou.GeometryViewportSettings =
#type: homclass
#cppname: HOM_GeometryViewportSettings
#category: Viewer
#status: ni

@methods

::`aperture(self)`:
#cppname: HOM_GeometryViewportSettings::aperture
#status: ni

::`applyAspect(self)`:
#cppname: HOM_GeometryViewportSettings::applyAspect
#status: ni

::`asCode(self)`:
#cppname: HOM_GeometryViewportSettings::asCode
#status: ni

::`asXML(self)`:
#cppname: HOM_GeometryViewportSettings::asXML
#status: ni

::`automaticallyAdjustClippingPlane(self)`:
#cppname: HOM_GeometryViewportSettings::automaticallyAdjustClippingPlane
#status: ni

::`autoPlaceBGImage(self, on)`:
#cppname: HOM_GeometryViewportSettings::autoPlaceBGImage
#status: ni

::`bGImageCop(self)`:
#cppname: HOM_GeometryViewportSettings::bGImageCop
#status: ni

::`bGImageCopFrame(self)`:
#cppname: HOM_GeometryViewportSettings::bGImageCopFrame
#status: ni

::`bGImageFile(self)`:
#cppname: HOM_GeometryViewportSettings::bGImageFile

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (1 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

#status: ni

::`bGImageFileQuality(self)`:
#cppname: HOM_GeometryViewportSettings::bGImageFileQuality
#status: ni

::`bGImageFileXRes(self)`:
#cppname: HOM_GeometryViewportSettings::bGImageFileXRes
#status: ni

::`bGImageFileYRes(self)`:
#cppname: HOM_GeometryViewportSettings::bGImageFileYRes
#status: ni

::`bGImageSourceType(self)`:
#cppname: HOM_GeometryViewportSettings::bGImageSourceType
#status: ni

::`boxZoom(self)`:
#cppname: HOM_GeometryViewportSettings::boxZoom
#status: ni

::`camera(self)` -> CameraObjNode or None:


#cppname: HOM_GeometryViewportSettings::camera
#status: ni

::`changeNameBasedOnType(self, on)`:
#cppname: HOM_GeometryViewportSettings::changeNameBasedOnType
#status: ni

::`changesNameBasedOnType(self)`:
#cppname: HOM_GeometryViewportSettings::changesNameBasedOnType
#status: ni

::`changeType(self, type)`:
#cppname: HOM_GeometryViewportSettings::changeType
#status: ni

::`clearPercentage(self, percentage)`:
#cppname: HOM_GeometryViewportSettings::clearPercentage
#status: ni

::`colorScheme(self)` -> hou.colorScheme enum value:

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (2 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

#cppname: HOM_GeometryViewportSettings::colorScheme
#status: ni

::`constructionPlane(self)` -> ConstructionPlane:


#cppname: HOM_GeometryViewportSettings::constructionPlane
#status: ni

::`copPlaneForBGImage(self)`:
#cppname: HOM_GeometryViewportSettings::copPlaneForBGImage
#status: ni

::`copySettingsFrom(self, viewport_settings)`:
#cppname: HOM_GeometryViewportSettings::copySettingsFrom
#status: ni

::`destroy(self)`:
#cppname: HOM_GeometryViewportSettings::destroy
#status: ni

::`displayTextures(self, on)`:
#cppname: HOM_GeometryViewportSettings::displayTextures
#status: ni

::`farClippingPlane(self)`:
#cppname: HOM_GeometryViewportSettings::farClippingPlane
#status: ni

::`focalLength(self)`:
#cppname: HOM_GeometryViewportSettings::focalLength
#status: ni

::`hiddenLineSensitivity(self)`:
#cppname: HOM_GeometryViewportSettings::hiddenLineSensitivity
#status: ni

::`imageUOffset(self)`:
#cppname: HOM_GeometryViewportSettings::imageUOffset
#status: ni

::`imageXScale(self)`:
#cppname: HOM_GeometryViewportSettings::imageXScale
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (3 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

::`imageYScale(self)`:
#cppname: HOM_GeometryViewportSettings::imageYScale
#status: ni

::`interactiveShadingMode(self)`:
#cppname: HOM_GeometryViewportSettings::interactiveShadingMode
#status: ni

::`interactiveShadingThresholdInMS(self)`:
#cppname: HOM_GeometryViewportSettings::interactiveShadingThresholdInMS
#status: ni

::`isAutoPlacingBGImage(self)`:
#cppname: HOM_GeometryViewportSettings::isAutoPlacingBGImage
#status: ni

::`isDisplayingTextures(self)`:
#cppname: HOM_GeometryViewportSettings::isDisplayingTextures
#status: ni

::`isFilteringBGImages(self, on)`:
#cppname: HOM_GeometryViewportSettings::isFilteringBGImages
#status: ni

::`isOverridingBGImageFileRes(self)`:
#cppname: HOM_GeometryViewportSettings::isOverridingBGImageFileRes
#status: ni

::`isShowingBGImages(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingBGImages
#status: ni

::`isShowingCameraMask(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingCameraMask
#status: ni

::`isShowingCameraName(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingCameraName
#status: ni

::`isShowingFieldGuide(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingFieldGuide
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (4 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

::`isShowingFloatingOriginAxes(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingFloatingOriginAxes
#status: ni

::`isShowingFootprints(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingFootprints
#status: ni

::`isShowingFullObjectPaths(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingFullObjectPaths
#status: ni

::`isShowingGeometry(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingGeometry
#status: ni

::`isShowingHandles(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingHandles
#status: ni

::`isShowingHullsOnly(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingHullsOnly
#status: ni

::`isShowingObjectNames(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingObjectNames
#status: ni

::`isShowingParticleOriginAxes(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingParticleOriginAxes
#status: ni

::`isShowingSafeArea(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingSafeArea
#status: ni

::`isShowingSpecularHighlights(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingSpecularHighlights
#status: ni

::`isShowingTargetOutput(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingTargetOutput

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (5 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

#status: ni

::`isShowingTemplates(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingTemplates
#status: ni

::`isShowingToolName(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingToolName
#status: ni

::`isShowingViewportName(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingViewportName
#status: ni

::`isShowingWorldOriginAxes(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingWorldOriginAxes
#status: ni

::`isShowingXYGrid(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingXYGrid
#status: ni

::`isShowingXZGrid(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingXZGrid
#status: ni

::`isShowingYZGrid(self)`:
#cppname: HOM_GeometryViewportSettings::isShowingYZGrid
#status: ni

::`isSortingParticleSprites(self)`:
#cppname: HOM_GeometryViewportSettings::isSortingParticleSprites
#status: ni

::`isUnselectedOverridingSelected(self)`:
#cppname: HOM_GeometryViewportSettings::isUnselectedOverridingSelected
#status: ni

::`isUsingTransparency(self)`:
#cppname: HOM_GeometryViewportSettings::isUsingTransparency
#status: ni

::`lastHomeDistance(self)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (6 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

#cppname: HOM_GeometryViewportSettings::lastHomeDistance
#status: ni

::`lastHomeOrthoWidth(self)`:
#cppname: HOM_GeometryViewportSettings::lastHomeOrthoWidth
#status: ni

::`lastHomePixelWidth(self)`:
#cppname: HOM_GeometryViewportSettings::lastHomePixelWidth
#status: ni

::`lastHomeRadius(self)`:
#cppname: HOM_GeometryViewportSettings::lastHomeRadius
#status: ni

::`levelOfDetail(self)`:
#cppname: HOM_GeometryViewportSettings::levelOfDetail
#status: ni

::`loadFromXML(self, xml)`:
#cppname: HOM_GeometryViewportSettings::loadFromXML
#status: ni

::`maxBGImageUValue(self)`:
#cppname: HOM_GeometryViewportSettings::maxBGImageUValue
#status: ni

::`maxBGImageVValue(self)`:
#cppname: HOM_GeometryViewportSettings::maxBGImageVValue
#status: ni

::`minBGImageUValue(self)`:
#cppname: HOM_GeometryViewportSettings::minBGImageUValue
#status: ni

::`minBGImageVValue(self)`:
#cppname: HOM_GeometryViewportSettings::minBGImageVValue
#status: ni

::`multiTexturing(self)`:
#cppname: HOM_GeometryViewportSettings::multiTexturing
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (7 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

::`name(self)`:
#cppname: HOM_GeometryViewportSettings::name
#status: ni

::`nearClippingPlane(self)`:
#cppname: HOM_GeometryViewportSettings::nearClippingPlane
#status: ni

::`normalScale(self)` -> float:


#cppname: HOM_GeometryViewportSettings::normalScale
#status: nd

::`onlyShowPixelGridOverBGImage(self, on)`:
#cppname: HOM_GeometryViewportSettings::onlyShowPixelGridOverBGImage
#status: ni

::`onlyShowsPixelGridOverBGImage(self)`:
#cppname: HOM_GeometryViewportSettings::onlyShowsPixelGridOverBGImage
#status: ni

::`orthoWidth(self)`:
#cppname: HOM_GeometryViewportSettings::orthoWidth
#status: ni

::`particlePointSize(self)`:
#cppname: HOM_GeometryViewportSettings::particlePointSize
#status: ni

::`pivot(self)` -> Vector3:


#cppname: HOM_GeometryViewportSettings::pivot
#status: ni

::`pixelAspectRatio(self)`:
#cppname: HOM_GeometryViewportSettings::pixelAspectRatio
#status: ni

::`projectedTextures(self)`:
#cppname: HOM_GeometryViewportSettings::projectedTextures
#status: ni

::`removesBackfaces(self)`:
#cppname: HOM_GeometryViewportSettings::removesBackfaces
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (8 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

::`rotationMatrix(self)` -> Matrix4:


#cppname: HOM_GeometryViewportSettings::rotationMatrix
#status: ni

::`rotoscopedImageRoll(self)`:
#cppname: HOM_GeometryViewportSettings::rotoscopedImageRoll
#status: ni

::`rotoTrackWindow(self)`:
#cppname: HOM_GeometryViewportSettings::rotoTrackWindow
#status: ni

::`saveViewToCamera(self, camera_node)`:
#cppname: HOM_GeometryViewportSettings::saveViewToCamera

Saves the viewport's current view into the given camera node. It does this
by setting the camera's transform parameters to match the viewport's view
transform matrix.

::`selected(self)` -> [Hom:hou.GeometryDisplayToggles]:


#cppname: HOM_GeometryViewportSettings::selected
#status: ni

::`setAperture(self, aperture)`:
#cppname: HOM_GeometryViewportSettings::setAperture
#status: ni

::`setApplyAspect(self, on)`:
#cppname: HOM_GeometryViewportSettings::setApplyAspect
#status: ni

::`setAutomaticallyAdjustClippingPlane(self)`:
#cppname: HOM_GeometryViewportSettings::setAutomaticallyAdjustClippingPlane
#status: ni

::`setBGImageCop(self, cop_node)`:
#cppname: HOM_GeometryViewportSettings::setBGImageCop
#status: ni

::`setBGImageCopFrameExpression(self, frame_expression)`:
#cppname: HOM_GeometryViewportSettings::setBGImageCopFrameExpression
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (9 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

::`setBGImageFile(self, file_name)`:
#cppname: HOM_GeometryViewportSettings::setBGImageFile
#status: ni

::`setBGImageFileQuality(self, quality)`:
#cppname: HOM_GeometryViewportSettings::setBGImageFileQuality
#status: ni

::`setBGImageFileXRes(self, x_res)`:
#cppname: HOM_GeometryViewportSettings::setBGImageFileXRes
#status: ni

::`setBGImageFileYRes(self, y_res)`:
#cppname: HOM_GeometryViewportSettings::setBGImageFileYRes
#status: ni

::`setBGImageSourceType(self, type)`:
#cppname: HOM_GeometryViewportSettings::setBGImageSourceType
#status: ni

::`setBoxZoom(self, on)`:
#cppname: HOM_GeometryViewportSettings::setBoxZoom
#status: ni

::`setCamera(self, camera_node)`:
#cppname: HOM_GeometryViewportSettings::setCamera

Makes the viewport look through the given camera node.

::`setClearPercentage(self, percentage)`:
#cppname: HOM_GeometryViewportSettings::setClearPercentage
#status: ni

::`setColorScheme(self, scheme)`:
#cppname: HOM_GeometryViewportSettings::setColorScheme
#status: ni

::`setCopPlaneForBGImage(self, plane_name)`:
#cppname: HOM_GeometryViewportSettings::setCopPlaneForBGImage
#status: ni

::`setFarClippingPlane(self, distance)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (10 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

#cppname: HOM_GeometryViewportSettings::setFarClippingPlane
#status: ni

::`setFilterBGImages(self, on)`:
#cppname: HOM_GeometryViewportSettings::setFilterBGImages
#status: ni

::`setFocalLength(self, length)`:
#cppname: HOM_GeometryViewportSettings::setFocalLength
#status: ni

::`setHiddenLineSensitivity(self, constant_sensitivity, variable_sensitivity)`:


#cppname: HOM_GeometryViewportSettings::setHiddenLineSensitivity
#status: ni

::`setImageUOffset(self, offset)`:
#cppname: HOM_GeometryViewportSettings::setImageUOffset
#status: ni

::`setImageXScale(self, scale)`:
#cppname: HOM_GeometryViewportSettings::setImageXScale
#status: ni

::`setImageYScale(self, scale)`:
#cppname: HOM_GeometryViewportSettings::setImageYScale
#status: ni

::`setInteractiveShadingMode(self, shading_mode)`:
#cppname: HOM_GeometryViewportSettings::setInteractiveShadingMode
#status: ni

::`setInteractiveShadingThresholdInMS(self, threshold_in_ms)`:
#cppname: HOM_GeometryViewportSettings::setInteractiveShadingThresholdInMS
#status: ni

::`setLastHomeDistance(self, distance)`:
#cppname: HOM_GeometryViewportSettings::setLastHomeDistance
#status: ni

::`setLastHomeOrthoWidth(self, pixel_width)`:
#cppname: HOM_GeometryViewportSettings::setLastHomeOrthoWidth
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (11 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

::`setLastHomePixelWidth(self, pixel_width)`:
#cppname: HOM_GeometryViewportSettings::setLastHomePixelWidth
#status: ni

::`setLastHomeRadius(self, radius)`:
#cppname: HOM_GeometryViewportSettings::setLastHomeRadius
#status: ni

::`setLevelOfDetail(self, lod)`:
#cppname: HOM_GeometryViewportSettings::setLevelOfDetail
#status: ni

::`setMaxBGImageUValue(self, value)`:
#cppname: HOM_GeometryViewportSettings::setMaxBGImageUValue
#status: ni

::`setMaxBGImageVValue(self, value)`:
#cppname: HOM_GeometryViewportSettings::setMaxBGImageVValue
#status: ni

::`setMinBGImageUValue(self, value)`:
#cppname: HOM_GeometryViewportSettings::setMinBGImageUValue
#status: ni

::`setMinBGImageVValue(self, value)`:
#cppname: HOM_GeometryViewportSettings::setMinBGImageVValue
#status: ni

::`setMultiTexturing(self, on)`:
#cppname: HOM_GeometryViewportSettings::setMultiTexturing
#status: ni

::`setName(self)`:
#cppname: HOM_GeometryViewportSettings::setName
#status: ni

::`setNearClippingPlane(self, distance)`:
#cppname: HOM_GeometryViewportSettings::setNearClippingPlane
#status: ni

::`setNormalScale(self, normal_scale)`:
#cppname: HOM_GeometryViewportSettings::setNormalScale
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (12 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

::`setOrthoGridOffset(self, x, y, z)`:
#cppname: HOM_GeometryViewportSettings::setOrthoGridOffset
#status: ni

::`setOrthoGridRulerSpacing(self, x, y)`:
#cppname: HOM_GeometryViewportSettings::setOrthoGridRulerSpacing
#status: ni

::`setOrthoGridSpacing(self, x, y)`:
#cppname: HOM_GeometryViewportSettings::setOrthoGridSpacing
#status: ni

::`setOrthoWidth(self, width)`:
#cppname: HOM_GeometryViewportSettings::setOrthoWidth
#status: ni

::`setOverrideBGImageFileRes(self, on)`:
#cppname: HOM_GeometryViewportSettings::setOverrideBGImageFileRes
#status: ni

::`setParticlePointSize(self, size)`:
#cppname: HOM_GeometryViewportSettings::setParticlePointSize
#status: ni

::`setPerpectiveProjectionMethod(self, method)`:
#cppname: HOM_GeometryViewportSettings::setPerpectiveProjectionMethod
#status: ni

::`setPivot(self, x, y, z)`:
#cppname: HOM_GeometryViewportSettings::setPivot
#status: ni

::`setPixelAspectRatio(self, ratio)`:
#cppname: HOM_GeometryViewportSettings::setPixelAspectRatio
#status: ni

::`setPixelGridOffset(self, u, v)`:
#cppname: HOM_GeometryViewportSettings::setPixelGridOffset
#status: ni

::`setPixelGridSpacing(self, u, v)`:
#cppname: HOM_GeometryViewportSettings::setPixelGridSpacing

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (13 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

#status: ni

::`setProjectedTextures(self, on)`:
#cppname: HOM_GeometryViewportSettings::setProjectedTextures
#status: ni

::`setReferenceGridSpacing(self, u, v)`:
#cppname: HOM_GeometryViewportSettings::setReferenceGridSpacing
#status: ni

::`setRemoveBackfaces(self, on)`:
#cppname: HOM_GeometryViewportSettings::setRemoveBackfaces
#status: ni

::`setRotationMatrix(self, matrix4)`:
#cppname: HOM_GeometryViewportSettings::setRotationMatrix
#status: ni

::`setRotoscopedImageRoll(self, roll)`:
#cppname: HOM_GeometryViewportSettings::setRotoscopedImageRoll
#status: ni

::`setRotoTrackWindow(self, on)`:
#cppname: HOM_GeometryViewportSettings::setRotoTrackWindow
#status: ni

::`setShadeOpenCurves(self, on)`:
#cppname: HOM_GeometryViewportSettings::setShadeOpenCurves
#status: ni

::`setSortParticleSprites(self, on)`:
#cppname: HOM_GeometryViewportSettings::setSortParticleSprites
#status: ni

::`setTranslation(self, x, y, z)`:
#cppname: HOM_GeometryViewportSettings::setTranslation
#status: ni

::`setUnselectedOverridesSelected(self, on)`:
#cppname: HOM_GeometryViewportSettings::setUnselectedOverridesSelected
#status: ni

::`setUseCopAlphaForBGImage(self, on)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (14 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

#cppname: HOM_GeometryViewportSettings::setUseCopAlphaForBGImage
#status: ni

::`setViewAspectRatio(self, ratio)`:
#cppname: HOM_GeometryViewportSettings::setViewAspectRatio
#status: ni

::`setViewTransform(self, matrix)`:
#cppname: HOM_GeometryViewportSettings::setViewTransform
#status: ni

::`setVisibleObjectsMask(self, mask)`:
#cppname: HOM_GeometryViewportSettings::setVisibleObjectsMask
#status: ni

::`setWindowHeight(self, height)`:
#cppname: HOM_GeometryViewportSettings::setWindowHeight
#status: ni

::`setWindowSizeScale(self, scale)`:
#cppname: HOM_GeometryViewportSettings::setWindowSizeScale
#status: ni

::`setWindowWidth(self, width)`:
#cppname: HOM_GeometryViewportSettings::setWindowWidth
#status: ni

::`setWireWidth(self, width)`:
#cppname: HOM_GeometryViewportSettings::setWireWidth
#status: ni

::`setXResScale(self, scale)`:
#cppname: HOM_GeometryViewportSettings::setXResScale
#status: ni

::`setYResScale(self, scale)`:
#cppname: HOM_GeometryViewportSettings::setYResScale
#status: ni

::`shadesOpenCurves(self)`:
#cppname: HOM_GeometryViewportSettings::shadesOpenCurves
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (15 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

::`showBGImages(self, on)`:
#cppname: HOM_GeometryViewportSettings::showBGImages
#status: ni

::`showCameraMask(self, on)`:
#cppname: HOM_GeometryViewportSettings::showCameraMask
#status: ni

::`showCameraName(self, on)`:
#cppname: HOM_GeometryViewportSettings::showCameraName
#status: ni

::`showFieldGuide(self, on)`:
#cppname: HOM_GeometryViewportSettings::showFieldGuide
#status: ni

::`showFloatingOriginAxes(self, on)`:
#cppname: HOM_GeometryViewportSettings::showFloatingOriginAxes
#status: ni

::`showFootprints(self, on)`:
#cppname: HOM_GeometryViewportSettings::showFootprints
#status: ni

::`showFullObjectPaths(self, on)`:
#cppname: HOM_GeometryViewportSettings::showFullObjectPaths
#status: ni

::`showGeometry(self, on)`:
#cppname: HOM_GeometryViewportSettings::showGeometry
#status: ni

::`showHandles(self, on)`:
#cppname: HOM_GeometryViewportSettings::showHandles
#status: ni

::`showHullsOnly(self, on)`:
#cppname: HOM_GeometryViewportSettings::showHullsOnly
#status: ni

::`showObjectNames(self, on)`:
#cppname: HOM_GeometryViewportSettings::showObjectNames
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (16 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

::`showOrthoGrid(self, on)`:
#cppname: HOM_GeometryViewportSettings::showOrthoGrid
#status: ni

::`showParticleOriginAxes(self, on)`:
#cppname: HOM_GeometryViewportSettings::showParticleOriginAxes
#status: ni

::`showPixelGrid(self, on)`:
#cppname: HOM_GeometryViewportSettings::showPixelGrid
#status: ni

::`showReferenceGrid(self, on)`:
#cppname: HOM_GeometryViewportSettings::showReferenceGrid
#status: ni

::`showSafeArea(self, on)`:
#cppname: HOM_GeometryViewportSettings::showSafeArea
#status: ni

::`showsOrthoGrid(self)`:
#cppname: HOM_GeometryViewportSettings::showsOrthoGrid
#status: ni

::`showSpecularHighlights(self, on)`:
#cppname: HOM_GeometryViewportSettings::showSpecularHighlights
#status: ni

::`showsPixelGrid(self)`:
#cppname: HOM_GeometryViewportSettings::showsPixelGrid
#status: ni

::`showsReferenceGrid(self)`:
#cppname: HOM_GeometryViewportSettings::showsReferenceGrid
#status: ni

::`showsTileBoundary(self)`:
#cppname: HOM_GeometryViewportSettings::showsTileBoundary
#status: ni

::`showTargetOutput(self, on)`:
#cppname: HOM_GeometryViewportSettings::showTargetOutput

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (17 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

#status: ni

::`showTemplates(self, on)`:
#cppname: HOM_GeometryViewportSettings::showTemplates
#status: ni

::`showTileBoundary(self, on)`:
#cppname: HOM_GeometryViewportSettings::showTileBoundary
#status: ni

::`showToolName(self, on)`:
#cppname: HOM_GeometryViewportSettings::showToolName
#status: ni

::`showViewportName(self, on)`:
#cppname: HOM_GeometryViewportSettings::showViewportName
#status: ni

::`showWorldOriginAxes(self, on)`:
#cppname: HOM_GeometryViewportSettings::showWorldOriginAxes
#status: ni

::`showXYGrid(self, on)`:
#cppname: HOM_GeometryViewportSettings::showXYGrid
#status: ni

::`showXZGrid(self, on)`:
#cppname: HOM_GeometryViewportSettings::showXZGrid
#status: ni

::`showYZGrid(self, on)`:
#cppname: HOM_GeometryViewportSettings::showYZGrid
#status: ni

::`targetOutput(self)` -> GeometryDisplayToggles:


#cppname: HOM_GeometryViewportSettings::targetOutput
#status: ni

::`templated(self)` -> GeometryDisplayToggles:


#cppname: HOM_GeometryViewportSettings::templated
#status: ni

::`unselected(self)` -> GeometryDisplayToggles:

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (18 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

#cppname: HOM_GeometryViewportSettings::unselected
#status: ni

::`usesCopAlphaForBGImage(self)`:
#cppname: HOM_GeometryViewportSettings::usesCopAlphaForBGImage
#status: ni

::`usesTextureMapsForBGImage(self)`:
#cppname: HOM_GeometryViewportSettings::usesTextureMapsForBGImage
#status: ni

::`useTextureMapsForBGImage(self, on)`:
#cppname: HOM_GeometryViewportSettings::useTextureMapsForBGImage
#status: ni

::`useTransparency(self, on)`:
#cppname: HOM_GeometryViewportSettings::useTransparency
#status: ni

::`viewAspectRatio(self)`:
#cppname: HOM_GeometryViewportSettings::viewAspectRatio
#status: ni

::`viewportType(self)` -> hou.geometryViewportType enum value:


#cppname: HOM_GeometryViewportSettings::viewportType
#status: nd

::`viewTransform(self)` -> Matrix:


#cppname: HOM_GeometryViewportSettings::viewTransform
#status: ni

::`visibleObjectsMask(self)`:
#cppname: HOM_GeometryViewportSettings::visibleObjectsMask
#status: ni

::`windowHeight(self)`:
#cppname: HOM_GeometryViewportSettings::windowHeight
#status: ni

::`windowSizeScale(self)`:
#cppname: HOM_GeometryViewportSettings::windowSizeScale
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (19 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings

::`windowWidth(self)`:
#cppname: HOM_GeometryViewportSettings::windowWidth
#status: ni

::`wireWidth(self)`:
#cppname: HOM_GeometryViewportSettings::wireWidth
#status: ni

::`xResScale(self, scale)`:
#cppname: HOM_GeometryViewportSettings::xResScale
#status: ni

::`yResScale(self, scale)`:
#cppname: HOM_GeometryViewportSettings::yResScale
#status: ni

@replaces

- [Cmd:cplane]
- [Cmd:viewbackground]
- [Cmd:viewcamera]
- [Cmd:viewcopy]
- [Cmd:viewdisplay]
- [Cmd:viewls]
- [Cmd:viewname]
- [Cmd:vieworthogrid]
- [Cmd:viewprojection]
- [Cmd:viewsnapshot]
- [Cmd:viewtransform]
- [Cmd:viewtype]
- [Cmd:viewuvgrid]

http://www.sidefx.com/docs/houdini10.0/hom/hou/GeometryViewportSettings (20 of 20) [12/7/2009 4:33:19 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HandleBinding

= hou.HandleBinding =
#type: homclass
#cppname: HOM_HandleBinding
#category: Viewer
#status: ni

@methods

::`addParmBinding(self, node_parm_name, handle_parm_name)`:


#cppname: HOM_HandleBinding::addParmBinding
#status: ni

::`addParmBindingToOtherNodeType(self, node_type, node_parm_name, handle_parm_name)`:


#cppname: HOM_HandleBinding::addParmBindingToOtherNodeType
#status: ni

::`destroy(self)`:
#cppname: HOM_HandleBinding::destroy
#status: ni

::`handleType(self)` -> HandleType:


#cppname: HOM_HandleBinding::handleType
#status: ni

::`name(self)`:
#cppname: HOM_HandleBinding::name
#status: ni

::`parmBindings(self)` -> tuple of HandleNodeTypeParmBindings:


#cppname: HOM_HandleBinding::parmBindings
#status: ni

::`primaryNodeType(self)` -> NodeType:


#cppname: HOM_HandleBinding::primaryNodeType
#status: ni

::`save(self, bindings_file_name)`:
#cppname: HOM_HandleBinding::save
#status: ni

::`saveAppendingToFile(self, bindings_file_name)`:
#cppname: HOM_HandleBinding::saveAppendingToFile

http://www.sidefx.com/docs/houdini10.0/hom/hou/HandleBinding (1 of 2) [12/7/2009 4:33:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HandleBinding

#status: ni

::`settings(self)` -> dict:


#cppname: HOM_HandleBinding::settings
#status: ni

@replaces

- [Cmd:ombind]
- [Cmd:omparm]
- [Cmd:omunbind]

http://www.sidefx.com/docs/houdini10.0/hom/hou/HandleBinding (2 of 2) [12/7/2009 4:33:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HandleNodeTypeParmBinding

= hou.HandleNodeTypeParmBinding =
#type: homclass
#cppname: HOM_HandleNodeTypeParmBinding
#category: Viewer
#status: ni

@methods

::`destroy(self)`:
#cppname: HOM_HandleNodeTypeParmBinding::destroy
#status: ni

::`handleParmName(self)`:
#cppname: HOM_HandleNodeTypeParmBinding::handleParmName
#status: ni

::`nodeParmName(self)`:
#cppname: HOM_HandleNodeTypeParmBinding::nodeParmName
#status: ni

::`nodeType(self)` -> NodeType:


#cppname: HOM_HandleNodeTypeParmBinding::nodeType
#status: ni

@replaces

- [Cmd:omunbind]

http://www.sidefx.com/docs/houdini10.0/hom/hou/HandleNodeTypeParmBinding [12/7/2009 4:33:20 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/HandleType

= hou.HandleType =
#type: homclass
#cppname: HOM_HandleType
#category: Viewer
#status: ni

::`name(self)`:
#cppname: HOM_HandleType::name
#status: ni

::`parmNames(self)` -> tuple of strings:


#cppname: HOM_HandleType::parmNames
#status: ni

@replaces

- [Cmd:omls]

http://www.sidefx.com/docs/houdini10.0/hom/hou/HandleType [12/7/2009 4:33:21 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParticleSelection

= hou.ParticleSelection =
#type: homclass
#cppname: HOM_ParticleSelection
#category: Viewer
#status: nd

@methods

::`popNetwork(self) -> Node`:


#cppname: HOM_ParticleSelection::popNetwork
#status: nd

::`popnodes(self) -> tuple of POP Nodes`:


#cppname: HOM_ParticleSelection::popNodes
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParticleSelection [12/7/2009 4:33:21 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ParticleViewer

= hou.ParticleViewer =
#type: homclass
#cppname: HOM_ParticleViewer
#category: Viewer
#status: nd

@methods

::`currentState(self) -> string`:


#cppname: HOM_ParticleViewer::currentState
#status: nd

::`enterCurrentNodeState(self, wait_for_exit=False)`:
#cppname: HOM_ParticleViewer::enterCurrentNodeState
#status: nd

::`enterViewState(self, wait_for_exit=False)`:
#cppname: HOM_ParticleViewer::enterViewState
#status: nd

::`findViewport(self, name) -> GeometryViewport`:


#cppname: HOM_ParticleViewer::findViewport
#status: nd

::`isCreateInContext(self) -> bool`:


#cppname: HOM_ParticleViewer::isCreateInContext
#status: nd

::`setCurrentState(self, state, wait_for_exit=False)`:


#cppname: HOM_ParticleViewer::setCurrentState
#status: nd

::`viewports(self) -> tuple of GeometryViewports`:


#cppname: HOM_ParticleViewer::viewports
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/ParticleViewer [12/7/2009 4:33:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandle

= hou.PersistentHandle =
#type: homclass
#cppname: HOM_PersistentHandle
#category: Viewer
#status: ni

@methods

::`addParmBinding(self, parm, handle_parm_name)`:


#cppname: HOM_PersistentHandle::addParmBinding
#status: ni

::`asCode(self)`:
#cppname: HOM_PersistentHandle::asCode
#status: ni

::`clearParmBindings(self)`:
#cppname: HOM_PersistentHandle::clearParmBindings
#status: ni

::`color(self)` -> Color:


#cppname: HOM_PersistentHandle::color
#status: ni

::`destroy(self)`:
#cppname: HOM_PersistentHandle::destroy
#status: ni

::`handleType(self)` -> HandleType:


#cppname: HOM_PersistentHandle::handleType
#status: ni

::`isShownForChildNode(self)`:
#cppname: HOM_PersistentHandle::isShownForChildNode
#status: ni

::`isShownForParentNodes(self)`:
#cppname: HOM_PersistentHandle::isShownForParentNodes
#status: ni

::`isShownForSiblingNodes(self)`:
#cppname: HOM_PersistentHandle::isShownForSiblingNodes

http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandle (1 of 3) [12/7/2009 4:33:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandle

#status: ni

::`isVisible(self, on)`:
#cppname: HOM_PersistentHandle::isVisible
#status: ni

::`name(self)`:
#cppname: HOM_PersistentHandle::name
#status: ni

::`paneMask(self)`:
#cppname: HOM_PersistentHandle::paneMask
#status: ni

::`parmBindings(self)` -> tuple of PersistentHandleParmBindings:


#cppname: HOM_PersistentHandle::parmBindings
#status: ni

::`primaryNode(self)` -> Node or None:


#cppname: HOM_PersistentHandle::primaryNode
#status: ni

::`removeBindingsToNode(self, node)`:
#cppname: HOM_PersistentHandle::removeBindingsToNode
#status: ni

::`setColor(self, color)`:
#cppname: HOM_PersistentHandle::setColor
#status: ni

::`setIsVisible(self, on)`:
#cppname: HOM_PersistentHandle::setIsVisible
#status: ni

::`setName(self, name)`:
#cppname: HOM_PersistentHandle::setName
#status: ni

::`setPaneMask(self, mask)`:
#cppname: HOM_PersistentHandle::setPaneMask
#status: ni

::`settings(self)` -> dict:

http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandle (2 of 3) [12/7/2009 4:33:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandle

#cppname: HOM_PersistentHandle::settings
#status: ni

::`showForChildNode(self, on)`:
#cppname: HOM_PersistentHandle::showForChildNode
#status: ni

::`showForParentNodes(self, on)`:
#cppname: HOM_PersistentHandle::showForParentNodes
#status: ni

::`showForSiblingNodes(self, on)`:
#cppname: HOM_PersistentHandle::showForSiblingNodes
#status: ni

@replaces

- [Cmd:pomadd]
- [Cmd:pomattach]
- [Cmd:pomclear]
- [Cmd:pomdetach]
- [Cmd:pomparm]
- [Cmd:pomremove]
- [Cmd:pomrename]
- [Cmd:pomscript]
- [Cmd:pomset]

http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandle (3 of 3) [12/7/2009 4:33:22 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandleParmBinding

= hou.PersistentHandleParmBinding =
#type: homclass
#cppname: HOM_PersistentHandleParmBinding
#category: Viewer
#status: ni

@methods

::`destroy(self)`:
#cppname: HOM_PersistentHandleParmBinding::destroy
#status: ni

::`handleParmName(self)`:
#cppname: HOM_PersistentHandleParmBinding::handleParmName
#status: ni

::`parm(self)` -> Parm:


#cppname: HOM_PersistentHandleParmBinding::parm
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandleParmBinding [12/7/2009 4:33:23 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SceneViewer

= hou.SceneViewer = #type: homclass #cppname: HOM_SceneViewer #superclass: hou.


PathBasedPaneTab #category: Viewer #status: nd @methods ::`isOpen(self)` -> bool: #cppname:
HOM_SceneViewer::isOpen #status: ni ::`selectObjects(self, prompt='Select objects', sel_index=0,
allow_drag=False, quick_select=False, use_existing_selection=True, allow_multisel=True,
allowed_types=('*',), icon=None, label=None)` -> tuple of Nodes: #cppname: HOM_SceneViewer::
selectObjects #status: nd Document that this can raise hou.OperationInterrupted. ::`selectGeometry(self,
prompt='Select geometry', sel_index=0, allow_drag=False, quick_select=False,
use_existing_selection=True, ordered=False, geometry_types=(), primitive_types=(),
allow_obj_sel=True, icon=None, label=None)` -> GeometrySelection: #cppname: HOM_SceneViewer::
selectGeometry #status: nd ::`selectPositions(self, prompt='Click to specify a position',
number_of_positions=1, connect_positions=True, show_coordinates=True, bbox=BoundingBox(),
position_type=positionType.WorldSpace, icon=None, label=None)` -> tuple of Vector3s: #cppname:
HOM_SceneViewer::selectPositions #status: nd ::`selectDynamics(self, prompt='Select dynamics
objects', sel_index=0, allow_objects=True, allow_modifiers=False, quick_select=False,
use_existing_selection=True, allow_multisel=True, icon=None, label=None)` -> tuple of [Hom:hou.
DopData]: #cppname: HOM_SceneViewer::selectDynamics #status: nd ::`selectDynamicsPoints(self,
prompt='Select dynamics points', sel_index=0, quick_select=False, use_existing_selection=True,
allow_multisel=True, only_select_points=True, icon=None, label=None)` -> tuple of ([Hom:hou.
DopData], [Hom:hou.GeometrySelection]): #cppname: HOM_SceneViewer::selectDynamicsPoints
#status: nd ::`selectParticles(self, prompt='Select particles', sel_index=0, select_connected=True,
quick_select=False, use_existing_selection=True, allow_multisel=True, icon=None, label=None)` ->
ParticleSelection: #cppname: HOM_SceneViewer::selectParticles #status: nd ::`selectParticleNodes(self,
prompt='Select particle nodes', sel_index=0, allow_generators=True, allow_modifiers=False,
quick_select=False, use_existing_selection=True, allow_multisel=True, icon=None, label=None)` ->
ParticleSelection: #cppname: HOM_SceneViewer::selectParticleNodes #status: nd ::`currentState(self)` -
> string: #cppname: HOM_SceneViewer::currentState #status: nd ::`setCurrentState(self, state,
wait_for_exit=False)`: #cppname: HOM_SceneViewer::setCurrentState #status: nd ::
`enterCurrentNodeState(self, wait_for_exit=False)`: #cppname: HOM_SceneViewer::
enterCurrentNodeState #status: nd ::`enterViewState(self, wait_for_exit=False)`: #cppname:
HOM_SceneViewer::enterViewState #status: nd ::`viewports(self)` -> tuple of GeometryViewports:
#cppname: HOM_SceneViewer::viewports #status: nd ::`findViewport(self, name)` ->
GeometryViewport: #cppname: HOM_SceneViewer::findViewport #status: nd ::`curViewport(self)` ->
[Hom:hou.GeometryViewport]: #cppname: HOM_SceneViewer::curViewport Returns this viewer's
current viewport. The current viewport is the one containing the mouse cursor. If the cursor is not in a
viewport, then the selected, or active, viewport is returned. ::`setCurViewport(self, viewport)`:
#cppname: HOM_SceneViewer::setCurViewport #status: ni ::`linkOrthoViewports(self)`: #cppname:
HOM_SceneViewer::linkOrthoViewports #status: ni ::`setLinkOrthoViewports(self, on)`: #cppname:
HOM_SceneViewer::setLinkOrthoViewports #status: ni ::`viewportLayout(self)`: #cppname:
HOM_SceneViewer::viewportLayout #status: ni ::`setViewportLayout(self, layout)`: #cppname:
HOM_SceneViewer::setViewportLayout #status: ni ::`appliesToAllSplitViews(self)`: #cppname:
HOM_SceneViewer::appliesToAllSplitViews #status: ni ::`setApplyToAllSplitViews(self, on)`:
#cppname: HOM_SceneViewer::setApplyToAllSplitViews #status: ni ::`snappingMode(self)`:
#cppname: HOM_SceneViewer::snappingMode #status: nd ::`setSnappingMode(self, snapping_mode)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/SceneViewer (1 of 3) [12/7/2009 4:33:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SceneViewer

#cppname: HOM_SceneViewer::setSnappingMode #status: nd ::`isSnappingToTemplates(self)`:


#cppname: HOM_SceneViewer::isSnappingToTemplates #status: nd ::`setSnapToTemplates(self, on)`:
#cppname: HOM_SceneViewer::setSnapToTemplates #status: nd ::`isSnappingToOtherObjects(self)`:
#cppname: HOM_SceneViewer::isSnappingToOtherObjects #status: nd ::`setSnapToOtherObjects(self,
on)`: #cppname: HOM_SceneViewer::setSnapToOtherObjects #status: nd ::`isDepthSnapping(self)`:
#cppname: HOM_SceneViewer::isDepthSnapping #status: nd ::`setDepthSnapping(self, on)`:
#cppname: HOM_SceneViewer::setDepthSnapping #status: nd ::`isOrientingOnSnap(self)`: #cppname:
HOM_SceneViewer::isOrientingOnSnap #status: nd ::`setOrientOnSnap(self, on)`: #cppname:
HOM_SceneViewer::setOrientOnSnap #status: nd ::`viewerType(self)` -> hou.viewerType enum value:
#cppname: HOM_SceneViewer::viewerType #status: ni ::`isShowingObjectsAtSopLevel(self)`:
#cppname: HOM_SceneViewer::isShowingObjectsAtSopLevel #status: ni ::`setShowObjectsAtSopLevel
(self, on)`: #cppname: HOM_SceneViewer::setShowObjectsAtSopLevel #status: ni ::`isCreateInContext
(self) -> bool`: #cppname: HOM_SceneViewer::isCreateInContext #status: nd ::
`displayedNodeBehaviour(self)`: #cppname: HOM_SceneViewer::displayedNodeBehaviour #status: ni ::
`setDisplayedNodeBehaviour(self, behaviour)`: #cppname: HOM_SceneViewer::
setDisplayedNodeBehaviour #status: ni ::`memories(self)` -> dict of ints to GeometryViewportSettings:
#cppname: HOM_SceneViewer::memories #status: ni ::`createMemoryFromViewport(self, viewport,
number)` -> GeometryViewportSettings: #cppname: HOM_SceneViewer::createMemoryFromViewport
#status: ni ::`loadFromMemoryToViewport(self, viewport, number)`: #cppname: HOM_SceneViewer::
loadFromMemoryToViewport #status: ni ::`deleteAllMemories(self)`: #cppname: HOM_SceneViewer::
deleteAllMemories #status: ni ::`showsMemoriesAtBottom(self)`: #cppname: HOM_SceneViewer::
showsMemoriesAtBottom #status: ni ::`setShowMemoriesAtBottom(self, on)`: #cppname:
HOM_SceneViewer::setShowMemoriesAtBottom #status: ni ::`createSnapshotFromViewport(self,
viewport, number)`: #cppname: HOM_SceneViewer::createSnapshotFromViewport #status: ni ::
`showSnapshot(self, number)`: #cppname: HOM_SceneViewer::showSnapshot #status: ni ::
`hideSnapshot(self, number)`: #cppname: HOM_SceneViewer::hideSnapshot #status: ni ::
`showsSnapshotsAtSourceFrame(self)`: #cppname: HOM_SceneViewer::
showsSnapshotsAtSourceFrame #status: ni ::`setShowSnapshotsAtSourceFrame(self, on)`: #cppname:
HOM_SceneViewer::setShowSnapshotsAtSourceFrame #status: ni ::`snapshotAlphaBlend(self)`:
#cppname: HOM_SceneViewer::snapshotAlphaBlend #status: ni ::`setSnapshotAlphaBlend(self, alpha)
`: #cppname: HOM_SceneViewer::setSnapshotAlphaBlend #status: ni ::`snapshotObjectMask(self)`:
#cppname: HOM_SceneViewer::snapshotObjectMask #status: ni ::`setSnapshotObjectMask(self, mask)
`: #cppname: HOM_SceneViewer::setSnapshotObjectMask #status: ni ::`showsHandlesInSnapshots(self)
`: #cppname: HOM_SceneViewer::showsHandlesInSnapshots #status: ni ::`setShowHandlesInSnapshots
(self, on)`: #cppname: HOM_SceneViewer::setShowHandlesInSnapshots #status: ni ::`render(self)`:
#cppname: HOM_SceneViewer::render #status: ni ::`renderOutput(self)`: #cppname:
HOM_SceneViewer::renderOutput #status: ni ::`setRenderOutputToBuiltIn(self, renderer)`: #cppname:
HOM_SceneViewer::setRenderOutputToBuiltIn #status: ni ::`setRenderOutputToRop(self, rop_node)`:
#cppname: HOM_SceneViewer::setRenderOutputToRop #status: ni ::`showsNodeToolbarAtTop(self)`:
#cppname: HOM_SceneViewer::showsNodeToolbarAtTop #status: ni ::`setShowNodeToolbarAtTop
(self, on)`: #cppname: HOM_SceneViewer::setShowNodeToolbarAtTop #status: ni ::`showsPathAtTop
(self)`: #cppname: HOM_SceneViewer::showsPathAtTop #status: ni ::`setShowPathAtTop(self, on)`:
#cppname: HOM_SceneViewer::setShowPathAtTop #status: ni ::`showsToolsAtBottom(self)`:

http://www.sidefx.com/docs/houdini10.0/hom/hou/SceneViewer (2 of 3) [12/7/2009 4:33:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/SceneViewer

#cppname: HOM_SceneViewer::showsToolsAtBottom #status: ni ::`setShowToolsAtBottom(self, on)`:


#cppname: HOM_SceneViewer::setShowToolsAtBottom #status: ni ::`showsDisplayToolsAtRight(self)
`: #cppname: HOM_SceneViewer::showsDisplayToolsAtRight #status: ni ::
`setShowDisplayToolsAtRight(self, on)`: #cppname: HOM_SceneViewer::
setShowDisplayToolsAtRight #status: ni ::`showsSelectionToolsAtLeft(self)`: #cppname:
HOM_SceneViewer::showsSelectionToolsAtLeft #status: ni ::`setShowSelectionToolsAtLeft(self, on)`:
#cppname: HOM_SceneViewer::setShowSelectionToolsAtLeft #status: ni ::`setFlipbookOptions(self,
options)`: #cppname: HOM_SceneViewer::setFlipbookOptions #status: ni @replaces - [Cmd:
vieweroption] - [Cmd:viewlayout] - [Cmd:viewls] - [Cmd:viewsnapshot] - [Cmd:viewsnapshotoption]

http://www.sidefx.com/docs/houdini10.0/hom/hou/SceneViewer (3 of 3) [12/7/2009 4:33:24 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Selector

= hou.Selector =
#type: homclass
#cppname: HOM_Selector
#category: Viewer

"""Describes how Houdini should prompt the user to choose geometry in the
viewport when creating a new SOP node instance."""

Use [Hom:hou.SopNodeType#addSelector] to create a selector and add it to


a SOP node type. When the user creates a new instance of a node type in
the viewer, Houdini will invoke all of its selectors sequentially. Each
selector prompts the user to select geometry. When all selectors have
been invoked, Houdini creates the new node and each selector connects
its input nodes and fills in any group parameters on the node to match what
was selected.

@methods

::`nodeType(self)` -> [Hom:hou.NodeType]:


#cppname: HOM_Selector::nodeType
Return the node type that this selector is attached to.

::`destroy(self)`:
#cppname: HOM_Selector::destroy
#replaces: Cmd:omsunbind
Remove this selector from its node type.

See also [Hom:hou.SopNodeType#addSelector].

::`name(self)` -> `str`:


#cppname: HOM_Selector::name
Return the name of this selector. The name is unique within the node type
it is attached to.

::`selectorType(self)` -> `str`:


#cppname: HOM_Selector::selectorType
Return the name of the type of selector to use. Different selectors have
different behaviours. For example "prims" will select only primitives
and is used, for example, by the cookie SOP. "points" will select
only points, and is used by SOPs like the point SOP. "everything"
will select any geometry, and is used for SOPs like "xform" and
"blast".

http://www.sidefx.com/docs/houdini10.0/hom/hou/Selector (1 of 5) [12/7/2009 4:33:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Selector

See [Hom:hou.SopNodeType#selectors] for example code that returns all the


available selector types.

::`prompt(self)` -> `str`:


#cppname: HOM_Selector::prompt
A string to display at the bottom of the viewer to instruct the user
what to select.

::`primitiveTypes(self)` -> `tuple` of [Hom:hou.primType] enum values:


#cppname: HOM_Selector::primitiveTypes
Return a sequence of [Hom:hou.primType] enumeration values to specify what
primitive types are allowed.

Note that if you pass an empty sequence for the `primitive_types` parameter
in [Hom:hou.SopNodeType#addSelector] and then call this method on
the newly-created selector, this method will return a tuple of all
primitive types.

::`groupParmName(self)` -> `str`:


#cppname: HOM_Selector::groupParmName
Return the name of the SOP node parameter containing the group field.
The selector will set this parameter to the string representing the
points, primitives, edges, etc. chosed by the user in the viewer.
It is typically named "group".

::`groupTypeParmName(self)` -> `str`:


#cppname: HOM_Selector::groupTypeParmName
Return the name of the SOP node parameter containing the menu of geometry
types. If the selector can select multiple geometry types (e.g.
points or primitives), it will set this parameter to match the type
of geometry the user chose. The transform SOP, for example, has
a Group Type parameter that tells it how to interpret the string in
the Group parameter. For such selectors, the parameter is typically
named "grouptype". For selectors that do not allow multiple geometry
types, this parameter is usually "".

::`inputIndex(self)` -> `int`:


#cppname: HOM_Selector::inputIndex
Return the index of the input connector on the SOP node where the selector
should wire input SOPs. A cookie SOP, for example, has two input
connectors and one selector for each input connector.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Selector (2 of 5) [12/7/2009 4:33:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Selector

::`inputRequired(self)` -> `bool`:


#cppname: HOM_Selector::inputRequired
Return whether or not this input is required or optional. If the user does
not select any geometry and the input is not required, the selector will
not connect anything to its input connector.

::`allowDragging(self)` -> `bool`:


#cppname: HOM_Selector::allowDragging
Return whether the user is allowed to select the geometry and begin
manipulating the handles with a single mouse click. A transform SOP,
for example, lets you select the geometry and drag it right away.
Dragging the geometry forces the selector to finish immediately,
the selector connects the input and sets the group parameter, and
subsequent mouse movements are passed to the handle which translates
the geometry by changing parameter values.

::`emptyStringSelectsAll(self)` -> `bool`:


#cppname: HOM_Selector::emptyStringSelectsAll
Return whether or not use an empty string in the group parameter if the
user selects all the geometry. If False, Houdini will place an asterisk
(`*`) in the group parameter when the user selects all the geometry. Most
SOPs use an empty string.

::`geometryTypes(self) ->` `tuple` of [Hom:hou.geometryType] enum values:


#cppname: HOM_Selector::geometryTypes
Return a tuple of [Hom:hou.geometryType] enumeration values. This
tuple describes which geometry entities (e.g. points, primitives, edges,
etc.) the selector allows. Note that this list is a property of the
selector type and you cannot specify it when creating a new selector.
Instead, you must choose a selector type with the desired geometry types.

See [Hom:hou.SopNodeType#selectors] for a function that returns a list of


all the selector types. The following function will return the geometry
types for a particular selector type.
{{{
#!python
def geometryTypesForSelectorType(selector_type):
'''Given a selector type name, return the tuple of geometry types it
will select.'''
# First find a node type that uses this selector.
for node_type in hou.sopNodeTypeCategory().nodeTypes().values():
# Skip manager nodes, like shopnets, ropnets, etc.
if not isinstance(node_type, hou.SopNodeType):

http://www.sidefx.com/docs/houdini10.0/hom/hou/Selector (3 of 5) [12/7/2009 4:33:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Selector

continue

for selector in node_type.selectors():


if selector_type == selector.selectorType():
return selector.geometryTypes()

# The selector type name is invalid.


raise hou.OperationFailed("Invalid selector type")
}}}

::`groupTypeParmValues(self)` -> `tuple` of `int`:


#cppname: HOM_Selector::groupTypeParmValues
Return a tuple of indices mapping geometry types to indices on the geometry
type parameter menu.

Whether or not a selector is ordered is a property of the selector type,


and you cannot specify it when creating a new selector. Instead, you must
choose the appropriate selector type. For example, the "everything"
selector can select primitives, primitive groups, points, point groups,
edges, and breakpoints. It sets a group type menu parameter to match the
type of selection, and this menu must have the entries "Guess from Group",
"Breakpoints", "Edges", "Points", and "Primitives". For an "everything"
selector, this method returns (4, 4, 3, 3, 2, 1), mapping the geometry
element types to 0-based entries in the menu. For example, if the user
selects edges, the selector will look up the fifth element (2) and set the
menu parameter to the item at index 2 ("Edges").

The length of the tuple of ints is the same as `len(self.geometryTypes)`.


If this selector is not intended to work with a menu parameter, each
value in the tuple will be -1.

See also [Hom:hou.Selector#geometryTypes].

::`ordered(self)` -> `bool`:


#cppname: HOM_Selector::ordered
Return whether or not this selector preserves the order in which the user
selected the geometry.

For example, the selector is for points and the user clicks on points 1, 0,
and 2, in that order, an ordered selector will set the SOP's group parameter
to `"1 0 2"`, while an unordered selector will set it to `"0-2"`. For
SOPs where the order of the group selector matters, use ordered selectors.

http://www.sidefx.com/docs/houdini10.0/hom/hou/Selector (4 of 5) [12/7/2009 4:33:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/Selector

Whether or not a selector is ordered is a property of the selector type,


and you cannot specify it when creating a new selector. Instead, you must
choose the appropriate selector type. For example, "prims" is an unordered
selector type, but "ordered_prims" is ordered. See
[Hom:hou.Selector#geometryTypes] for a function that can be adapted to
determine if a selector is ordered, and see [Hom:hou.SopNodeType#selectors]
for a function to list all the selector types.

::`componentTypes(self)` -> `tuple` of [Hom:hou.componentType] enum values:


#cppname: HOM_Selector::componentTypes
#status: ni

::`geoComponentTypes(self)` -> `tuple` of hou.geoComponentType enum values:


#cppname: HOM_Selector::geoComponentTypes
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/Selector (5 of 5) [12/7/2009 4:33:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/ViewerState

= hou.ViewerState =
#type: homclass
#cppname: HOM_ViewerState
#category: Viewer
#status: nd

@methods

::`categories(self)` -> tuple of NodeTypeCategories:


#cppname: HOM_ViewerState::categories
#status: nd

::`description(self)` -> string:


#cppname: HOM_ViewerState::description
#status: nd

::`icon(self)` -> string:


#cppname: HOM_ViewerState::icon
#status: nd

::`isHidden(self)` -> `bool`:


#cppname: HOM_ViewerState::hidden

Returns whether this state is "hidden". A hidden state has no shelf


tool and is not available on the Tab menu.

::`name(self)` -> string:


#cppname: HOM_ViewerState::name
#status: nd

::`nodeType(self)` -> NodeType:


#cppname: HOM_ViewerState::nodeType
#status: nd

http://www.sidefx.com/docs/houdini10.0/hom/hou/ViewerState [12/7/2009 4:33:26 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/componentType

= hou.componentType =
#type: hommodule
#cppname: HOM_componentType
#category: Viewer
#status: ni

"""Enumeration of component types."""

* hou.componentType.Point
* hou.componentType.Primitive
* hou.componentType.Edge
* hou.componentType.Vertex
* hou.componentType.Breakpoint

http://www.sidefx.com/docs/houdini10.0/hom/hou/componentType [12/7/2009 4:33:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/connectivityType

= hou.connectivityType =
#type: hommodule
#cppname: HOM_connectivityType
#category: Viewer
#status: nd

"""Enumeration of connectivity types."""

* hou.connectivityType.NoConnectivity
* hou.connectivityType.Texture
* hou.connectivityType.Position

http://www.sidefx.com/docs/houdini10.0/hom/hou/connectivityType [12/7/2009 4:33:27 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/forceViewportUpdate

= hou.forceViewportUpdate =

#type: homfunction
#cppname: hom::forceViewportUpdate
#category: Viewer
#status: ni

@usage
`forceViewportUpdate()`

@replaces
- [Cmd:viewupdate]

http://www.sidefx.com/docs/houdini10.0/hom/hou/forceViewportUpdate [12/7/2009 4:33:28 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/geometryViewportType

= hou.geometryViewportType =
#type: hommodule
#cppname: HOM_geometryViewportType
#category: Viewer
#status: nd

"""Enumeration of scene viewer viewport types."""

* hou.geometryViewportType.Perspective
* hou.geometryViewportType.Top
* hou.geometryViewportType.Bottom
* hou.geometryViewportType.Front
* hou.geometryViewportType.Back
* hou.geometryViewportType.Right
* hou.geometryViewportType.Left
* hou.geometryViewportType.UV

http://www.sidefx.com/docs/houdini10.0/hom/hou/geometryViewportType [12/7/2009 4:33:28 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/handleBindings

= hou.handleBindings =
#type: hommodule
#cppname: HOM_handleBindings
#category: Viewer
#status: ni

@functions

::`clear()`:
#cppname: HOM_handleBindings::clear
#status: ni

::`create(name, handle_type, node_type)` -> HandleBinding:


#cppname: HOM_handleBindings::create
#status: ni

::`findByHandleType(handle_type)` -> tuple of HandleBindings:


#cppname: HOM_handleBindings::findByHandleType
#status: ni

::`findByNodeType(node_type)` -> tuple of HandleBindings:


#cppname: HOM_handleBindings::findByNodeType
#status: ni

::`findByTypes(handle_type, node_type)` -> tuple of HandleBindings:


#cppname: HOM_handleBindings::findByTypes
#status: ni

::`findHandleType(name)` -> HandleType or None:


#cppname: HOM_handleBindings::findHandleType
#status: ni

::`findyName(node_type, name)` -> HandleBinding or None:


#cppname: HOM_handleBindings::findyName
#status: ni

::`handleTypes(node_type_category=SopNodeTypes())` -> tuple of HandleTypes:


#cppname: HOM_handleBindings::handleTypes
#status: ni

::`mergeFromFile(bindings_file_name)`:
#cppname: HOM_handleBindings::mergeFromFile

http://www.sidefx.com/docs/houdini10.0/hom/hou/handleBindings (1 of 2) [12/7/2009 4:33:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/handleBindings

#status: ni

::`save(bindings_file_name)`:
#cppname: HOM_handleBindings::save
#status: ni

@replaces

- [Cmd:ombind]
- [Cmd:ombindinfo]
- [Cmd:omls]
- [Cmd:omwhere]
- [Cmd:omwrite]

http://www.sidefx.com/docs/houdini10.0/hom/hou/handleBindings (2 of 2) [12/7/2009 4:33:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/persistentHandles

= hou.persistentHandles =
#type: hommodule
#cppname: HOM_persistentHandles
#category: Viewer
#status: ni

@functions

::`createGroup(name)` -> [Hom:hou.PersistentHandleGroup]:


#cppname: HOM_persistentHandles::createGroup
#status: ni

::`createHandle(name, visible=True)` -> PersistentHandle:


#cppname: HOM_persistentHandles::createHandle
#status: ni

::`groups()` -> tuple of PersistentHandleGroups:


#cppname: HOM_persistentHandles::groups
#status: ni

::`handles()` -> tuple of PersistentHandles:


#cppname: HOM_persistentHandles::handles
#status: ni

@replaces

- [Cmd:pomadd]
- [Cmd:pomls]

http://www.sidefx.com/docs/houdini10.0/hom/hou/persistentHandles [12/7/2009 4:33:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/positionType

= hou.positionType =
#type: hommodule
#cppname: HOM_positionType
#category: Viewer
#status: nd

"""Enumeration of spaces."""

* hou.positionType.WorldSpace
* hou.positionType.ViewportXY
* hou.positionType.ViewportUV

http://www.sidefx.com/docs/houdini10.0/hom/hou/positionType [12/7/2009 4:33:29 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/selectorBindings

= hou.selectorBindings =
#type: hommodule
#cppname: HOM_selectorBindings
#category: Viewer
#status: ni

@functions

::`create(name, selector_type, node_type, prompt='', node_parm_name='group', node_input_index=0, is_input_required=True, allowed_prim_types=[...all...], allow_dragging_to_select=False, use_star_to_select_all=False)` -> SelectorBinding:
#cppname: HOM_selectorBindings::create
#status: ni

::`findByNodeType(node_type)` -> tuple of SelectorBindings:


#cppname: HOM_selectorBindings::findByNodeType
#status: ni

::`findBySelectorType(selector_type)` -> tuple of SelectorBindings:


#cppname: HOM_selectorBindings::findBySelectorType
#status: ni

::`findByTypes(selector_type, node_type)` -> tuple of SelectorBindings:


#cppname: HOM_selectorBindings::findByTypes
#status: ni

::`findSelectorType(name)` -> SelectorType or None:


#cppname: HOM_selectorBindings::findSelectorType
#status: ni

::`selectorTypes(node_type_category=SopNodeTypes())` -> tuple of SelectorTypes:


#cppname: HOM_selectorBindings::selectorTypes
#status: ni

@replaces

- [Cmd:omsbind]
- [Cmd:omsbindinfo]
- [Cmd:omsls]
- [Cmd:omswhere]

http://www.sidefx.com/docs/houdini10.0/hom/hou/selectorBindings [12/7/2009 4:33:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/setViewportUpdateMode

= hou.setViewportUpdateMode =

#type: homfunction
#cppname: hom::setViewportUpdateMode
#category: Viewer
#status: ni

@usage
`setViewportUpdateMode(mode)`

@replaces
- [Cmd:viewupdate]

http://www.sidefx.com/docs/houdini10.0/hom/hou/setViewportUpdateMode [12/7/2009 4:33:30 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/shadingMode

= hou.shadingMode =
#type: hommodule
#cppname: HOM_shadingMode
#category: Viewer
#status: ni

"""Enumeration of viewer shading modes."""

* hou.shadingMode.WireBoundingBox
* hou.shadingMode.ShadedBoundingBox
* hou.shadingMode.Wireframe
* hou.shadingMode.HiddenLineInvisible
* hou.shadingMode.HiddenLineGhost
* hou.shadingMode.FlatShaded
* hou.shadingMode.FlatWireShaded
* hou.shadingMode.SmoothShaded
* hou.shadingMode.SmoothWireShaded
* hou.shadingMode.VexShaded
* hou.shadingMode.VexWireShaded

http://www.sidefx.com/docs/houdini10.0/hom/hou/shadingMode [12/7/2009 4:33:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/viewportUpdateMode

= hou.viewportUpdateMode =

#type: homfunction
#cppname: hom::viewportUpdateMode
#category: Viewer
#status: ni

@usage
`viewportUpdateMode()`

@replaces
- [Cmd:viewupdate]

http://www.sidefx.com/docs/houdini10.0/hom/hou/viewportUpdateMode [12/7/2009 4:33:31 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/snappingMode

= snappingMode =
#type: hommodule
#cppname: HOM_snappingMode
#category: Viewer

"""Enumeration of snapping modes."""

* hou.snappingMode.Off
* hou.snappingMode.Grid
* hou.snappingMode.Prim
* hou.snappingMode.Point
* hou.snappingMode.Multi

See [Hom:hou.SceneViewer#snappingMode].

http://www.sidefx.com/docs/houdini10.0/hom/hou/snappingMode [12/7/2009 4:33:32 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandleGroup

= hou.PersistentHandleGroup =
#type: homclass
#cppname: HOM_PersistentHandleGroup
#status: ni

@methods

::`add(self, persistent_handle)`:
#cppname: HOM_PersistentHandleGroup::add
#status: ni

::`asCode(self)`:
#cppname: HOM_PersistentHandleGroup::asCode
#status: ni

::`clear(self)`:
#cppname: HOM_PersistentHandleGroup::clear
#status: ni

::`destroy(self)`:
#cppname: HOM_PersistentHandleGroup::destroy
#status: ni

::`handles(self)` -> tuple of PersistentHandles:


#cppname: HOM_PersistentHandleGroup::handles
#status: ni

::`isVisible(self, on)`:
#cppname: HOM_PersistentHandleGroup::isVisible
#status: ni

::`name(self)`:
#cppname: HOM_PersistentHandleGroup::name
#status: ni

::`remove(self, persistent_handle)`:
#cppname: HOM_PersistentHandleGroup::remove
#status: ni

::`setIsVisible(self, on)`:
#cppname: HOM_PersistentHandleGroup::setIsVisible
#status: ni

http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandleGroup (1 of 2) [12/7/2009 4:33:32 PM]


http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandleGroup

::`setName(self, name)`:
#cppname: HOM_PersistentHandleGroup::setName
#status: ni

@replaces

- [Cmd:pomattach]
- [Cmd:pomclear]
- [Cmd:pomdetach]
- [Cmd:pomls]
- [Cmd:pomremove]
- [Cmd:pomrename]
- [Cmd:pomscript]
- [Cmd:pomset]

http://www.sidefx.com/docs/houdini10.0/hom/hou/PersistentHandleGroup (2 of 2) [12/7/2009 4:33:32 PM]

You might also like