Professional Documents
Culture Documents
Houdini
10
Search
Overview
application
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
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
Subtopics
Text Clear
Getting started
Learning Python
HOM introduction
Next steps
HOM Cookbook
Guru level
Command-Line Scripting
rpc
Reference
hou
Module containing all the sub-modules, classes, and functions to access Houdini.
= Learning Python =
== Quick start ==
{{{
#!pycon
>>> 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
{{{
#!pycon
>>> 2 + 2
4
>>> 0.03 * 25.1
0.753
>>> min(hou.frame(), 7) * 3
3.0
}}}
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.
{{{
#!python
== 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.
>>> 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>
>>> 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
>>> t.eval()
(1.0, 2.0, 3.0)
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()`.
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
[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
- 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.
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).
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(
}}}
{{{
>>> hou.node('/obj').parm(
}}}
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.
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.
Search
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_files.tar.gz.
Subtopics
Text Clear
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.
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()`.
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.
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
NOTE:
Note that `kwargs['type']` is also available in the PythonModule section.
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.
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.
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.
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.
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".
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()`.
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.
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()!"
}}}
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('/')
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.
- 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.
{{{
#!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.
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>
}}}
= Command-Line Scripting =
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
try:
import hou
except ImportError:
# Add $HFS/houdini/scripts/python to sys.path so Python can find the
# hou module.
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.
input.
{{{
#!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
}}}
You can control the default expression language for newly created nodes
with a preference in Houdini's main preference dialog.
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.
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.
TIP:
TIP:
You can also access the Python expression namespace from the global
namespace with [Hom:hou.expressionGlobals].
== 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].
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.
Search
HOM hou
Module containing all the sub-modules, classes, and functions to
access Houdini.
Subtopics
Assets
hou.HDADefinition
hou.HDAModule
User-defined Python module containing functions, classes, and constants that are stored with
hou.HDAOptions
hou.HDASection
hou.hda
hou.hdaLicenseType
Channels
hou.ChannelDopesheet
hou.ChannelEditorPane
hou.ChannelGraphEditor
hou.ChannelList
hou.ChannelListPane
hou.ChopNode
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.
hou.commitPendingKeyframes
hou.constant
Evaluate an animation function for an animated parameter. The return value is always the
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.
hou.easein
Interpolates between the left keyframe’s outgoing value and the right keyframe’s incoming
value.
hou.easeinp
hou.easeout
Interpolates between the left keyframe’s outgoing value and the right keyframe’s incoming
value.
hou.easeoutp
hou.easep
hou.linear
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
hou.qlinear
hou.quintic
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
hou.repeatt
hou.spline
hou.vmatch
hou.vmatchin
hou.vmatchout
Cooking
hou.performance
hou.recookNodesIfReferencedFilesChanged
hou.setHighlightNodesWhenCooking
hou.showCookStatisticsInNodeInfo
Dynamics
hou.DopData
hou.DopDataType
hou.DopNetNode
hou.DopNode
hou.DopObject
hou.DopObjectGroup
hou.DopRecord
hou.DopRelationship
A type of DOP data that stores which DOP objects affect one another.
hou.DopSimulation
hou.currentDopNet
hou.dop
hou.dopDataTypes
hou.fieldType
hou.setCurrentDopNet
hou.setSimulationEnabled
hou.simulationEnabled
Exceptions
hou.Error
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.
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
hou.OperationFailed
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
hou.Preference
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
hou.almostEqual
Compares two numbers and returns True if they are almost equal in terms of how far apart
hou.appendSessionModuleSource
Appends the given source code to the hou.session module. The appended code is made
hou.applicationCompilationDate
hou.applicationName
hou.applicationVersion
minor_version, build_version).
hou.applicationVersionString
hou.audio
hou.cache
hou.convertToNewKinematics
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
hou.hipFile
hou.hmath
hou.isApprentice
otherwise.
hou.operatingSystem
hou.releaseLicense
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
hou.setSessionModuleSource
Sets the contents of the hou.session module. The new contents is made available
hou.variable
hou.variables
Geometry
attribData
hou.Attrib
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
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
hou.PrimGroup
hou.Quadric
hou.SopCacheWatermark
hou.SopNode
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
hou.Vertex
Existing inside a Geometry object, a Vertex object is contained in exactly one Prim, and
A Volume is a kind geometry primitive (Prim object) storing a three dimensional array of
voxels.
hou.attribType
hou.geometryType
hou.primType
IO
hou.FileType
hou.fileReferences
hou.findDirectories
Search the houdini path for the specified directory, returning a tuple of all the matches. The
hou.findDirectory
Search the houdini path for a specified directory, returning the first match found. The
hou.findFile
Search the houdini path for a specified file, returning the first match found. The filename
hou.findFiles
Search the houdini path for the specified file, returning a tuple of all the matches. The
hou.homeHoudiniDirectory
hou.houdiniPath
hou.knownFileTypes
hou.readFile
Read a file, returning the contents in a string. Supports regular files, opdef: and oplib: paths,
Images
hou.CompositorViewer
hou.CopNode
hou.HistogramViewer
hou.ImageTimelineViewer
hou.ImageViewer
hou.ModalImageViewer
hou.Mplay
hou.pixelColorInFileByUV
Keyframes
hou.BaseKeyframe
hou.Keyframe
hou.StringKeyframe
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
hou.galleries
hou.shaderType
Node Organization
hou.NetworkBox
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
hou.addNodeBundle
hou.nodeBundle
Given a node bundle name, return the corresponding NodeBundle object, or None if there is
hou.nodeBundles
Return a tuple containing all the node bundles in the current session.
hou.nodeTypeFilter
hou.selectedNodeBundles
Return a tuple containing all the node bundles that are selected in the bundle list pane.
hou.NodeTypeCategory
Represents a category of node types, such as surface nodes (SOPs) or particle nodes (POPs).
hou.ShopNodeTypeCategory
hou.chopNetNodeTypeCategory
Return the NodeTypeCategory instance for Houdini channel container (chopnet) nodes.
hou.chopNodeTypeCategory
hou.cop2NetNodeTypeCategory
Return the NodeTypeCategory instance for Houdini composite container (copnet) nodes.
hou.cop2NodeTypeCategory
hou.dopNodeTypeCategory
hou.managerNodeTypeCategory
Return the NodeTypeCategory instance for Houdini manager nodes. The manager nodes are /
hou.nodeTypeCategories
Return a dictionary where the keys are the category names (e.g. “Object”, “Sop”) and the
hou.objNodeTypeCategory
Return the NodeTypeCategory instance for Houdini object nodes. For example, if /obj/model
().
hou.popNetNodeTypeCategory
Return the NodeTypeCategory instance for Houdini particle container (popnet) nodes.
hou.popNodeTypeCategory
hou.rootNodeTypeCategory
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
hou.shopNodeTypeCategory
hou.sopNodeTypeCategory
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
hou.Node
The base class for all nodes in Houdini (objects, SOPs, COPs, etc.) An instance of this class
hou.NodeConnection
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
hou.PopNetNode
hou.PopNode
hou.SopNodeType
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
hou.copyNodesToClipboard
hou.currentSimulation
hou.filterNodesByType
hou.layoutNodes
hou.moveNodesTo
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.
hou.nodeTypeSource
hou.pasteNodesFromClipboard
hou.perms
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
hou.selectedNodes
hou.setCurrentSimulation
hou.setPwd
Make the given node Houdini’s current node. This function is equivalent to hou.cd(node.path
()).
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
hou.FloatParmTemplate
hou.FolderSetParmTemplate
hou.IntParmTemplate
hou.LabelParmTemplate
hou.MenuParmTemplate
hou.MultiParmTemplate
hou.ParmTemplate
hou.RampParmTemplate
hou.SeparatorParmTemplate
Template for a separator parameter. Separators are just lines between parameters.
hou.StringParmTemplate
hou.ToggleParmTemplate
hou.parmData
hou.parmLook
hou.parmNamingScheme
hou.parmTemplateType
hou.stringParmType
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.
hou.ch
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
hou.fileType
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
hou.scriptLanguage
hou.topLevelParmGroup
hou.updateMode
Rendering
hou.ActiveRender
hou.RenderMachineVariable
hou.RopNode
hou.activeRenders
hou.renderMachineVariables
hou.renderMethod
Scripting
hou.ShellIO
hou.Textport
hou.TextportPane
hou._addPreloadIcon
hou._getArgumentAutoComplete
This function is used internally by the Houdini Python shell for argument auto-completion on
hou.endListeningOnPort
hou.exitScript
hou.expandString
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
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
hou.hscriptExpandString
hou.hscriptExpression
hou.hscriptFloatExpression
hou.hscriptMatrixExpression
hou.hscriptStringExpression
hou.hscriptVectorExpression
hou.listenOnPortAndBlockUntilClosed
hou.runJava
hou.runTcl
hou.runTclTk
hou.startListeningOnPort
hou.stopNonDaemonJavaProcesses
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
hou.shelves
Takes
hou.Take
hou.takes
Timeline
hou.TimeGroup
hou.addTimeGroup
hou.decrementFrame
hou.findTimeGroup
hou.fps
hou.frame
Return the playbar’s current frame. Note that Houdini can be on a fractional frame if
hou.frameToTime
hou.frameToTimecode
hou.globalFrameRange()
hou.goToFirstFrame
hou.goToLastFrame
hou.goToNextKeyframe
hou.goToPreviousKeyframe
hou.incrementFrame
hou.intFrame
hou.playbar
hou.setFps
hou.setFrame
Set the playbar’s current frame. Note that the frame may be a fractional value.
hou.setGlobalFrameRange
hou.setPlaybackFrameRange
hou.setTime
hou.time
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
hou.Desktop
hou.FloatingPanel
hou.HandleListPane
hou.HelpBrowser
Class representing a help browser pane tab. Provides methods for controlling the help
browser.
hou.IPRViewer
hou.LightLinkerPane
hou.NetworkEditor
hou.NetworkGraph
hou.NetworkList
hou.Pane
A rectangular area of the desktop that contains one or more pane tabs.
hou.PaneTab
hou.ParmPane
hou.ParmSpreadsheetPane
hou.PathBasedPaneTab
hou.TakeListPane
hou.fileChooserMode
hou.isUIAvailable
hou.paneLinkType
hou.paneTabType
hou.reloadChannelGroupMenuFile
hou.reloadNodeMenuFile
hou.reloadParmMenuFile
hou.severityType
hou.ui
Utility
hou.BoundingBox
hou.Color
hou.Matrix3
hou.Matrix4
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
hou.ShopNodeType
hou.Vector2
hou.Vector3
hou.Vector4
hou.colorType
hou.rampBasis
hou.rampParmType
VEX
hou.VexContext
hou.endVexProfiling
hou.reloadAllScriptAndVexNodeTypes
hou.startVexProfiling
hou.vexContextForNodeTypeCategory
hou.vexContextForShaderType
hou.vexContexts
Viewer
hou.ComponentSelection
hou.ConstructionPlane
hou.ContextViewer
hou.GeometryDisplayToggles
hou.GeometrySelection
hou.GeometryViewport
hou.GeometryViewportSettings
hou.HandleBinding
hou.HandleNodeTypeParmBinding
hou.HandleType
hou.ParticleSelection
hou.ParticleViewer
hou.PersistentHandle
hou.PersistentHandleParmBinding
hou.SceneViewer
hou.Selector
Describes how Houdini should prompt the user to choose geometry in the viewport when
hou.ViewerState
hou.componentType
hou.connectivityType
hou.forceViewportUpdate
hou.geometryViewportType
hou.handleBindings
hou.persistentHandles
hou.positionType
Enumeration of spaces.
hou.selectorBindings
hou.setViewportUpdateMode
hou.shadingMode
hou.viewportUpdateMode
snappingMode
hou.PersistentHandleGroup
Search
Overview
This example illustrates how to retrieve and set transformations on object nodes.
Location
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
Next, let’s package up the logic to unparent a node and keep its position into a function, and we’ll call that
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
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"))
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)
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
# 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)
● hou.ObjNode.setWorldTransform
● hou.Node.setFirstInput
● hou.SceneViewer.selectObjects
Houdini Houdini Object HOM Feed Example: Combining Python’s Powerful Module
10 Model Cookbook Library with Houdini
Search
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
2. Launch part3/feed.hip.
4. Enter the selection tool in the viewer, and click on the text to launch the browser
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
Text Clear
Houdini Houdini Object HOM Print Hip Stats Example: Load a .hip File and Inspect
10 Model Cookbook it
Search
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
#!/usr/bin/python2.5
import sys, os
hou.hipFile.load("file_to_load.hip")
# 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()
● hou.node
● hou.Node.children
● hou.ObjNode.displayNode
● hou.SopNode.geometry
● hou.Geometry.points
● hou.Point.position
● hou.releaseLicense
Houdini Houdini Object HOM Particle Cache Example: Writing Particle Data to a Custom
10 Model Cookbook Format
Search
Overview
This example illustrates how to write out a particle simulation output to a custom file format.
Location
Getting Started
Load particle_cache.hip, start up a Python shell, and run hou.session.writeFireworks() to save the particles in a
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)
● hou.Geometry
● hou.Geometry.pointAttribs
● hou.Attrib
● hou.Attrib.name
● hou.Attrib.dataType
● hou.Attrib.size
● hou.Geometry.points
● hou.Point.attribValue
● hou.node
Houdini Houdini Object HOM Compositing Example: Building a Composite Network from a Compositing
10 Model Cookbook Expression
Search
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
Location
Supporting files for this example are in $HFS/houdini/help/hom/cookbook/composite, also found in the
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.
>>> comp.readFile("default.pic").writeFile("default.jpg")
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.
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:
"""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 __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()))
_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)
return _Image(n)
● hou.CopNode
● hou.Node.createNode
● hou.Node.setFirstInput
● hou.Node.setInput
● hou.Node.parm
● hou.Parm.set
● hou.Node.parmTuple
● hou.ParmTuple.set
● hou.applicationName
● hou.RopNode.render
● hou.hscriptExpression
● res
Search
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
Location
● Load xforms_from_disk.hip and press play. The xforms_from_disk1 object is a Python object that loads its
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.
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
Also note that the PythonModule section contains a function to generate files like motion.dat from an existing
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")
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]
f.write(repr(result))
f.close()
Finally, the reload button callback contains the following Python code:
hou.pwd().hdaModule().reloadFile(hou.pwd())
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.
● hou.Node.evalParm
● hou.Node.hdaModule
● hou.hmath.identityTransform
● hou.frame
● hou.setFrame
● hou.Matrix4
● hou.ObjNode.worldTransform
● hou.ObjNode.setCookTransform
Search
Overview
This example defines a Python SOP that copies its input, creates a Cd (diffuse color) point attribute, and assigns
Location
● 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
● The color falloff Python SOP is stored in . Right-click on the color_falloff1 SOP and bring up the Type
Properties dialog.
● 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)
# 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())
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.
● 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
Search
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
● Load surface_wires.hip.
● The Surface Wires Python SOP is stored in . Right-click on the surface_wires1 SOP and bring up the
● 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()
# 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())
Note that if you want to create your own Python SOP, you can do so by selecting File → New Operator Type
● 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
● hou.Surface.attribValueAt
● hou.Geometry.createPoint
● hou.Point.setPosition
● hou.Point.setAttributeValue
● hou.Geometry.createPolygon
● hou.Geometry.addVertex
Houdini Houdini Object HOM Bundles Example: Extending the hou Module by Wrapping
10 Model Cookbook Hscript
Search
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
Location
Sample Usage
Create a sphere and torus from the shelf. Houdini will create /obj/sphere_object1 and /obj/torus_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.
Subtopics
Text Clear
Search
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
Location
Supporting files for this example are in $HFS/houdini/help/hom/cookbook/paths, also found in the
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.
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 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)
# 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)
net.layoutChildren()
● hou.ObjNode.displayNode
● hou.SopNode.geometry
● hou.Geometry.iterPoints
● hou.Point.position
● hou.Vector3
● hou.hscriptExpression
● 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
Houdini Houdini Object HOM PyQt Example: Writing Custom GUIs inside
10 Model Cookbook Houdini
Search
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
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
● Part 2: Running PyQt inside a separate thread (provided for reference purposes)
Subtopics
Text Clear
Houdini Houdini Object HOM wxPython Example: Writing Custom GUIs inside
10 Model Cookbook Houdini
Search
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
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):
# 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())
# 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)
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)
= hou.HDADefinition =
#type: homclass
#cppname: HOM_HDADefinition
#category: Assets
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.
@methods
#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.
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"`.
::`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.
{{{
#!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()
}}}
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.
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].
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
{{{
#!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
}}}
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.
{{{
#!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.
::`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.
::`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.
::`setVersion(self, version)`:
#cppname: HOM_NodeType::setVersion
#replaces: Cmd:otversion
Set the user-defined version string. See [Hom:hou.HDADefinition#version]
for more information.
::`setComment(self, comment)`:
#cppname: HOM_NodeType::setComment
#replaces: Cmd:otcomment
Set the user-defined comment. See [Hom:hou.HDADefinition#comment]
for more information.
::`setIcon(self, icon)`:
#cppname: HOM_HDADefinition::setIcon
Set the icon for this definition's node type. See
[Hom:hou.HDADefinition#icon] for more information.
{{{
#!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
Set the modification time for the definition to the given POSIX timestamp.
If the time parameter is negative, uses the current time.
Embedded help typically comes from the __Help__ tab of the operator
type properties window, but it may also come from a dialog script.
::`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.
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.
::`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.
::`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].
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,
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.
::`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"`.
parm_template:
An instance of a [Hom:hou.ParmTemplate] subclass that describes the
parameter.
in_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].
::`removeParmTuple(self, name)`:
#cppname: HOM_HDADefinition::removeParmTuple
Remove a parameter tuple from this node type's parameters.
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()
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].
= hou.HDAModule =
#type: homclass
#cppname: HOM_HDAModule
#category: Assets
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.
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:
{{{
#!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
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()`.
= hou.HDAOptions =
#type: homclass
#cppname: HOM_HDAOptions
#category: Assets
{{{
#!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;
PrefixDroppedParmName := 1;
UseDSParms := 1;
ForbidOutsideParms := 1;
LockContents := 1;
SaveSpareParms := 1; # <-- Now 1
CheckExternal := 1;
GzipContents := 1;
MakeDefault := 1;
PrefixDroppedParmLabel := 1;
UnlockOnCreate := 0;
}}}
@methods
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.
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.
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.
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.
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.
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.
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.
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.
When this option is set, most properties and parameters of the operator
come from pragma statements in the VEX source code.
::`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.
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.
::`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.
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.
::`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.
= hou.HDASection =
#type: homclass
#cppname: HOM_HDASection
#category: Assets
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.
@methods
{{{
#!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()
}}}
::`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.
::`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.
{{{
#!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'
}}}
= hou.hda =
#type: hommodule
#cppname: HOM_hda
#category: Assets
@functions
{{{
#!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
}}}
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
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.
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")
}}}
`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.
::`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.
::`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`.
::`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.
::`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
= hou.hdaLicenseType =
#type: hommodule
#cppname: HOM_hdaLicenseType
#category: Assets
Enumeration values:
* Execute
* Read
* Full
= 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]
= hou.ChannelEditorPane =
#type: homclass
#cppname: HOM_ChannelEditorPane
#superclass: hou.Pane
#category: Channels
#status: ni
@methods
::`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]
= hou.ChannelGraphEditor =
#type: homclass
#cppname: HOM_ChannelGraphEditor
#category: Channels
#status: ni
@methods
::`setGridDetailLevel(self, level)`:
#cppname: HOM_ChannelGraphEditor::setGridDetailLevel
#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
#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
::`showValueHandle(self, on)`:
#cppname: HOM_ChannelGraphEditor::showValueHandle
#status: ni
@replaces
- [Cmd:chaneditor]
= 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
::`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]
= hou.ChannelListPane =
#type: homclass
#cppname: HOM_ChannelListPane
#superclass: hou.Pane
#category: Channels
#status: ni
@methods
= hou.ChopNode =
#type: homclass
#cppname: HOM_ChopNode
#superclass: hou.Node
#category: Channels
@methods
::`bypass(self, on)`:
#cppname: HOM_ChopNode::bypass
Turn the node's bypass flag on or off, making this node have no effect.
::`evaluateInputAtEnd(self, chop_input_node)`:
#cppname: HOM_ChopNode::evaluateInputAtEnd
#status: ni
::`frameToSamples(self, frame)`:
#cppname: HOM_ChopNode::frameToSamples
#status: ni
::`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)`:
#cppname: HOM_ChopNode::saveClip
#status: ni
::`setAudioFlag(self, on)`:
#cppname: HOM_ChopNode::setAudioFlag
::`setDisplayFlag(self, on)`:
#cppname: HOM_ChopNode::setDisplayFlag
::`setExportFlag(self, on)`:
#cppname: HOM_ChopNode::setExportFlag
::`setUnloadFlag(self, on)`:
#cppname: HOM_ChopNode::setUnloadFlag
::`startSample(self)`:
#cppname: HOM_ChopNode::startSample
#status: ni
::`timeToSamples(self, time)`:
#cppname: HOM_ChopNode::timeToSamples
#status: ni
@replaces
- [Cmd:chopls]
- [Cmd:opget]
- [Cmd:opsave]
- [Cmd:opset]
- [Exp:chop]
- [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]
= 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
::`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
::`setHorzontalAdapt(self, on)`:
#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
::`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]
= hou.Track =
#type: homclass
#cppname: HOM_Track
#category: Channels
@methods
#cppname: HOM_Track::name
Returns the name of this track (each track in a CHOP has a unique name).
@replaces
- [Exp:chop]
- [Exp:chopcf]
- [Exp:chopci]
- [Exp:chopct]
- [Exp:chopf]
- [Exp:chopi]
- [Exp:chopl]
- [Exp:chopstr]
- [Exp:chopt]
= hou.bezier =
#type: homfunction
#cppname: hom::bezier
#category: Channels
@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.
@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]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:bezier]
= hou.commitPendingKeyframes =
#type: homfunction
#cppname: hom::commitPendingKeyframes
#category: Channels
@usage
`commitPendingKeyframes()`
= hou.constant =
#type: homfunction
#cppname: hom::constant
#category: Channels
@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.
@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]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:constant]
= 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.
@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]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:cubic]
= hou.cycle =
#type: homfunction
#cppname: hom::cycle
#category: Channels
@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 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.
@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]
- [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]
= hou.cyclet =
#type: homfunction
#cppname: hom::cyclet
#category: Channels
@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 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.
@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]
- [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]
= 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
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.
@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]
- [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]
= 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
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.
@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]
- [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]
= hou.easeinp =
#type: homfunction
#cppname: hom::easeinp
#category: Channels
"""Interpolates
between the values of two keyframes."""
@usage
`easeinp(ease_speed)` -> 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.
@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]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:easeinp]
= 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
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.
@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]
- [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]
= hou.easeoutp =
#type: homfunction
#cppname: hom::easeoutp
#category: Channels
"""Interpolates
between the values of two keyframes."""
@usage
`easeoutp(ease_speed)` -> 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.
@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]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:easeoutp]
= hou.easep =
#type: homfunction
#cppname: hom::easep
#category: Channels
"""Interpolates
between the values of two keyframes."""
@usage
`easep(ease_bias)` -> 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.
@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]
- [Hom:hou.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:easep]
= 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.
@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]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:linear]
= 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.
@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]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:match]
= 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.
@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]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:matchin]
= 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.
@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]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:matchout]
= 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().
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.
@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.quintic]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:qlinear]
= hou.quintic =
#type: homfunction
#cppname: hom::quintic
#category: Channels
@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.
@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]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:quintic]
= hou.repeat =
#type: homfunction
#cppname: hom::repeat
#category: Channels
@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 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.
@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]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:repeat]
= hou.repeatt =
#type: homfunction
#cppname: hom::repeatt
#category: Channels
@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 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.
@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]
- [Hom:hou.repeat]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:repeatt]
= hou.spline =
#type: homfunction
#cppname: hom::spline
#category: Channels
@usage
`spline()` -> 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.
@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]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:spline]
= hou.vmatch =
#type: homfunction
#cppname: hom::vmatch
#category: Channels
@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.
@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]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatchin]
- [Hom:hou.vmatchout]
@replaces
- [Exp:vmatch]
= hou.vmatchin =
#type: homfunction
#cppname: hom::vmatchin
#category: Channels
@usage
`vmatchin()` -> 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.
@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]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchout]
@replaces
- [Exp:vmatchin]
= hou.vmatchout =
#type: homfunction
#cppname: hom::vmatchout
#category: Channels
@usage
`vmatchout()` -> 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.
@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]
- [Hom:hou.repeat]
- [Hom:hou.repeatt]
- [Hom:hou.spline]
- [Hom:hou.vmatch]
- [Hom:hou.vmatchin]
@replaces
- [Exp:vmatchout]
= 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
- [Cmd:performance]
= hou.recookNodesIfReferencedFilesChanged =
#type: homfunction
#cppname: hom::recookNodesIfReferencedFilesChanged
#category: Cooking
#status: ni
@usage
`recookNodesIfReferencedFilesChanged()`
@replaces
- [Cmd:opupdate]
= hou.setHighlightNodesWhenCooking =
#type: homfunction
#cppname: hom::setHighlightNodesWhenCooking
#category: Cooking
#status: ni
@usage
`setHighlightNodesWhenCooking(on)`
@replaces
- [Cmd:performance]
= hou.showCookStatisticsInNodeInfo =
#type: homfunction
#cppname: hom::showCookStatisticsInNodeInfo
#category: Cooking
#status: ni
@usage
`showCookStatisticsInNodeInfo(on)`
@replaces
- [Cmd:performance]
= hou.DopData =
#type: homclass
#cppname: HOM_DopData
#category: Dynamics
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
{{{
#!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'
>>> 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]>
}}}
{{{
#!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']
}}}
{{{
#!pycon
>>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0]
>>> obj.dataType()
'SIM_Object'
}}}
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'
}}}
{{{
#!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.
`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.
`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.
::`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.
::`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.
DOP.
= hou.DopDataType =
#type: homclass
#cppname: HOM_DopDataType
#category: Dynamics
#status: ni
@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'
}}}
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.
`max_num`:
`child_name`:
If not `None`, the subdata must have this name when added as a child.
If `None`, there are no name restrictions.
::`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.
= hou.DopNetNode =
#type: homclass
#cppname: HOM_DopNetNode
#superclass: hou.Node
#category: Dynamics
The DOP nodes inside this network add an modify the DOP data that contains
a single simulation.
@methods
= hou.DopNode =
#type: homclass
#cppname: HOM_DopNode
#superclass: hou.Node
#category: Dynamics
@methods
::`setDisplayFlag(self, on)`:
#cppname: HOM_DopNode::setDisplayFlag
#replaces: Cmd:opset
::`bypass(self, on)`:
#cppname: HOM_DopNode::bypass
Turn the node's bypass flag on or off, making this node have no effect.
= hou.DopObject =
#type: homclass
#cppname: HOM_DopObject
#superclass: hou.DopData
#category: Dynamics
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
{{{
#!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
}}}
::`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.
`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.
= hou.DopObjectGroup =
#type: homclass
#cppname: HOM_DopObjectGroup
#category: Dynamics
#status: ni
@methods
::`name(self)`:
#cppname: HOM_DopObjectGroup::name
#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
= hou.DopRecord =
#type: homclass
#cppname: HOM_DopRecord
#category: Dynamics
@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
}}}
}}}
::`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].
::`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.
= 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."""
@methods
= hou.DopSimulation =
#type: homclass
#cppname: HOM_DopSimulation
#category: Dynamics
@methods
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.
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())
}}}
#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].
{{{
#!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']
}}}
{{{
#!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']
}}}
::`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.
::`globalTimeToSimTime(self, global_time)`:
#cppname: HOM_DopSimulation::globalTimeToSimTime
#replaces: Exp:dopttost
#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.
= hou.currentDopNet =
#type: homfunction
#cppname: hom::currentDopNet
#category: Dynamics
#status: nd
@usage
`currentDopNet()` -> DopNetNode
= hou.dop =
#type: hommodule
#cppname: HOM_dop
#category: Dynamics
@functions
{{{
#!pycon
>>> hou.dop.findDataType("SIM_Geometry")
<hou.DopDataType SIM_Geometry>
}}}
= hou.dopDataTypes =
#type: homfunction
#cppname: hom::dopDataTypes
#category: Dynamics
#status: ni
@usage
`dopDataTypes()` -> tuple of DopDataTypes
= hou.fieldType =
#type: hommodule
#cppname: HOM_fieldType
#category: Dynamics
#status: nd
* 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
= hou.setCurrentDopNet =
#type: homfunction
#cppname: hom::setCurrentDopNet
#category: Dynamics
#status: nd
@usage
`setCurrentDopNet(dopnet)`
= hou.setSimulationEnabled =
#type: homfunction
#cppname: hom::setSimulationEnabled
#category: Dynamics
#status: nd
@usage
`setSimulationEnabled(enabled)`
= hou.simulationEnabled =
#type: homfunction
#cppname: hom::simulationEnabled
#category: Dynamics
#status: nd
@usage
`simulationEnabled()` -> bool
= hou.Error =
#type: homclass
#cppname: HOM_Error
#category: Exceptions
@methods
You can also use `str(e.__class__)` to get the name of the subclass.
= 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."""
= hou.InitScriptFailed =
#type: homclass
#cppname: HOM_InitScriptFailed
#superclass: hou.Error
#category: Exceptions
#status: nd
= 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."""
= 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.
= 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."""
= hou.KeyframeValueNotSet =
#type: homclass
#cppname: HOM_KeyframeValueNotSet
#superclass: hou.Error
#category: Exceptions
#status: nd
= hou.LoadWarning =
#type: homclass
#cppname: HOM_LoadWarning
#superclass: hou.Error
#category: Exceptions
= hou.MatchDefinitionError =
#type: homclass
#cppname: HOM_MatchDefinitionError
#superclass: hou.Error
#category: Exceptions
#status: nd
= hou.NotAvailable =
#type: homclass
#superclass: hou.Error
#cppname: HOM_NotAvailable
#category: Exceptions
@related
- [Hom:hou.Error]
= 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]. """
@related
- [Hom:hou.Error]
= hou.OperationFailed =
#type: homclass
#cppname: HOM_OperationFailed
#superclass: hou.Error
#category: Exceptions
#status: nd
= hou.OperationInterrupted =
#type: homclass
#cppname: HOM_OperationInterrupted
#superclass: hou.Error
#category: Exceptions
#status: nd
= hou.PermissionError =
#type: homclass
#cppname: HOM_PermissionError
#superclass: hou.Error
#category: Exceptions
#status: nd
= hou.SystemExit =
#type: homclass
#cppname: HOM_SystemExit
#superclass: hou.Error
#category: Exceptions
#status: nd
@methods
= hou.TypeError =
#type: homclass
#cppname: HOM_TypeError
#superclass: hou.Error
#category: Exceptions
#status: nd
= hou.ValueError =
#type: homclass
#cppname: HOM_ValueError
#superclass: hou.Error
#category: Exceptions
#status: nd
= 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
= 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
= hou.Value =
#type: homclass
#cppname: HOM_Value
#category: General
#status: ni
@methods
::`addChangeCallback(self, callback)`:
#cppname: HOM_Value::addChangeCallback
#status: ni
::`set(self, value)`:
#cppname: HOM_Value::set
#status: ni
::`value(self)`:
#cppname: HOM_Value::value
#status: ni
@replaces
- [Exp:param]
- [Cmd:varchange]
= hou.Variable =
#type: homclass
#cppname: HOM_Variable
#superclass: hou.Value
#category: General
#status: ni
@methods
::`name(self)`:
#cppname: HOM_Variable::name
#status: ni
= hou._isExiting =
#type: homfunction
#cppname: hom::_isExiting
#category: General
@usage
`_isExiting()` -> `bool`
@related
- [Hom:hou.exit]
= 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
= 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)`
@related
- [Hom:hou.session]
- [Hom:hou.sessionModuleSource]
- [Hom:hou.setSessionModuleSource]
= hou.applicationCompilationDate =
#type: homfunction
#cppname: hom::applicationCompilationDate
#category: General
@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]
= hou.applicationName =
#type: homfunction
#cppname: hom::applicationName
#category: General
@usage
`applicationName()` -> string
@replaces
- [Cmd:version]
@related
- [Hom:hou.applicationCompilationDate]
- [Hom:hou.applicationVersion]
- [Hom:hou.applicationVersionString]
- [Hom:hou.isApprentice]
= hou.applicationVersion =
#type: homfunction
#cppname: hom::applicationVersion
#category: General
@usage
`applicationVersion()` -> tuple of 3 ints
@replaces
- [Cmd:version]
@related
- [Hom:hou.applicationCompilationDate]
- [Hom:hou.applicationName]
- [Hom:hou.applicationVersionString]
- [Hom:hou.isApprentice]
= hou.applicationVersionString =
#type: homfunction
#cppname: hom::applicationVersionString
#category: General
@usage
`applicationVersionString()` -> string
@replaces
- [Cmd:version]
@related
- [Hom:hou.applicationCompilationDate]
- [Hom:hou.applicationName]
- [Hom:hou.applicationVersion]
- [Hom:hou.isApprentice]
= hou.audio =
#type: hommodule
#cppname: HOM_audio
#category: General
@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
::`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.
::`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].
::`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]
Search
hou.cache module
Not implemented yet
Subtopics
Text Clear
hou.cache.composite
hou.cache.imageViewer
hou.cache.objectTransform
hou.cache.sop
hou.cache.texture
hou.cache.undo
hou.cache.vexGeoCache
= hou.convertToNewKinematics =
#type: homfunction
#cppname: hom::convertToNewKinematics
#category: General
#status: ni
@usage
`convertToNewKinematics()`
@replaces
- [Cmd:kinconvert]
= hou.createVariable =
#type: homfunction
#cppname: hom::createVariable
#category: General
#status: ni
@usage
`createVariable(name)` -> Variable
= hou.exit =
#type: homfunction
#cppname: hom::exit
#category: General
@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]
= hou.hipFile =
#type: hommodule
#cppname: HOM_hipFile
#category: General
@functions
::`load(file_name, suppress_save_prompt=False)`:
#cppname: HOM_hipFile::load
#replaces: Cmd:mread
Loads a hip file.
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.
::`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.
::`saveAndIncrementFileName()`:
#cppname: HOM_hipFile::saveAndIncrementFileName
#replaces: Cmd:mwrite
Saves the current session to a hip file, automatically incrementing
the file name.
::`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.
::`clear(suppress_save_prompt=False)`:
#cppname: HOM_hipFile::clear
#replaces: Cmd:mnew
This function replaces the current session with an empty session.
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.
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.
::`setOnSaveCallback(callback)`:
#cppname: HOM_hipFile::setOnSaveCallback
#status: ni
= hou.hmath =
#type: hommodule
#cppname: HOM_hmath
#category: General
@functions
values:
A sequence of 3 floats representing the translation in x, y, and z.
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
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
def eulerToAxisAndAngle(angles):
return extractAxisAndAngleFromRotateMatrix(hou.hmath.buildRotate(angles))
}}}
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.
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.
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.
{{{
#!pycon
>>> hou.hmath.identityTransform()
<hou.Matrix4 [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]>
}}}
Note that you can achieve the same effect with Python's builtin `cmp`
function: `float(cmp(value, 0))`.
#replaces: Exp:smooth
Takes a value and range and returns a smooth interpolation between 0
and 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)
{{{
#!pycon
This function matches the output of the [Vex:noise] function from VEX.
This function matches the output of the [Vex:noise] function from VEX.
= hou.isApprentice =
#type: homfunction
#cppname: hom::isApprentice
#category: General
@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]
= hou.operatingSystem =
#type: homfunction
#cppname: hom::operatingSystem
#category: General
#status: ni
@usage
`operatingSystem()` -> string
= hou.releaseLicense =
#type: homfunction
#cppname: releaseLicense
#category: General
@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.
= hou.session =
#type: hommodule
#cppname: HOM_session
#category: General
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]
= hou.sessionModuleSource =
#type: homfunction
#cppname: hom::sessionModuleSource
#category: General
@usage
`sessionModuleSource()` -> string
@related
- [Hom:hou.appendSessionModuleSource]
- [Hom:hou.session]
- [Hom:hou.setSessionModuleSource]
= hou.setSessionModuleSource =
#type: homfunction
#cppname: hom::setSessionModuleSource
#category: General
@usage
`setSessionModuleSource(source)`
@related
- [Hom:hou.appendSessionModuleSource]
- [Hom:hou.session]
- [Hom:hou.setSessionModuleSource]
= 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]
= hou.variables =
#type: homfunction
#cppname: hom::variables
#category: General
#status: ni
@usage
`variables()` -> tuple of Variables
= attribData =
#type: hommodule
#cppname: HOM_attribData
#category: Geometry
* hou.attribData.Int
* hou.attribData.Float
* hou.attribData.String
= hou.Attrib =
#type: homclass
#cppname: HOM_Attrib
#category: Geometry
"""This class stores information about a Geometry attribute."""
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.
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
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.
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.
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.
::`setDefaultValue(self, default_value)`:
#cppname: HOM_Attrib::setDefaultValue
#status: ni
::`destroy(self)`:
#cppname: HOM_Attrib::destroy
#status: ni
= hou.Curve =
#type: homclass
#cppname: HOM_Curve
#superclass: hou.Face
#category: Geometry
#status: ni
@methods
::`knotValue(self, knot_index)`:
#cppname: HOM_Curve::knotValue
#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]
= 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."""
@methods
`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.
{{{
#!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()
# 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]
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.
::`setOpen(self, on)`:
#cppname: HOM_Face::setOpen
#status: ni
::`degree(self)`:
#cppname: HOM_Face::degree
#replaces: Exp:degree
#status: ni
= 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
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.
#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.
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.
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
{{{
#!python
See also:
- [Hom:hou.Prim#setAttribValue]
- [Hom:hou.Point#setAttribValue]
- [Hom:hou.Prim#setAttribValue]
- [Hom:hou.Geometry#setGlobalAttribValue]
See also:
- [Hom:hou.Geometry#attribValue]
{{{
#!python
# This code will work from inside a Python SOP, but not from the Python
# shell.
geo = hou.pwd().geometry()
See also:
- [Hom:hou.Geometry#attribValue]
- [Hom:hou.Point#setAttribValue]
- [Hom:hou.Prim#setAttribValue]
- [Hom:hou.Vertex#setAttribValue]
See also:
- [Hom:hou.Prim#attribType]
- [Hom:hou.Point#attribType]
- [Hom:hou.Vertex#attribType]
If the geometry contains point attributes, the new point receives the
default values for those attributes.
If the geometry contains primitive attributes, the new polygon receives the
default values for those attributes.
{{{
#!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)
}}}
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))
}}}
See also:
- [Hom:hou.Prim#vertices]
- [Hom:hou.Point#setPosition]
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.
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.
{{{
#!python
# This code will work from inside a Python SOP, but not from the Python
# shell.
geo = hou.pwd().geometry()
See also:
- [Hom:hou.Geometry#transformPrims]
- [Hom:hou.Matrix4]
- [Hom:hou.hmath]
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].
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.
If the geometry contains primitive attributes, the new surface receives the
default values for those attributes.
{{{
#!python
import math
# This code will work from inside a Python SOP, but not from the Python
# shell.
geo = hou.pwd().geometry()
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.
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).
keep_points:
if `True`, the primitive will be deleted but its points will remain.
{{{
#!python
# Delete every other primitive:
prims = [p for p in geo.prims() if p.number() % 2 == 0]
geo.deletePrims(prims)
::`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.
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.
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.
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().
{{{
#!python
# This is preferred:
geo.iterPoints()[23]
# over this:
geo.points()[23]
# over this:
for point in geo.iterPoints():
...process point...
}}}
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.
{{{
#!python
# Return a tuple containing points 5 and 7.
geo.globPoints("5 7")
# Return a tuple containing all the points in the pointgroup called group1.
geo.globPoints("group1")
# 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)
}}}
#status: ni
Note that the first value in the return tuple can be None if there are
no primitives in the geometry.
Calling this method is faster than looping over all the points and calling
[Hom:hou.Point#attribValue]
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.
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.
See also:
- [Hom:hou.Geometry#iterPrims]
- [Hom:hou.Face]
- [Hom:hou.Polygon]
- [Hom:hou.Surface]
- [Hom:hou.Volume]
{{{
#!python
# This is preferred:
geo.iterPrims()[23]
# over this:
geo.prims()[23]
# over this:
for prim in geo.iterPrims():
...process prim...
}}}
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.
Calling this method is faster than looping over all the points and calling
[Hom:hou.Point#attribValue]
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.
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.
::`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.
::`transform(self, matrix)`:
#cppname: HOM_Geometry::transform
{{{
#!python
import math
# This code will work from inside a Python SOP, but not from the Python
# shell.
::`metaballWeight(self, pos3)`:
#cppname: HOM_Geometry::metaballWeight
#replaces: Exp:metaweight
#status: ni
= 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
= hou.Point =
#type: homclass
#cppname: HOM_Point
#category: Geometry
The set of points may also store arbitrary data in the form of attributes,
and each point instance stores a unique attribute value.
@methods
Note that the point position attribute is named `P` and is 4 floats in size.
This attribute always exists.
{{{
#!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)
# 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")
#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.
This method is a shortcut for accessing the `P` attribute of the point.
{{{
#!python
point.position()
# is equivalent to
hou.Vector3(point.attribValue("P"))
}}}
See also:
- [Hom:hou.Point#weight]
- [Hom:hou.Vector3]
- [Hom:hou.Matrix4]
This method is a shortcut for accessing the `Pw` attribute of the 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.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.
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.
{{{
#!python
point.setPosition((x, y, z))
# is the same as
point.setAttribValue("P", (x, y, z))
}}}
::`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.
See also:
- [Hom:hou.Prim#attribType]
- [Hom:hou.Vertex#attribType]
- [Hom:hou.Geometry#attribType]
- [Hom:hou.attribType]
::`transform(self, matrix)`:
#cppname: HOM_Point::transform
#status: ni
::`destroy(self)`:
#cppname: HOM_Point::destroy
#status: ni
::`minDistanceToPrim(self, prim)`:
#cppname: HOM_Point::minDistanceToPrim
#replaces: Exp:pointdist
#status: ni
::`uvOfClosestLocationOnPrim(self, prim)`:
#cppname: HOM_Point::uvOfClosestLocationOnPrim
#status: ni
::`hasCollided(self)`:
#cppname: HOM_Point::hasCollided
#replaces: Exp:iscollided
#status: ni
::`isStuck(self)`:
#cppname: HOM_Point::isStuck
#replaces: Exp:isstuck
#status: ni
= hou.PointGroup =
#type: homclass
#cppname: HOM_PointGroup
#category: Geometry
#status: ni
@methods
::`hasPoint(self, point)`:
#cppname: HOM_PointGroup::hasPoint
#status: ni
::`name(self)`:
#cppname: HOM_PointGroup::name
#status: ni
@replaces
- [Exp:haspoint]
- [Exp:pointlist]
= 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
= 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
{{{
#!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())
}}}
See also:
- [Hom:hou.Point#attribType]
- [Hom:hou.Vertex#attribType]
- [Hom:hou.Geometry#attribType]
- [Hom:hou.attribType]
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.
::`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.
::`minDistanceToPrim(self, prim)`:
#cppname: HOM_Prim::minDistanceToPrim
#replaces: Exp:primdist
#status: ni
::`ourUVAtClosestLocationToPrim(self, prim)`:
#cppname: HOM_Prim::ourUVAtClosestLocationToPrim
#status: ni
= hou.PrimGroup =
#type: homclass
#cppname: HOM_PrimGroup
#category: Geometry
#status: ni
@methods
::`hasPrim(self, prim)`:
#cppname: HOM_PrimGroup::hasPrim
#status: ni
::`name(self)`:
#cppname: HOM_PrimGroup::name
#status: ni
@replaces
- [Exp:primlist]
- [Exp:hasprim]
= hou.Quadric =
#type: homclass
#cppname: HOM_Quadric
#superclass: hou.Prim
#category: Geometry
@methods
= 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
::`name(self)`:
#cppname: HOM_SopCacheWatermark::name
#status: ni
@replaces
- [Cmd:sopcache]
= hou.SopNode =
#type: homclass
#cppname: HOM_SopNode
#superclass: hou.Node
#category: Geometry
@methods
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.
::`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.
Note that you can set the current point to None. In this case,
subsequent calls to [Hom:hou.SopNode#curPoint] will raise
::`setCurPrim(self, prim_or_none)`:
#cppname: HOM_SopNode::setCurPrim
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.
::`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.
::`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.
::`setDisplayFlag(self, on)`:
#cppname: HOM_SopNode::setDisplayFlag
#replaces: Exp:opset
Turn this node's display flag on or off.
::`setRenderFlag(self, on)`:
#cppname: HOM_SopNode::setRenderFlag
#replaces: Exp:opset
Turns this node's render flag on or off.
::`setHighlightFlag(self, on)`:
#cppname: HOM_SopNode::setHighlightFlag
#replaces: Exp:opset
Turn this node's highlight flag on or off.
::`setTemplateFlag(self, on)`:
#cppname: HOM_SopNode::setTemplateFlag
#replaces: Exp:opset
Turns this node's template flag on or off.
::`setSelectableTemplateFlag(self, on)`:
#cppname: HOM_SopNode::setSelectableTemplateFlag
#replaces: Exp:opset
Turn this node's selectable template flag on or off.
::`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.
::`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.
::`setUnloadFlag(self, on)`:
#cppname: HOM_SopNode::setUnloadFlag
#replaces: Exp:opset
::`memorySizeInBytes(self)`:
#cppname: HOM_SopNode::memorySizeInBytes
#status: ni
@replaces
#replaces: Cmd:opsave
#replaces: Cmd:opset
#replaces: Cmd:sopcache
#replaces: Cmd:sopcreateedit
= hou.Surface =
#type: homclass
#cppname: HOM_Surface
#superclass: hou.Prim
#category: Geometry
@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.
Negative indices are allowed, in which case Houdini will index starting
from the last vertex.
{{{
#!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()
grid_node = geo.sopNode()
grid_node.setDisplayFlag(True)
for name, value in ("type", "nurbs"), ("rows", 5), ("cols", 4):
grid_node.parm(name).set(value)
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.
::`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.
::`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
{{{
#!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())
# 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.
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.
::`isClosedInU(self)`:
#cppname: HOM_Surface::isClosedInU
#replaces: Exp:iswrapu
Return whether the first and last columns of vertices are connected.
::`isClosedInV(self)`:
#cppname: HOM_Surface::isClosedInV
#replaces: Exp:iswrapv
Return whether the first and last rows of vertices are connected.
::`uDegree(self)`:
#cppname: HOM_Surface::uDegree
#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
::`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
::`uniformToParametricV(self, v)`:
#cppname: HOM_Surface::uniformToParametricV
#replaces: Exp:realuv
#status: ni
= hou.Vertex =
#type: homclass
#cppname: HOM_Vertex
#category: Geometry
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
See also:
- [Hom:hou.Point#attribType]
- [Hom:hou.Prim#attribType]
- [Hom:hou.Geometry#attribType]
- [Hom:hou.attribType]
::`destroy(self)`:
#cppname: HOM_Vertex::destroy
#status: ni
= hou.Volume =
#type: homclass
#cppname: HOM_Volume
#superclass: hou.Prim
#category: Geometry
@methods
{{{
#!pycon
>>> volume_sop = hou.node("/obj").createNode("geo").createNode("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
}}}
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.
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.
for x in range(xres):
result.append(self.voxel((x, y, z)))
return tuple(result)
}}}
::`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.
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.
= hou.attribType =
#type: hommodule
#cppname: HOM_attribType
#category: Geometry
* hou.attribType.Point
* hou.attribType.Prim
* hou.attribType.Vertex
* hou.attribType.Global
The type of data (e.g. int, float, string) is called the attribute data type,
can corresponds to [Hom:hou.attribData].
= hou.geometryType =
#type: hommodule
#cppname: HOM_geometryType
#category: Geometry
#status: nd
* hou.geometryType.Points
* hou.geometryType.Vertices
* hou.geometryType.Edges
* hou.geometryType.Breakpoints
* hou.geometryType.Primitives
* hou.geometryType.PointGroups
* hou.geometryType.PrimitiveGroups
= 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
= hou.FileType =
#type: homclass
#cppname: HOM_FileType
#category: IO
#status: ni
::`extension(self)`:
#cppname: HOM_FileType::extension
#status: ni
= hou.fileReferences =
#type: homfunction
#cppname: hom::fileReferences
#category: IO
#status: nd
@usage
`fileReferences()` -> tuple of Parm and string tuples
@replaces
- [Cmd:fdependls]
= 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
@related
- [Hom:hou.findDirectory]
- [Hom:hou.findFile]
- [Hom:hou.findFiles]
- [Hom:hou.houdiniPath]
= 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
@related
- [Hom:hou.findDirectories]
- [Hom:hou.findFile]
- [Hom:hou.findFiles]
- [Hom:hou.houdiniPath]
= 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
@related
- [Hom:hou.findFiles]
- [Hom:hou.findDirectory]
- [Hom:hou.findDirectories]
- [Hom:hou.houdiniPath]
@replaces
- [Exp:findfile]
= 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
@related
- [Hom:hou.findFile]
- [Hom:hou.findDirectory]
- [Hom:hou.findDirectories]
- [Hom:hou.houdiniPath]
@replaces
- [Exp:findfiles]
= hou.homeHoudiniDirectory =
#type: homfunction
#cppname: homeHoudiniDirectory
#category: IO
@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]
= hou.houdiniPath =
#type: homfunction
#cppname: houdiniPath
#category: IO
@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]
= hou.knownFileTypes =
#type: hommodule
#cppname: HOM_knownFileTypes
#category: IO
#status: ni
@functions
#status: ni
= hou.readFile =
#type: homfunction
#cppname: hom::readFile
#category: IO
@usage
`readFile(file_path) -> string`
If the file does not exist or an error occurs while reading, this function
raises hou.OperationFailed.
= hou.CompositorViewer =
#type: homclass
#cppname: HOM_CompositorViewer
#superclass: hou.PathBasedPaneTab
#category: Images
#status: nd
@methods
::`enterViewState(self, wait_for_exit=False)`:
#cppname: HOM_CompositorViewer::enterViewState
#status: nd
= hou.CopNode =
#type: homclass
#cppname: HOM_CopNode
#superclass: hou.Node
#category: Images
@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.
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
Note that the returned values are for the node's image at the
current frame.
Note that the returned hue, saturation and value are for the
node's image at the current frame.
#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.
Note that the returned luminance value is for the node's image
at the current frame.
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.
Returns True if the node's bypass flag is turned on. Returns False
otherwise.
Returns True if the node's display flag is turned on. Returns False
otherwise.
Returns True if the node's render flag is turned on. Returns False
otherwise.
Returns True if the node has a single image. Returns False if the
node has an image sequence.
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.
::`setDisplayFlag(self, on)`:
#cppname: HOM_CopNode::setDisplayFlag
#replaces: Cmd:opset
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.
::`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.
::`xRes(self)`:
#cppname: HOM_CopNode::xRes
#replaces: Cmd:res
Returns the x-resolution of the node's image for the current frame.
::`yRes(self)`:
#cppname: HOM_CopNode::yRes
#replaces: Cmd:res
Returns the y-resolution of the node's image for the current frame.
@replaces
- [Exp:imgbounds]
- [Exp:pic]
- [Exp:picni]
- [Exp:opflag]
- [Cmd:opget]
- [Cmd:opsave]
- [Cmd:opset]
- [Exp:res]
- [Exp:seqanim]
- [Exp:seqend]
- [Exp:seqlength]
- [Exp:seqstart]
= hou.HistogramViewer =
#type: homclass
#cppname: HOM_HistogramViewer
#category: Images
#status: ni
@methods
::`setType(self, type)`:
#cppname: HOM_HistogramViewer::setType
#status: ni
= 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
#status: ni
@replaces
- [Cmd:imgviewtime]
= 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
#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
::`showTransparency(self, on)`:
#cppname: HOM_ImageViewer::showTransparency
#status: ni
@replaces
- [Cmd:imgview2d]
= 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
::`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
#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]
= hou.Mplay =
#type: homclass
#cppname: HOM_Mplay
#superclass: hou.ModalImageViewer
#category: Images
#status: ni
@methods
::`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
#cppname: HOM_Mplay::prependSequence
#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]
- [Cmd:appendseq]
- [Cmd:mplayhome]
- [Cmd:mplayfit]
- [Cmd:seqls]
- [Cmd:loadsequence]
- [Cmd:prependseq]
- [Cmd:mplayprofile]
= hou.pixelColorInFileByUV =
#type: homfunction
#cppname: hom::pixelColorInFileByUV
#category: Images
#status: ni
@usage
`pixelColorInFileByUV(u, v, interpolate=True)` -> Color
@replaces
- [Exp:tex]
- [Exp:texni]
= hou.BaseKeyframe =
#type: homclass
#cppname: HOM_BaseKeyframe
#category: Keyframes
@methods
`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.
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 [Hom:hou.KeyframeValueNotSet] if an expresion language has not ben set.
This function raises [Hom:hou.KeyframeValueNotSet] if the frame or time has not been set.
#cppname: HOM_BaseKeyframe::isExpressionLanguageSet
::`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
::`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()`.
::`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()`.
This function raises [hou.KeyframeValueNotSet] if the time or frame has not been set.
@replaces
- [Cmd:chkey]
- [Cmd:chkeyls]
- [Cmd:chkey]
- [Cmd:chround]
- [Exp:chsraw]
- [Exp:lock]
- [Cmd:opscript]
= hou.Keyframe =
#type: homclass
#cppname: HOM_Keyframe
#superclass: hou.BaseKeyframe
#category: Keyframes
@methods
This function raises [Hom:hou.KeyframeValueNotSet] if the acceleration has not been set.
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
Returns True if the acceleration entering the keyframe has not been set.
Returns True if the slope entering or leaving the keyframe has been set.
Returns True if the slope entering the keyframe has not been set.
Returns True if the value entering or leaving the keyframe has been set.
Returns True if the value entering the keyframe has not been set.
::`setAccel(self, accel)`:
#cppname: HOM_Keyframe::setAccel
::`setInAccel(self, in_accel)`:
#cppname: HOM_Keyframe::setInAccel
::`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
::`setValue(self, value)`:
#cppname: HOM_Keyframe::setValue
::`unsetInAccel(self)`:
#cppname: HOM_Keyframe::unsetInAccel
Unsets the acceleration entering the keyframe and untie the acceleration.
::`unsetInSlope(self)`:
#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.
@replaces
- [Cmd:chkey]
- [Cmd:chkeyls]
= hou.StringKeyframe =
#type: homclass
#cppname: HOM_StringKeyframe
#superclass: hou.BaseKeyframe
#category: Keyframes
#status: nd
@methods
= hou.infoAboutParmKeyframeFile =
#type: homfunction
#cppname: hom::infoAboutParmKeyframeFile
#category: Keyframes
#status: ni
@usage
`infoAboutParmKeyframeFile(chn_or_bchn_file_name)`
@replaces
- [Cmd:chread]
= 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]
= hou.saveParmKeyframes =
#type: homfunction
#cppname: hom::saveParmKeyframes
#category: Keyframes
#status: ni
@usage
`saveParmKeyframes(parm_list, chn_or_bchn_file_name)`
@replaces
- [Cmd:chwrite]
= hou.setDefaultSegmentFunction =
#type: homfunction
#cppname: hom::setDefaultSegmentFunction
#category: Keyframes
#status: ni
@usage
`setDefaultSegmentFunction(function_name)`
@replaces
- [Cmd:chaneditor]
= hou.Gallery =
#type: homclass
#cppname: HOM_Gallery
#category: Materials
#status: nd
@methods
::`deleteEntry(self, entry_name)`:
#cppname: HOM_GalleryEntry::deleteEntry
#status: nd
= hou.GalleryEntry =
#type: homclass
#cppname: HOM_GalleryEntry
#category: Materials
#status: nd
@methods
::`applyToNode(self, node)`:
#cppname: HOM_GalleryEntry::applyToNode
#status: nd
#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)`:
#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
= 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."""
@methods
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).
like the properties SHOP or the switch SHOP, have a render mask of
`"*"` to indicate that they will work with any shader type.
{{{
#!pycon
>>> for node_type_name in ("v_plastic", "ri_matte", "mib_illum_phong"):
... hou.node("/shop").createNode(node_type_name)
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" [""] )
= hou.galleries =
#type: hommodule
#cppname: HOM_galleries
#category: Materials
#status: nd
@functions
`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`:
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
}}}
= hou.shaderType =
#type: hommodule
#cppname: HOM_shaderType
#category: Materials
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.
* 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
= hou.NetworkBox =
#type: homclass
#cppname: HOM_NetworkBox
#category: Node Organization
@methods
::`addNode(self, node)`:
#cppname: HOM_NetworkBox::addNode
::`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
::`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
::`move(self, vector2)`:
#cppname: HOM_NetworkBox::move
::`removeAllNodes(self)`:
#cppname: HOM_NetworkBox::removeAllNodes
::`removeNode(self, node)`:
#cppname: HOM_NetworkBox::removeNode
::`resize(self, vector2)`:
#cppname: HOM_NetworkBox::resize
::`setColor(self, color)`:
#cppname: HOM_NetworkBox::setColor
::`setMinimized(self, on)`:
#cppname: HOM_NetworkBox::setMinimized
::`setName(self, name)`:
#cppname: HOM_NetworkBox::setName
::`setPicked(self, on)`:
#cppname: HOM_NetworkBox::setPicked
::`setPosition(self, vector2)`:
#cppname: HOM_NetworkBox::setPosition
::`setSize(self, size)`:
#cppname: HOM_NetworkBox::setSize
#cppname: HOM_NetworkBox::size
@replaces
- [Cmd:nbcolor]
- [Cmd:nbget]
- [Cmd:nblocate]
- [Cmd:nbls]
- [Cmd:nblsop]
- [Cmd:nbname]
- [Cmd:nbop]
- [Cmd:nbrm]
- [Cmd:nbset]
- [Cmd:nbsize]
- [Cmd:opscript]
= 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.
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
::`setName(self, name)`:
#cppname: HOM_NodeBundle::setName
#replaces: Cmd:opbname
Change the name of the bundle.
::`destroy(self)`:
#cppname: HOM_NodeBundle::destroy
#replaces: Cmd:opbrm
Remove this 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.
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.
::`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.
be a [Hom:hou.Node] object.
::`addNode(self, node)`:
#cppname: HOM_NodeBundle::addNode
#replaces: Cmd:opbop
Add a node to the bundle.
::`removeNode(self, node)`:
#cppname: HOM_NodeBundle::removeNode
#replaces: Cmd:opbop
Remove a node from the bundle.
::`clear(self)`:
#cppname: HOM_NodeBundle::clear
#replaces: Cmd:opbop
Remove all nodes from the bundle.
#status: ni
= 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
::`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
::`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.
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.
= hou.addNodeBundle =
#type: homfunction
#cppname: hom::addNodeBundle
#category: Node Organization
@usage
`addNodeBundle(name)` -> [Hom:hou.NodeBundle]
@replaces
- [Cmd:opbadd]
= hou.nodeBundle =
#type: homfunction
#cppname: hom::nodeBundle
#category: Node Organization
@usage
`nodeBundle(name)` -> [Hom:hou.NodeBundle] or `None`
@replaces
- [Cmd:opbls]
- [Cmd:opglob]
= 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]
@replaces
- [Cmd:opbls]
= hou.nodeTypeFilter =
#type: hommodule
#cppname: HOM_nodeTypeFilter
#category: Node Organization
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
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
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
= 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]
@replaces
- [Cmd:opbls]
= hou.NodeTypeCategory =
#type: homclass
#cppname: HOM_NodeTypeCategory
#category: Node type categories
{{{
#!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.
For example, if this node type category is SOPs, the keys in the dictionary
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)]
}}}
::`scriptDirName(self)`:
#cppname: HOM_NodeTypeCategory::scriptDirName
#replaces: Cmd:optype, Exp:optypeinfo
#status: ni
@related
- [Hom:hou.nodeTypeCategories]
- [Hom:hou.objNodeTypeCategory]
- [Hom:hou.sopNodeTypeCategory]
- [Hom:hou.popNodeTypeCategory]
- [Hom:hou.dopNodeTypeCategory]
- [Hom:hou.cop2NodeTypeCategory]
- [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]
= hou.ShopNodeTypeCategory =
#type: homclass
#cppname: HOM_ShopNodeTypeCategory
#superclass: hou.NodeTypeCategory
#category: Node type categories
#status: ni
@methods
= hou.chopNetNodeTypeCategory =
#type: homfunction
#cppname: channelContainerNodeTypeCategory
#category: Node type categories
@usage
`chopNetNodeTypeCategory()` -> NodeTypeCategory
= hou.chopNodeTypeCategory =
#type: homfunction
#cppname: channelNodeTypeCategory
#category: Node type categories
@usage
`chopNodeTypeCategory()` -> NodeTypeCategory
= hou.cop2NetNodeTypeCategory =
#type: homfunction
#cppname: compositeContainerNodeTypeCategory
#category: Node type categories
@usage
`cop2NetNodeTypeCategory()` -> NodeTypeCategory
= hou.cop2NodeTypeCategory =
#type: homfunction
#cppname: compositeNodeTypeCategory
#category: Node type categories
@usage
`cop2NodeTypeCategory()` -> NodeTypeCategory
= hou.dopNodeTypeCategory =
#type: homfunction
#cppname: dynamicNodeTypeCategory
#category: Node type categories
@usage
`dopNodeTypeCategory()` -> NodeTypeCategory
= hou.managerNodeTypeCategory =
#type: homfunction
#cppname: managerNodeTypeCategory
#category: Node type categories
@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.
= 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]
= hou.objNodeTypeCategory =
#type: homfunction
#cppname: objectNodeTypeCategory
#category: Node type categories
@usage
`objNodeTypeCategory()` -> NodeTypeCategory
= hou.popNetNodeTypeCategory =
#type: homfunction
#cppname: particleContainerNodeTypeCategory
#category: Node type categories
@usage
`popNetNodeTypeCategory()` -> NodeTypeCategory
= hou.popNodeTypeCategory =
#type: homfunction
#cppname: particleNodeTypeCategory
#category: Node type categories
@usage
`popNodeTypeCategory()` -> NodeTypeCategory
= 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
= hou.ropNodeTypeCategory =
#type: homfunction
#cppname: outputNodeTypeCategory
#category: Node type categories
@usage
`ropNodeTypeCategory()` -> NodeTypeCategory
= hou.shopNodeTypeCategory =
#type: homfunction
#cppname: shaderNodeTypeCategory
#category: Node type categories
@usage
`shopNodeTypeCategory()` -> [Hom:hou.NodeTypeCategory]
= hou.sopNodeTypeCategory =
#type: homfunction
#cppname: geometryNodeTypeCategory
#category: Node type categories
@usage
`sopNodeTypeCategory()` -> NodeTypeCategory
= hou.vopNetNodeTypeCategory =
#type: homfunction
#cppname: vexBuilderContainerNodeTypeCategory
#category: Node type categories
@usage
`vopNetNodeTypeCategory()` -> NodeTypeCategory
= hou.vopNodeTypeCategory =
#type: homfunction
#cppname: vexBuilderNodeTypeCategory
#category: Node type categories
@usage
`vopNodeTypeCategory()` -> NodeTypeCategory
= 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].
@methods
For example, the result is `102` for a node named `geo102`, and `34` for
a node named `light12to34`.
{{{
#!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)
'.'
}}}
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.
{{{
#!pycon
>>> hou.node("/obj/box_object1").parent()
<hou.Node at /obj>
>>> print hou.node("/").parent()
None
}}}
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())
}}}
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.
This code, for example, removes all the visibility SOPs anywhere under /obj:
{{{
#!pycon
>>> removeSubChildrenOfType(hou.node("/obj"), hou.sopNodeTypeCategory().nodeTypes()['visibility'])
}}}
#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
{{{
#!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>
>>> names(obj.glob("g*"))
['geo1', 'geo2', 'grid', 'garbage']
>>> names(obj.glob("ge* ga*"))
['geo1', 'geo2', 'garbage']
>>> names(obj.glob("g* ^ga*"))
['geo1', 'geo2', 'grid']
}}}
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
`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.
`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.
{{{
#!pycon
>>> obj = hou.node("/obj")
# 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
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.
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.
`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
For example, all camera node instances share the same node type.
::`__getitem__(self, parm_name)`:
#cppname: HOM_Node::__getitem__
#status: ni
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")`.
folder_style:
A member of [Hom:hou.folderType] describing how the folder is
rendered.
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
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.
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.
::`removeSpareParmTuple(self, parm_tuple)`:
#cppname: HOM_Node::removeSpareParmTuple
Removes the specified spare parameter tuple.
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.
::`removeSpareParmFolder(self, folder)`:
#cppname: HOM_Node::removeSpareParmFolder
Removes an empty folder from the spare parameters.
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].
{{{
#!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
{{{
#!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>)
}}}
{{{
#!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>), (), ())
}}}
#replaces: Cmd:opdepend
Return the hou.SubnetIndirectInput objects of a subnet.
{{{
#!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>,)
}}}
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.
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.
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()`.
::`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.
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.
::`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.
::`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].
::`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].
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.
::`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.
::`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.
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`.
If you don't specify a `name`, Houdini gives the box a default name.
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 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].
::`runInitScripts(self)`:
#cppname: HOM_Node::runInitScripts
Runs the initialization script associated with this node's type.
::`loadPresets(self, presets)`:
#cppname: HOM_Node::loadPresets
#replaces: Cmd:oppresetload
#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).
::`sessionId(self)`:
#cppname: HOM_Node::sessionId
#replaces: Exp:opid
#status: nd
::`setCreatorState(self, state)`:
#cppname: HOM_Node::setCreatorState
#status: nd
::`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.
[Hom:hou.Node#motionEffectsNetworkPath].
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.
::`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.
::`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
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.
::`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
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.
= hou.NodeConnection =
#type: homclass
#cppname: HOM_NodeConnection
#category: 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.
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
#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.
= hou.NodeType =
#type: homclass
#cppname: HOM_NodeType
#category: Nodes
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.
@methods
{{{
#!pycon
>>> hou.nodeType(hou.objNodeTypeCategory(), "geo").nameWithCategory()
'Object/geo'
}}}
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].
::`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
#replaces: Cmd:opalias
Remove an alias for this node type.
::`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].
#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].
{{{
#!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
}}}
{{{
#!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'
}}}
::`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())
}}}
= hou.PopNetNode =
#type: homclass
#cppname: HOM_PopNetNode
#superclass: hou.Node
#category: Nodes
#status: nd
@methods
= hou.PopNode =
#type: homclass
#cppname: HOM_PopNode
#superclass: hou.Node
#category: Nodes
@methods
::`bypass(self, on)`:
#cppname: HOM_PopNode::bypass
Turns this node's bypass flag on or off, making this node have no effect.
::`eventTime(self, event_name)`:
#cppname: HOM_PopNode::eventTime
#status: ni
::`setDisplayFlag(self, on)`:
#cppname: HOM_PopNode::setDisplayFlag
::`setRenderFlag(self, on)`:
#cppname: HOM_PopNode::setRenderFlag
::`setTemplateFlag(self, on)`:
#cppname: HOM_PopNode::setTemplateFlag
@replaces
- [Cmd:opget]
- [Cmd:opset]
- [Exp:opflag]
- [Exp:popevent]
- [Exp:popeventtime]
- [Exp:poppoint]
- [Exp:poppointid]
- [Exp:poppointnum]
= hou.SopNodeType =
#type: homclass
#cppname: HOM_SopNodeType
#superclass: hou.NodeType
#category: Nodes
@methods
{{{
#!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
{{{
#!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
::`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.
`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")
}}}
= 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.
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
= hou.VopNetNode =
#type: homclass
#cppname: HOM_VopNetNode
#superclass: hou.Node
#category: Nodes
#status: nd
@methods
= 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)`
@related
- [Hom:hou.pwd]
- [Hom:hou.setPwd]
@replaces
- [Cmd:opcf]
= hou.copyNodesTo =
#type: homfunction
#cppname: hom::copyNodesTo
#category: Nodes
@usage
`copyNodesTo(nodes, destination_node) -> tuple of Nodes`
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.
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.
@replaces
- [Cmd:opcp]
= hou.copyNodesToClipboard =
#type: homfunction
#cppname: hom::copyNodesToClipboard
#category: Nodes
#status: ni
@usage
`copyNodesToClipboard(nodes, include_network_boxes=False)`
@replaces
- [Cmd:opcopy]
= hou.currentSimulation =
#type: homfunction
#cppname: hom::currentSimulation
#category: Nodes
#status: nd
@usage
`currentSimulation()` -> DopNetNode or None
= hou.filterNodesByType =
#type: homfunction
#cppname: hom::filterNodesByType
#category: Nodes
#status: ni
@usage
`filterNodesByType(node_list, node_type_filter)` -> tuple of Nodes
= 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)`
= hou.moveNodesTo =
#type: homfunction
#cppname: hom::moveNodesTo
#category: Nodes
@usage
`moveNodesTo(nodes, destination_node) -> tuple of Nodes`
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.
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.
= 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.
{{{
#!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
- [Cmd:opfind]
- [Exp:ch]
- [Exp:chs]
- [Exp:chsop]
- [Exp:opexist]
= 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
@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>
@replaces
- [Cmd:optype]
- [Exp:optype]
- [Exp:optypeinfo]
@related
- [Hom:hou.NodeType]
- [Hom:hou.NodeTypeCategory]
- [Hom:hou.NodeTypeCategory#nodeTypes]
- [Hom:hou.nodeTypeCategories]
= hou.nodeTypeSource =
#type: hommodule
#cppname: HOM_nodeTypeSource
#category: Nodes
#status: nd
* hou.nodeTypeSource.Internal
* hou.nodeTypeSource.CompiledCode
* hou.nodeTypeSource.VexCode
* hou.nodeTypeSource.RslCode
* hou.nodeTypeSource.Subnet
= hou.pasteNodesFromClipboard =
#type: homfunction
#cppname: hom::pasteNodesFromClipboard
#category: Nodes
#status: ni
@usage
`pasteNodesFromClipboard(target_network)`
@replaces
- [Cmd:oppaste]
= hou.perms =
#type: hommodule
#cppname: HOM_perms
#category: Nodes
#status: ni
* 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
= 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.
@related
- [Hom:hou.cd]
@replaces
- [Cmd:oppwf]
- [Exp:oppwf]
- [Exp:oppwd]
- [Exp:opfullpath]
= hou.root =
#type: homfunction
#cppname: hom::root
#category: Nodes
@usage
`root()` -> Node
@related
- [Hom:hou.node]
= hou.selectedNodes =
#type: homfunction
#cppname: hom::selectedNodes
#category: Nodes
usage>>
`selectedNodes(include_hidden=False)` -> `tuple` of [Hom:hou.Node]
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]
= hou.setCurrentSimulation =
#type: homfunction
#cppname: hom::setCurrentSimulation
#category: Nodes
#status: ni
@usage
`setCurrentSimulation(dopnet)`
= hou.setPwd =
#type: homfunction
#cppname: hom::setPwd
#category: Nodes
@usage
`setPwd(node)`
@related
- [Hom:hou.pwd]
- [Hom:hou.cd]
@replaces
- [Cmd:opcf]
= hou.AmbientLightObjNode =
#type: homclass
#cppname: HOM_AmbientLightObjNode
#superclass: hou.LightObjNode
#category: Objects
#status: ni
= 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
@replaces
- [Exp:boneangle]
- [Cmd:bonefixchops]
- [Cmd:bonemoveend]
= hou.GeometryObjNode =
#type: homclass
#cppname: HOM_GeometryObjNode
#superclass: hou.ObjNode
#category: Objects
#status: ni
@methods
@replaces
- [Exp:objlightmask]
- [Exp:oplightmask]
= hou.LightObjNode =
#type: homclass
#cppname: HOM_LightObjNode
#superclass: hou.ObjNode
#category: Objects
#status: ni
= hou.ObjNode =
#type: homclass
#cppname: HOM_ObjNode
#superclass: hou.Node
#category: Objects
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.
@methods
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.
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,
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)
}}}
See the class documentation for the relation between this transform
and the world space transform. See also [Hom:hou.ObjNode#worldTransform].
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.
::`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:
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())
}}}
::`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.
::`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.
::`moveParmTransformIntoPreTransform(self)`:
#cppname: HOM_ObjNode::moveParmTransformIntoPreTransform
#replaces: Cmd:objcleantransform
Set this object's parm transform to the identity and adjust the
pre-transform so that the world transform does not change.
::`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.
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()
}}}
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())`.
{{{
#!python
obj1.getTransformFromPointToPoint(pos1, obj2, pos2)
}}}
{{{
#!python
(obj1.worldTransform().inverted() *
hou.hmath.buildTranslate(-pos1) *
hou.hmath.buildTranslate(pos2) *
obj2.worldTransform())
}}}
`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()
}}}
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))
}}}
::`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.
::`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.
::`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].
::`setSelectableInViewport(self, on)`:
#cppname: HOM_ObjNode::setSelectableInViewport
#replaces: Cmd:opset
Set the object's selectable flag. See
[Hom:hou.ObjNode#isSelectableInViewport] for more information.
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].
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].
= hou.ButtonParmTemplate =
#type: homclass
#cppname: HOM_ButtonParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
@methods
= hou.FloatParmTemplate =
#type: homclass
#cppname: HOM_FloatParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
#status: nd
@methods
@related
- [Hom:hou.FloatParmTemplate.maxIsStrict]
- [Hom:hou.FloatParmTemplate.minIsStrict]
- [Hom:hou.FloatParmTemplate.maxValue]
- [Hom:hou.FloatParmTemplate.min]
- [Hom:hou.FloatParmTemplate.max]
= hou.FolderSetParmTemplate =
#type: homclass
#cppname: HOM_FolderSetParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
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
= hou.IntParmTemplate =
#type: homclass
#cppname: HOM_IntParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
#status: nd
@methods
= hou.LabelParmTemplate =
#type: homclass
#cppname: HOM_LabelParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
= hou.MenuParmTemplate =
#type: homclass
#cppname: HOM_MenuParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
@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
Returns the internal name of the default menu item.This is equivalent to...
{{{
#!python
self.menuItems()[self.defaultValue()]
}}}
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.
#cppname: HOM_MenuParmTemplate::menuLabels
@replaces
- [Cmd:opmenu]
= hou.MultiParmTemplate =
#type: homclass
#cppname: HOM_MultiParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
#status: nd
@methods
::`addParmTemplate(self, parm_template)`:
#cppname: HOM_MultiParmTemplate::addParmTemplate
#status: nd
::`clearParmTemplates(self)`:
#cppname: HOM_MultiParmTemplate::clearParmTemplates
#status: nd
= hou.ParmTemplate =
#type: homclass
#cppname: HOM_ParmTemplate
#category: Parameter templates
#status: nd
@methods
`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.
::`defaultValue(self)`:
#cppname: HOM_ParmTemplate::defaultValue
#status: ni
Returns the help that Houdini displays when you hover over the parameter
label in the parameter pane.
::`hide(self, on)`:
#cppname: HOM_ParmTemplate::hide
::`mayContainExpressions(self)`:
#cppname: HOM_ParmTemplate::mayContainExpressions
#status: ni
::`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
::`setName(self, name)`:
#cppname: HOM_ParmTemplate::setName
#status: nd
::`setTags(self, tags)`:
#cppname: HOM_ParmTemplate::setTags
#status: nd
@replaces
- [Cmd:opscript]
= hou.RampParmTemplate =
#type: homclass
#cppname: HOM_RampParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
@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 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)
}}}
{{{
#!python
r = hou.RampParmTemplate("myRamp", "My Ramp", hou.rampParmType.Color,
color_type = hou.colorType.RGB)
}}}
= hou.SeparatorParmTemplate =
#type: homclass
#cppname: HOM_SeparatorParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
@methods
= 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
= hou.ToggleParmTemplate =
#type: homclass
#cppname: HOM_ToggleParmTemplate
#superclass: hou.ParmTemplate
#category: Parameter templates
#status: nd
@methods
= hou.parmData =
#type: hommodule
#cppname: HOM_parmData
#category: Parameter templates
#status: nd
* hou.parmData.Int
* hou.parmData.Float
* hou.parmData.String
= hou.parmLook =
#type: hommodule
#cppname: HOM_parmLook
#category: Parameter templates
* hou.parmLook.Regular
* hou.parmLook.Angle
* hou.parmLook.Vector
* hou.parmLook.ColorSquare
* hou.parmLook.HueCircle
* hou.parmLook.CRGBAPlaneChooser
* hou.parmLook.Slider
= hou.parmNamingScheme =
#type: hommodule
#cppname: HOM_parmNamingScheme
#category: Parameter templates
* 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
= hou.parmTemplateType =
#type: hommodule
#cppname: HOM_parmTemplateType
#category: Parameter templates
#status: nd
* 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
= hou.stringParmType =
#type: hommodule
#cppname: HOM_stringParmType
#category: Parameter templates
#status: nd
* hou.stringParmType.Regular
* hou.stringParmType.FileReference
* hou.stringParmType.NodeReference
* hou.stringParmType.NodeReferenceList
= 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
::`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
`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.
# 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
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.
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").
Note that calling this method on many parameters may be slow. For a faster
alternative, see [Hom:hou.Node#parmsInFolder].
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.
#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.
::`effectiveKeyframeAtFrame(self, frame)`:
#cppname: HOM_Parm::effectiveKeyframeAtFrame
#status: ni
Evalutes this parameter at the current frame and returns the result as an
integer.
::`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.
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.
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
{{{
#!python
parm.keyframes()[0].expressionLanguage()
}}}
::`isParmReference(self)`:
#cppname: HOM_Parm::isParmReference
#status: ni
::`isPending(self)`:
#cppname: HOM_Parm::isPending
#status: ni
::`keyCurValueAtFrame(self, frame)`:
#cppname: HOM_Parm::keyCurValueAtFrame
#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).
::`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
::`pendingValue(self)`:
#cppname: HOM_Parm::pendingValue
#status: ni
::`removeFromScope(self)`:
#cppname: HOM_Parm::removeFromScope
#status: ni
::`reverse(self)`:
#cppname: HOM_Parm::reverse
#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
::`revertToDefaults(self)`:
#cppname: HOM_Parm::revertToDefaults
Change the value back to the default(s).
See also the `revertToAndRestoreFactoryDefaults()` method.
::`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.
expression:
A string containing the expression that will go inside the parameter.
language:
Either a [Hom:hou.exprLanguage] enumeration value or `None`.
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.
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.
{{{
#!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)
}}}
::`setKeyframe(self, keyframe)`:
#cppname: HOM_Parm::setKeyframe
Sets a keyframe on this parameter.
::`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.
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.
::`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
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.
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.
@replaces
- [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]
= 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
::`asCode(self)`:
#cppname: HOM_ParmGroup::asCode
#status: ni
::`clear(self)`:
#cppname: HOM_ParmGroup::clear
#status: ni
::`moveToNextKeyInGroup(self)`:
#cppname: HOM_ParmGroup::moveToNextKeyInGroup
#status: ni
::`moveToPreviousKeyInGroup(self)`:
#cppname: HOM_ParmGroup::moveToPreviousKeyInGroup
#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]
= 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.
@methods
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.
{{{
#!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>)
}}}
{{{
#!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']
#replaces: Cmd:opparm
Return this parameter tuple's label that is displayed in the parameter
dialog.
::`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
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.
::`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.
::`deleteAllKeyframes(self)`:
#cppname: HOM_ParmTuple::deleteAllKeyframes
Remove all the keyframes from this parameter tuple.
::`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.
::`revertToDefaults(self)`:
#cppname: HOM_ParmTuple::revertToDefaults
Changes the value back to the default(s).
See also the `revertToAndRestoreFactoryDefaults()` method.
::`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.
::`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.
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.
::`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
# 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")
}}}
import parmtuplelib
hou_parm_tuple = parmtuplelib.setParmTupleProperties(node.parm("t"))
}}}
= hou.ch =
#type: homfunction
#cppname: hom::ch
#category: Parameters
@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]
= hou.chsop =
#type: homfunction
#cppname: hom::chsop
#category: Parameters
@usage
`chsop(path) -> string`
@related
- [Hom:hou.evalParm]
@replaces
- [Exp:chsop]
= hou.evalParm =
#type: homfunction
#cppname: hom::evalParm
#category: Parameters
@usage
`evalParm(path)` -> int, float, or string
@related
- [Hom:hou.evalParmTuple]
- [Hom:hou.parm]
- [Hom:hou.parmTuple]
@replaces
- [Exp:ch]
- [Exp:chs]
= hou.evalParmTuple =
#type: homfunction
#cppname: hom::evalParmTuple
#category: Parameters
@usage
`evalParmTuple(path)` -> tuple of `int`, `float`, or `str`, or [Hom:hou.Ramp]
@related
- [Hom:hou.evalParm]
- [Hom:hou.parm]
- [Hom:hou.parmTuple]
@replaces
- [Exp:ch]
- [Exp:chramp]
- [Exp:chs]
= hou.exprLanguage =
#type: hommodule
#cppname: HOM_exprLanguage
#category: Parameters
* hou.exprLanguage.Python
* hou.exprLanguage.Hscript
= hou.fileType =
#type: hommodule
#cppname: HOM_fileType
#category: Parameters
#status: nd
* 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]
= hou.loadParmSamples =
#type: homfunction
#cppname: hom::loadParmSamples
#category: Parameters
#status: ni
@usage
`loadParmSamples(chan_or_bchan_file_name, parm_list)`
@replaces
- [Cmd:chread]
= 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.
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].
@related
- [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]
= 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>
}}}
@related
- [Hom:hou.Parm]
- [Hom:hou.evalParm]
- [Hom:hou.parmTuple_]
@replaces
- [Exp:ch]
- [Exp:chs]
- [Exp:chexist]
= 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.
{{{
#!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>
}}}
@related
- [Hom:hou.ParmTuple]
- [Hom:hou.evalParmTuple]
- [Hom:hou.parm_]
@replaces
- [Exp:ch]
- [Exp:chexist]
- [Exp:chramp]
- [Exp:chs]
= 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]
= 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
::`pinParms(parm_list)`:
#cppname: HOM_scope::pinParms
#status: ni
::`removeParms(parm_list)`:
#cppname: HOM_scope::removeParms
#status: ni
::`setToParms(parm_list)`:
#cppname: HOM_scope::setToParms
#status: ni
::`unpinParms(parm_list)`:
#cppname: HOM_scope::unpinParms
#status: ni
@replaces
- [Cmd:chaneditor]
- [Cmd:chscope]
= hou.scriptLanguage =
#type: hommodule
#cppname: HOM_scriptLanguage
#category: Parameters
#status: nd
* hou.scriptLanguage.Python
* hou.scriptLanguage.Hscript
= hou.topLevelParmGroup =
#type: homfunction
#cppname: hom::topLevelParmGroup
#category: Parameters
#status: ni
@usage
`topLevelParmGroup()` -> ParmGroup
@replaces
- [Cmd:chgls]
= hou.updateMode =
#type: hommodule
#cppname: HOM_updateMode
#category: Parameters
#status: nd
* hou.updateMode.AutoUpdate
* hou.updateMode.OnMouseUp
* hou.updateMode.Manual
= 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
::`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
- [Cmd:rkill]
- [Cmd:rps]
= 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]
= hou.RopNode =
#type: homclass
#cppname: HOM_RopNode
#superclass: hou.Node
#category: Rendering
@methods
::`bypass(self, on)`:
#cppname: HOM_RopNode::bypass
Turns the node's bypass flag on or off, making this node have no effect.
::`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.
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]
= hou.activeRenders =
#type: homfunction
#cppname: hom::activeRenders
#category: Rendering
#status: ni
@usage
`activeRenders()` -> tuple of [Hom:hou.ActiveRender]
@replaces
- [Cmd:rps]
= hou.renderMachineVariables =
#type: hommodule
#cppname: HOM_renderMachineVariables
#category: Rendering
#status: ni
@functions
::`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
@replaces
- [Cmd:rexport]
- [Cmd:rkill]
- [Cmd:rps]
= hou.renderMethod =
#type: hommodule
#cppname: HOM_renderMethod
#category: Rendering
#status: nd
* `hou.renderMethod.RopByRop`
* `hou.renderMethod.FrameByFrame`
= 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
::`interruptShellThread(self)`:
#cppname: HOM_ShellIO::interruptShellThread
#status: nd
::`setIsWaitingForCommand(self, on)`:
#cppname: HOM_ShellIO::setIsWaitingForCommand
#status: nd
::`write(self, data)`:
#cppname: HOM_ShellIO::write
#status: nd
= 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]
= hou.TextportPane =
#type: homclass
#cppname: HOM_TextportPane
#superclass: hou.Pane
#category: Scripting
#status: ni
@methods
::`textport(self)`:
#cppname: HOM_TextportPane::textport
#status: ni
= hou._addPreloadIcon =
#type: homfunction
#cppname: hom::_addPreloadIcon
#category: Scripting
@usage
`_addPreloadIcon(name, w, h)`
= hou._getArgumentAutoComplete =
#type: homfunction
#cppname: hom::_getArgumentAutoComplete
#category: Scripting
@usage
`_getArgumentAutoComplete(method_name, arguments)` -> tuple of strings
= hou.endListeningOnPort =
#type: homfunction
#cppname: hom::endListeningOnPort
#category: Scripting
#status: ni
@usage
`endListeningOnPort(port)`
@replaces
- [Cmd:closeport]
= hou.exitScript =
#type: homfunction
#cppname: hom::exitScript
#category: Scripting
#status: ni
@usage
`exitScript()`
@replaces
- [Cmd:exit]
= hou.expandString =
#type: homfunction
#cppname: hom::expandString
#category: Scripting
@usage
`expandString(str) -> string`
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.
{{{
#!pycon
>>> hou.expandString("$HIP/file.geo")
'/dir/containing/hip/file/file.geo'
>>> hou.expandString("file`$F+1`.pic")
'file2.pic'
}}}
= hou.expandStringAtFrame =
#type: homfunction
#cppname: hom::expandStringAtFrame
#category: Scripting
@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.
= hou.expressionGlobals =
#type: homfunction
#cppname: hom::expressionGlobals
#category: Scripting
@usage
`expressionGlobals()` -> dict
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
= 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]
= hou.hscriptCommandHelp =
#type: homfunction
#cppname: hom::hscriptCommandHelp
#category: Scripting
@usage
`hscriptCommandHelp(command_name)` -> string
= hou.hscriptExpandString =
#type: homfunction
#cppname: hom::hscriptExpandString
#category: Scripting
@usage
`hscriptExpandString(str) -> string`
WARNING:
This is deprecated. Use [Hom:hou.expandString] instead.
@related
- [Hom:hou.expandString]
= hou.hscriptExpression =
#type: homfunction
#cppname: hom::hscriptExpression
#category: Scripting
@usage
`hscriptExpression(expression)` -> float, string, or tuple
{{{
#!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'
}}}
@related
- [Hom:hou.hscriptFloatExpression]
- [Hom:hou.hscriptStringExpression]
- [Hom:hou.hscriptVectorExpression]
- [Hom:hou.hscriptMatrixExpression]
= hou.hscriptFloatExpression =
#type: homfunction
#cppname: hom::hscriptFloatExpression
#category: Scripting
@usage
`hscriptFloatExpression(expression)` -> float
{{{
#!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
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]
= hou.hscriptMatrixExpression =
#type: homfunction
#cppname: hom::hscriptMatrixExpression
#category: Scripting
@usage
`hscriptMatrixExpression(expression)` -> tuple of tuple of floats
{{{
#!python
xform = hou.Matrix4(hou.hscriptMatrixExpression('doptransform("/obj/dopnet1", "obj0", "Geometry")'))
}}}
@related
- [Hom:hou.hscriptExpression]
- [Hom:hou.hscriptFloatExpression]
- [Hom:hou.hscriptStringExpression]
- [Hom:hou.hscriptVectorExpression]
- [Hom:hou.Matrix3]
- [Hom:hou.Matrix4]
= hou.hscriptStringExpression =
#type: homfunction
#cppname: hom::hscriptStringExpression
#category: Scripting
@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.
{{{
#!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]
= hou.hscriptVectorExpression =
#type: homfunction
#cppname: hom::hscriptVectorExpression
#category: Scripting
@usage
`hscriptVectorExpression(expression)` -> tuple of floats
{{{
#!python
vector = hou.Vector3(hou.hscriptVectorExpression('vtorigin("/obj/geo1", "/obj/geo2")'))
print vector.length()
}}}
@related
- [Hom:hou.hscriptExpression]
- [Hom:hou.hscriptFloatExpression]
- [Hom:hou.hscriptStringExpression]
- [Hom:hou.hscriptMatrixExpression]
- [Hom:hou.Vector2]
- [Hom:hou.Vector3]
- [Hom:hou.Vector4]
= hou.listenOnPortAndBlockUntilClosed =
#type: homfunction
#cppname: hom::listenOnPortAndBlockUntilClosed
#category: Scripting
#status: ni
@usage
`listenOnPortAndBlockUntilClosed(port, ipmask='+.+.+.+', safety=AllowAllCommands, language=hou.scriptLanguage.Python)`
@replaces
- [Cmd:openport]
= 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]
= hou.runTcl =
#type: homfunction
#cppname: hom::runTcl
#category: Scripting
#status: ni
@usage
`runTcl(file_name)`
@replaces
- [Cmd:tcl]
= hou.runTclTk =
#type: homfunction
#cppname: hom::runTclTk
#category: Scripting
#status: ni
@usage
`runTclTk(file_name)`
@replaces
- [Cmd:tk]
= hou.startListeningOnPort =
#type: homfunction
#cppname: hom::startListeningOnPort
#category: Scripting
#status: ni
@usage
`startListeningOnPort(port, ipmask='+.+.+.+', safety=AllowAllCommands, language=hou.scriptLanguage.Python)`
@replaces
- [Cmd:openport]
= hou.stopNonDaemonJavaProcesses =
#type: homfunction
#cppname: hom::stopNonDaemonJavaProcesses
#category: Scripting
#status: ni
@usage
`stopNonDaemonJavaProcesses()`
@replaces
- [Cmd:java]
= hou.tempVarStack =
#type: homfunction
#cppname: hom::tempVarStack
#category: Scripting
#status: ni
@usage
`tempVarStack()`
= hou.unusedPort =
#type: homfunction
#cppname: hom::unusedPort
#category: Scripting
#status: ni
@usage
`unusedPort(start_port=None)`
@replaces
- [Cmd:openport]
= 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
= 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
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
::`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]
= hou.ShelfElement =
#type: homclass
#cppname: HOM_ShelfElement
#category: Shelf
#status: nd
@methods
::`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
= 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
= hou.Tool =
#type: homclass
#cppname: HOM_Tool
#superclass: hou.ShelfElement
#category: Shelf
#status: nd
@methods
::`destroy(self)`:
#cppname: HOM_Tool::destroy
#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
::`setToolMenuLocations(self, locations)`:
#cppname: HOM_Tool::setToolMenuLocations
#status: ni
= hou.shelves =
#type: hommodule
#cppname: HOM_shelves
#category: Shelf
#status: nd
@functions
::`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
= hou.Take =
#type: homclass
#cppname: HOM_Take
#category: Takes
#status: ni
@methods
::`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
::`allAllParmsOfNode(self, node)`:
#cppname: HOM_Take::allAllParmsOfNode
#status: ni
::`asCode(self)`:
#cppname: HOM_Take::asCode
#status: ni
::`asXML(self)`:
#cppname: HOM_Take::asXML
#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
::`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
::`removeAllParmsOfNode(self, node)`:
#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
::`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]
= hou.takes =
#type: hommodule
#cppname: HOM_takes
#category: Takes
#status: ni
@functions
::`prefixForNewTakeNames()`:
#cppname: HOM_takes::prefixForNewTakeNames
#status: ni
::`setCurTake(take)`:
#cppname: HOM_takes::setCurTake
#status: ni
::`setPrefixForNewTakeNames()`:
#cppname: HOM_takes::setPrefixForNewTakeNames
#status: ni
@replaces
- [Cmd:takename]
- [Cmd:takels]
- [Cmd:takeset]
= hou.TimeGroup =
#type: homclass
#cppname: HOM_TimeGroup
#category: Timeline
#status: ni
@methods
::`clear(self)`:
#cppname: HOM_TimeGroup::clear
#status: ni
::`destroy(self)`:
#cppname: HOM_TimeGroup::destroy
#status: ni
::`handleFrame(self)`:
#cppname: HOM_TimeGroup::handleFrame
#status: ni
::`name(self)`:
#cppname: HOM_TimeGroup::name
#status: ni
::`setHandleFrame(self, frame)`:
#cppname: HOM_TimeGroup::setHandleFrame
#status: ni
::`setName(self, name)`:
#cppname: HOM_TimeGroup::setName
#status: ni
@replaces
- [Cmd:tmgls]
- [Cmd:tmgname]
- [Cmd:tmgop]
- [Cmd:tmgrm]
- [Cmd:tmgshift]
= hou.addTimeGroup =
#type: homfunction
#cppname: hom::addTimeGroup
#category: Timeline
#status: ni
@usage
`addTimeGroup(name, handle_frame)` -> TimeGroup
@replaces
- [Cmd:tmgadd]
= hou.decrementFrame =
#type: homfunction
#cppname: hom::decrementFrame
#category: Timeline
#status: ni
@usage
`decrementFrame()`
= hou.findTimeGroup =
#type: homfunction
#cppname: hom::findTimeGroup
#category: Timeline
#status: ni
@usage
`findTimeGroup(name)` -> TimeGroup
= hou.fps =
#type: homfunction
#cppname: hom::fps
#category: Timeline
@usage
`fps()` -> float
@related
- [Hom:hou.setFps]
- [Hom:hou.frame]
- [Hom:hou.time]
@replaces
- [Cmd:fps]
= hou.frame =
#type: homfunction
#cppname: hom::frame
#category: Timeline
@usage
`frame()` -> `float`
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'
}}}
{{{
#!pycon
>>> hou.setFrame(13.193)
>>> 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]
= hou.frameToTime =
#type: homfunction
#cppname: hom::frameToTime
#category: Timeline
@usage
`frameToTime(frame)` -> float
@related
- [Hom:hou.fps]
- [Hom:hou.time]
- [Hom:hou.frame]
@replaces
- [Cmd:fps]
= hou.frameToTimecode =
#type: homfunction
#cppname: hom::frameToTimecode
#category: Timeline
#status: ni
@usage
`frameToTimecode(frame)`
@replaces
- [Cmd:ftimecode]
= hou.globalFrameRange() =
#type: homfunction
#cppname: hom::globalFrameRange
#category: Timeline
#status: ni
@usage
`globalFrameRange()`
@replaces
- [Cmd:fset]
- [Cmd:tset]
= hou.goToFirstFrame =
#type: homfunction
#cppname: hom::goToFirstFrame
#category: Timeline
#status: ni
@usage
`goToFirstFrame()`
= hou.goToLastFrame =
#type: homfunction
#cppname: hom::goToLastFrame
#category: Timeline
#status: ni
@usage
`goToLastFrame()`
= hou.goToNextKeyframe =
#type: homfunction
#cppname: hom::goToNextKeyframe
#category: Timeline
#status: ni
@usage
`goToNextKeyframe()`
@replaces
- [Cmd:nextkey]
= hou.goToPreviousKeyframe =
#type: homfunction
#cppname: hom::goToPreviousKeyframe
#category: Timeline
#status: ni
@usage
`goToPreviousKeyframe()`
@replaces
- [Cmd:nextkey]
= hou.incrementFrame =
#type: homfunction
#cppname: hom::incrementFrame
#category: Timeline
#status: ni
@usage
`incrementFrame()`
= hou.intFrame =
#type: homfunction
#cppname: hom::intFrame
#category: Timeline
@usage
`intFrame()` -> `int`
@related
- [Hom:hou.frame]
- [Hom:hou.setFrame]
- [Hom:hou.time]
- [Hom:hou.fps]
@replaces
- [Cmd:fcur]
= 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
::`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
#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]
= hou.setFps =
#type: homfunction
#cppname: hom::setFps
#category: Timeline
@usage
`setFps(fps)`
@related
- [Hom:hou.fps]
@replaces
- [Cmd:fps]
= 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]
= hou.setGlobalFrameRange =
#type: homfunction
#cppname: hom::setGlobalFrameRange
#category: Timeline
#status: ni
@usage
`setGlobalFrameRange(start, end)`
@replaces
- [Cmd:fset]
- [Cmd:tset]
= hou.setPlaybackFrameRange =
#type: homfunction
#cppname: hom::setPlaybackFrameRange
#category: Timeline
#status: ni
@usage
`setPlaybackFrameRange(start, end)`
= hou.setTime =
#type: homfunction
#cppname: hom::setTime
#category: Timeline
@usage
`setTime(time)`
@related
- [Hom:hou.time]
- [Hom:hou.setFrame]
@replaces
- [Cmd:tcur]
= hou.time =
#type: homfunction
#cppname: hom::time
#category: Timeline
@usage
`time()` -> float
@related
- [Hom:hou.setTime]
- [Hom:hou.frame]
- [Hom:hou.fps]
@replaces
- [Cmd:tcur]
= hou.timeGroups =
#type: homfunction
#cppname: hom::timeGroups
#category: Timeline
#status: ni
@usage
`timeGroups()` -> tuple of TimeGroups
@replaces
- [Cmd:tmgls]
= 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
@related
- [Hom:hou.fps]
- [Hom:hou.frame]
- [Hom:hou.time]
@replaces
- [Cmd:fps]
= hou.timecodeToFrame =
#type: homfunction
#cppname: hom::timecodeToFrame
#category: Timeline
#status: ni
@usage
`timecodeToFrame(timecode)`
@replaces
- [Cmd:ftimecode]
= 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]
= hou.Desktop =
#type: homclass
#cppname: HOM_Desktop
#category: UI
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].
@methods
::`setAsCurrent(self)`:
#cppname: HOM_Desktop::setAsCurrent
#replaces: Cmd:desk
Make this desktop the currently selected one. See also
[Hom:hou.ui#desktops].
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.
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.
The name may optionally be prefixed by the desktop name and a period.
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.
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)
}}}
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.
::`homePage(self)`:
#cppname: HOM_Desktop::homePage
#replaces: Cmd:helpbrowser
#status: ni
::`setHomePage(self, home_page)`:
#cppname: HOM_Desktop::setHomePage
#replaces: Cmd:helpbrowser
#status: ni
::`setPathForAllPaneTabs(self, path)`:
#cppname: HOM_Desktop::setPathForAllPanes
#replaces: Cmd:panepath
#status: ni
= hou.FloatingPanel =
#type: homclass
#cppname: HOM_FloatingPanel
#category: UI
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
::`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.
particular pane tab, and these stripped down floating panels do not contain
any panes.
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.
::`close(self)`:
#cppname: HOM_FloatingPanel::close
Close the floating panel's window, closing all the pane tabs inside it.
::`attachToDesktop(self, on)`:
#cppname: HOM_FloatingPanel::attachToDesktop
Attach this panel to the desktop. See
[Hom:hou.FloatingPanel#isAttachedToDesktop] for more information.
::`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.
::`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.
::`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.
::`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.
::`setIsFullscreen(self, on)`:
#cppname: HOM_FloatingPanel::setIsFullscreen
Set whether or not this panel is in fullscreen mode.
= 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]
= hou.IPRViewer =
#type: homclass
#cppname: HOM_IPRViewer
#superclass: hou.Pane
#category: UI
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 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
::`enableIPR(self, on)`:
#cppname: HOM_IPRViewer::enableIPR
#replaces: Exp:iprquery
Check or uncheck the Preview checkbox.
::`setAutoUpdate(self, on)`:
#cppname: HOM_IPRViewer::setAutoUpdate
#replaces: Cmd:iprview
Check or uncheck the Auto-Update checkbox.
::`setDelay(self, time)`:
#cppname: HOM_IPRViewer::setDelay
#replaces: Cmd:iprview
Set the contents of the viewer's Delay field.
::`setUpdateTime(self, time)`:
#cppname: HOM_IPRViewer::setUpdateTime
Set the contents of the viewer's Update Time field.
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.).
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()
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.")
}}}
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)`.
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)
}}}
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)
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`.
= 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)`:
#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]
= hou.NetworkEditor =
#type: homclass
#cppname: HOM_NetworkEditor
#superclass: hou.PathBasedPaneTab
#category: UI
#status: nd
@methods
::`homeToSelection(self)`:
#cppname: HOM_NetworkEditor::homeToSelection
Centers the nodes within the network editor to show the current
selection.
::`setGroupDialogSplitFraction(self, fraction)`:
#cppname: HOM_NetworkEditor::setGroupDialogSplitFraction
#status: ni
::`setListMode(self, list_mode)`:
#cppname: HOM_NetworkEditor::setListMode
#status: nd
::`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]
= hou.NetworkGraph =
#type: homclass
#cppname: HOM_NetworkGraph
#category: UI
#status: ni
@methods
::`centerOnPosition(self, x, y)`:
#cppname: HOM_NetworkGraph::centerOnPosition
#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
::`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
#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]
= 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]
= 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
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.
::`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
::`swapWithPane(self, pane)`:
#cppname: HOM_Pane::swapWithPane
#replaces: Cmd:desk
#status: ni
= hou.PaneTab =
#type: homclass
#cppname: HOM_PaneTab
#category: UI
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
::`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.
::`close(self)`:
#cppname: HOM_PaneTab::close
#replaces: Cmd:pane
Close the pane tab.
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.
::`setIsCurrentTab(self)`:
#cppname: HOM_PaneTab::setIsCurrentTab
Set this tab as the selected tab in the containing pane.
::`setLinkGroup(self, group)`:
#cppname: HOM_PaneTab::setLinkGroup
Set the link group membership of this pane tab.
::`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)
}}}
= 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]
= 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)`:
#cppname: HOM_ParmSpreadsheetPane::showTreeView
#status: ni
@replaces
- [Cmd:parmsheet]
= 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
::`followsParent(self)`:
#cppname: HOM_PathBasedPaneTab::followsParent
#status: ni
::`removeBookmarks(self, path_pattern)`:
#cppname: HOM_PathBasedPaneTab::removeBookmarks
#status: ni
::`setCurrentNode(self, node)`:
#cppname: HOM_PathBasedPaneTab::setCurrentNode
#status: nd
::`setFollowParent(self, on)`:
#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]
= 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]
= hou.fileChooserMode =
#type: hommodule
#cppname: HOM_fileChooserMode
#category: UI
* hou.fileChooserMode.Read
* hou.fileChooserMode.Write
* hou.fileChooserMode.ReadAndWrite
= hou.isUIAvailable =
#type: homfunction
#cppname: isUIAvailable
#category: UI
@usage
`isUIAvailable()` -> bool
@related
- [Hom:hou.ui]
= hou.paneLinkType =
#type: hommodule
#cppname: HOM_paneLinkType
#category: UI
#status: nd
* 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
= hou.paneTabType =
#type: hommodule
#cppname: HOM_paneTabType
#category: UI
#status: nd
* 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
= hou.reloadChannelGroupMenuFile =
#type: homfunction
#cppname: hom::reloadChannelGroupMenuFile
#category: UI
#status: ni
@usage
`reloadChannelGroupMenuFile()`
@replaces
- [Cmd:menurefresh]
= hou.reloadNodeMenuFile =
#type: homfunction
#cppname: hom::reloadNodeMenuFile
#category: UI
#status: ni
@usage
`reloadNodeMenuFile()`
@replaces
- [Cmd:menurefresh]
= hou.reloadParmMenuFile =
#type: homfunction
#cppname: hom::reloadParmMenuFile
#category: UI
#status: ni
@usage
`reloadParmMenuFile()`
@replaces
- [Cmd:menurefresh]
= hou.severityType =
#type: hommodule
#cppname: HOM_severityType
#category: UI
#status: nd
* hou.severityType.Message
* hou.severityType.Warning
* hou.severityType.Error
* hou.severityType.Fatal
= hou.ui =
#type: hommodule
#cppname: HOM_ui
#category: UI
@functions
::`addDesktop(name)`:
#cppname: HOM_ui::addDesktop
#replaces: Cmd:desk
#status: ni
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.
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.
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()
}}}
message:
The message to display above the text field.
severity:
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.
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.
message:
The message to display above the list box.
title:
The window's title. If `None`, the title is "Houdini".
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.
::`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())
}}}
#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.
::`processPendingEvents()`:
#cppname: HOM_ui::update
#replaces: updateui
#status: ni
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
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.
::`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
= hou.BoundingBox =
#type: homclass
#cppname: HOM_BoundingBox
#category: Utility
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
::`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.
::`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.
= hou.Color =
#type: homclass
#cppname: HOM_Color
#category: Utility
#status: nd
@methods
::`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
#status: nd
@replaces
- [Exp:rgb]
= hou.Matrix3 =
#type: homclass
#cppname: HOM_Matrix3
#category: Utility
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]]>
Note that Houdini's matrices are stored in row-major order, so the matrix's
contents are grouped by row.
Raises IndexError if the row or column are not between 0 and 2, inclusive.
Note that negative indices will not index from the end.
Raises IndexError if the row or column are not between 0 and 2, inclusive.
Note that negative indices will not index from the end.
::`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.
::`setToIdentity(self)`:
#cppname: HOM_Matrix3::setToIdentity
Set this matrix to the multiplicative identity, having 1's in the diagonal.
::`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()`.
rotate_order:
= hou.Matrix4 =
#type: homclass
#cppname: HOM_Matrix4
#category: Utility
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`.
`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
{{{
#!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())
}}}
{{{
#!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]]>
Note that Houdini's matrices are stored in row-major order, so the matrix's
contents are grouped by row.
Raises IndexError if the row or column are not between 0 and 3, inclusive.
Note that negative indices will not index from the end.
Raises IndexError if the row or column are not between 0 and 3, inclusive.
Note that negative indices will not index from the end.
::`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.
::`setToIdentity(self)`:
#cppname: HOM_Matrix4::setToIdentity
#replaces: Exp:identity
Set this matrix to the multiplicative identity, having 1's in the diagonal.
::`setToZero(self)`:
#cppname: HOM_Matrix4::setToZero
#replaces: Exp:mzero
Set this matrix to contain all zeros.
Note that you can construct a new matrix with all zeros with
`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.
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.
pivot:
A Vector3 containing a position about which rotations and scales are
performed. By default, this parameter is set to the origin.
{{{
#!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]>
}}}
= hou.Quaternion =
#type: homclass
#cppname: HOM_Quaternion
#category: Utility
#status: nd
@methods
::`setTo(self, tuple)`:
#cppname: HOM_Quaternion::setTo
#status: nd
= 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
`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.
{{{
#!pycon
>>> lin = hou.rampBasis.Linear
::`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.
@related
- [Vex:spline]
= hou.ShopNodeType =
#type: homclass
#cppname: HOM_ShopNodeType
#superclass: hou.NodeType
#category: Utility
@methods
= hou.Vector2 =
#type: homclass
#cppname: HOM_Vector2
#category: Utility
"""A sequence of 2 floating point values, with associated mathematical
operations."""
@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).
{{{
#!pycon
>>> v = hou.Vector2((1.0, 2.0))
>>> v[-1]
2.0
}}}
{{{
#!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.
If the vector's length is 0 (or close to it), the result is the original
vector.
= hou.Vector3 =
#type: homclass
#cppname: HOM_Vector3
#category: Utility
"""A sequence of 3 floating point values, with associated mathematical
operations."""
@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).
{{{
#!pycon
>>> v = hou.Vector3((1.0, 2.0, 3.0))
>>> v[-1]
3.0
}}}
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.
# 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]>
}}}
{{{
#!pycon
>>> v = hou.Vector3(1, 2, 3)
>>> v * 2
<hou.Vector3 [2, 4, 6]>
>>> 2 * v
<hou.Vector3 [2, 4, 6]>
}}}
If the vector's length is 0 (or close to it), the result is the original
vector.
#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.
= hou.Vector4 =
#type: homclass
#cppname: HOM_Vector4
#category: Utility
"""A sequence of 4 floating point values, with associated mathematical
operations."""
@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.
::`setTo(self, sequence)`:
#cppname: HOM_Vector4::setTo
Set the contents of this vector to a sequence of floats.
{{{
#!pycon
>>> v = hou.Vector4(1, 2, 3, 4)
>>> v * 2
<hou.Vector3 [2, 4, 6, 8]>
>>> 2 * v
<hou.Vector3 [2, 4, 6, 8]>
}}}
If the vector's length is 0 (or close to it), the result is the original
vector.
#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]`.
= hou.colorType =
#type: hommodule
#cppname: HOM_colorType
#category: Utility
#status: nd
* hou.colorType.RGB
* hou.colorType.LAB
* hou.colorType.HSL
* hou.colorType.HSV
* hou.colorType.XYZ
= hou.rampBasis =
#type: hommodule
#cppname: HOM_rampBasis
#category: Utility
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.
= hou.rampParmType =
#type: hommodule
#cppname: HOM_rampParmType
#category: Utility
#status: nd
* hou.rampParmType.Color
* hou.rampParmType.Float
= hou.VexContext =
#type: homclass
#cppname: HOM_VexContext
#category: VEX
#status: nd
@methods
@replaces
- [Cmd:vexinfo]
= hou.endVexProfiling =
#type: homfunction
#cppname: hom::endVexProfiling
#category: VEX
#status: ni
@usage
`endVexProfiling()` -> string
= hou.reloadAllScriptAndVexNodeTypes =
#type: homfunction
#cppname: hom::reloadAllScriptAndVexNodeTypes
#category: VEX
#status: ni
@usage
`reloadAllScriptAndVexNodeTypes()`
= hou.startVexProfiling =
#type: homfunction
#cppname: hom::startVexProfiling
#category: VEX
#status: ni
@usage
`startVexProfiling(check_for_nans=False, function_types=None)`
= hou.vexContextForNodeTypeCategory =
#type: homfunction
#cppname: hom::vexContextForNodeTypeCategory
#category: VEX
#status: nd
@usage
`vexContextForNodeTypeCategory(node_type_category)` -> VexContext or None
= hou.vexContextForShaderType =
#type: homfunction
#cppname: hom::vexContextForShaderType
#category: VEX
#status: nd
@usage
`vexContextForShaderType(shader_type)` -> VexContext or None
= hou.vexContexts =
#type: homfunction
#cppname: hom::vexContexts
#category: VEX
#status: nd
@usage
`vexContexts()` -> tuple of VexContexts
= hou.ComponentSelection =
#type: homclass
#cppname: HOM_ComponentSelection
#category: Viewer
#status: ni
@methods
#cppname: HOM_ComponentSelection::primitiveTypes
#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
= hou.ConstructionPlane =
#type: homclass
#cppname: HOM_ConstructionPlane
#category: Viewer
#status: ni
@methods
::`lockUpVector(self, direction)`:
#cppname: HOM_ConstructionPlane::lockUpVector
#status: ni
::`setNormal(self, normal_vector)`:
#cppname: HOM_ConstructionPlane::setNormal
#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
- [Cmd:cplane]
= hou.ContextViewer =
#type: homclass
#cppname: HOM_ContextViewer
#superclass: hou.PathBasedPaneTab
#category: Viewer
@methods
= 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
#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)`:
#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
::`showVertexNumbers(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showVertexNumbers
#status: ni
::`showVertexTextureCoordinates(self, on)`:
#cppname: HOM_GeometryDisplayToggles::showVertexTextureCoordinates
#status: ni
@replaces
- [Cmd:viewdisplay]
= hou.GeometrySelection =
#type: homclass
#cppname: HOM_GeometrySelection
#category: Viewer
#status: nd
@methods
::`shrinkSelection(checkuv = true)`:
#cppname: HOM_GeometrySelection::shrinkSelection
#status: nd
::`growSelection(isview3d = true)`:
#cppname: HOM_GeometrySelection::growSelection
#status: nd
#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
= 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
::`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
::`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
@replaces
- [Cmd:viewcamera]
- [Cmd:viewhome]
- [Cmd:viewwrite]
= 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
#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
::`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
#cppname: HOM_GeometryViewportSettings::colorScheme
#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
::`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
::`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
#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)`:
#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
::`name(self)`:
#cppname: HOM_GeometryViewportSettings::name
#status: ni
::`nearClippingPlane(self)`:
#cppname: HOM_GeometryViewportSettings::nearClippingPlane
#status: ni
::`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
::`pixelAspectRatio(self)`:
#cppname: HOM_GeometryViewportSettings::pixelAspectRatio
#status: ni
::`projectedTextures(self)`:
#cppname: HOM_GeometryViewportSettings::projectedTextures
#status: ni
::`removesBackfaces(self)`:
#cppname: HOM_GeometryViewportSettings::removesBackfaces
#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.
::`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
::`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
::`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)`:
#cppname: HOM_GeometryViewportSettings::setFarClippingPlane
#status: ni
::`setFilterBGImages(self, on)`:
#cppname: HOM_GeometryViewportSettings::setFilterBGImages
#status: ni
::`setFocalLength(self, length)`:
#cppname: HOM_GeometryViewportSettings::setFocalLength
#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
::`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
::`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
#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)`:
#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
::`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
::`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
#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
#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
::`visibleObjectsMask(self)`:
#cppname: HOM_GeometryViewportSettings::visibleObjectsMask
#status: ni
::`windowHeight(self)`:
#cppname: HOM_GeometryViewportSettings::windowHeight
#status: ni
::`windowSizeScale(self)`:
#cppname: HOM_GeometryViewportSettings::windowSizeScale
#status: ni
::`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]
= hou.HandleBinding =
#type: homclass
#cppname: HOM_HandleBinding
#category: Viewer
#status: ni
@methods
::`destroy(self)`:
#cppname: HOM_HandleBinding::destroy
#status: ni
::`name(self)`:
#cppname: HOM_HandleBinding::name
#status: ni
::`save(self, bindings_file_name)`:
#cppname: HOM_HandleBinding::save
#status: ni
::`saveAppendingToFile(self, bindings_file_name)`:
#cppname: HOM_HandleBinding::saveAppendingToFile
#status: ni
@replaces
- [Cmd:ombind]
- [Cmd:omparm]
- [Cmd:omunbind]
= 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
@replaces
- [Cmd:omunbind]
= hou.HandleType =
#type: homclass
#cppname: HOM_HandleType
#category: Viewer
#status: ni
::`name(self)`:
#cppname: HOM_HandleType::name
#status: ni
@replaces
- [Cmd:omls]
= hou.ParticleSelection =
#type: homclass
#cppname: HOM_ParticleSelection
#category: Viewer
#status: nd
@methods
= hou.ParticleViewer =
#type: homclass
#cppname: HOM_ParticleViewer
#category: Viewer
#status: nd
@methods
::`enterCurrentNodeState(self, wait_for_exit=False)`:
#cppname: HOM_ParticleViewer::enterCurrentNodeState
#status: nd
::`enterViewState(self, wait_for_exit=False)`:
#cppname: HOM_ParticleViewer::enterViewState
#status: nd
= hou.PersistentHandle =
#type: homclass
#cppname: HOM_PersistentHandle
#category: Viewer
#status: ni
@methods
::`asCode(self)`:
#cppname: HOM_PersistentHandle::asCode
#status: ni
::`clearParmBindings(self)`:
#cppname: HOM_PersistentHandle::clearParmBindings
#status: ni
::`destroy(self)`:
#cppname: HOM_PersistentHandle::destroy
#status: ni
::`isShownForChildNode(self)`:
#cppname: HOM_PersistentHandle::isShownForChildNode
#status: ni
::`isShownForParentNodes(self)`:
#cppname: HOM_PersistentHandle::isShownForParentNodes
#status: ni
::`isShownForSiblingNodes(self)`:
#cppname: HOM_PersistentHandle::isShownForSiblingNodes
#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
::`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
#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]
= 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
= 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."""
@methods
::`destroy(self)`:
#cppname: HOM_Selector::destroy
#replaces: Cmd:omsunbind
Remove this selector from its node type.
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.
continue
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.
= hou.ViewerState =
#type: homclass
#cppname: HOM_ViewerState
#category: Viewer
#status: nd
@methods
= hou.componentType =
#type: hommodule
#cppname: HOM_componentType
#category: Viewer
#status: ni
* hou.componentType.Point
* hou.componentType.Primitive
* hou.componentType.Edge
* hou.componentType.Vertex
* hou.componentType.Breakpoint
= hou.connectivityType =
#type: hommodule
#cppname: HOM_connectivityType
#category: Viewer
#status: nd
* hou.connectivityType.NoConnectivity
* hou.connectivityType.Texture
* hou.connectivityType.Position
= hou.forceViewportUpdate =
#type: homfunction
#cppname: hom::forceViewportUpdate
#category: Viewer
#status: ni
@usage
`forceViewportUpdate()`
@replaces
- [Cmd:viewupdate]
= hou.geometryViewportType =
#type: hommodule
#cppname: HOM_geometryViewportType
#category: Viewer
#status: nd
* hou.geometryViewportType.Perspective
* hou.geometryViewportType.Top
* hou.geometryViewportType.Bottom
* hou.geometryViewportType.Front
* hou.geometryViewportType.Back
* hou.geometryViewportType.Right
* hou.geometryViewportType.Left
* hou.geometryViewportType.UV
= hou.handleBindings =
#type: hommodule
#cppname: HOM_handleBindings
#category: Viewer
#status: ni
@functions
::`clear()`:
#cppname: HOM_handleBindings::clear
#status: ni
::`mergeFromFile(bindings_file_name)`:
#cppname: HOM_handleBindings::mergeFromFile
#status: ni
::`save(bindings_file_name)`:
#cppname: HOM_handleBindings::save
#status: ni
@replaces
- [Cmd:ombind]
- [Cmd:ombindinfo]
- [Cmd:omls]
- [Cmd:omwhere]
- [Cmd:omwrite]
= hou.persistentHandles =
#type: hommodule
#cppname: HOM_persistentHandles
#category: Viewer
#status: ni
@functions
@replaces
- [Cmd:pomadd]
- [Cmd:pomls]
= hou.positionType =
#type: hommodule
#cppname: HOM_positionType
#category: Viewer
#status: nd
"""Enumeration of spaces."""
* hou.positionType.WorldSpace
* hou.positionType.ViewportXY
* hou.positionType.ViewportUV
= 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
@replaces
- [Cmd:omsbind]
- [Cmd:omsbindinfo]
- [Cmd:omsls]
- [Cmd:omswhere]
= hou.setViewportUpdateMode =
#type: homfunction
#cppname: hom::setViewportUpdateMode
#category: Viewer
#status: ni
@usage
`setViewportUpdateMode(mode)`
@replaces
- [Cmd:viewupdate]
= hou.shadingMode =
#type: hommodule
#cppname: HOM_shadingMode
#category: Viewer
#status: ni
* 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
= hou.viewportUpdateMode =
#type: homfunction
#cppname: hom::viewportUpdateMode
#category: Viewer
#status: ni
@usage
`viewportUpdateMode()`
@replaces
- [Cmd:viewupdate]
= snappingMode =
#type: hommodule
#cppname: HOM_snappingMode
#category: Viewer
* hou.snappingMode.Off
* hou.snappingMode.Grid
* hou.snappingMode.Prim
* hou.snappingMode.Point
* hou.snappingMode.Multi
See [Hom:hou.SceneViewer#snappingMode].
= 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
::`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
::`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]