On this page |
|
Overview ¶
Houdini lets you save a set of parameter values, or a set of network items (nodes, dots, sticky notes, boxes), as a named recipe. You can then apply those parameter values, or recreate those nodes, whenever you want.
You can create four types of recipes: parameter presets, node presets, decorations, and tools.
Each recipe is created as a Data Node Type Category. When saved, Houdini stores the recipe under a digital asset library file with an .hda
extension. This lets you save recipes alongside your digital asset, so when you install a digital asset library file you also install any recipes it contains.
Tip
After you update Houdini, you can copy previous recipe.hda
files into the new Houdini version’s otls
directory if no recipe.hda
file exists yet. If a recipe.hda
file already exists in the otls
directory, the old file you copy over replaces the existing file.
You can create recipes directly from existing nodes in the network editor or create a Recipe Builder that saves its contents as a recipe.
Saving parameter presets ¶
A parameter preset saves the value of a single parameter as a recipe. This may be useful to store a large or complicated set of multiparm instances and then apply them to various parameters.
To... | Do this |
---|---|
Create a parameter preset |
|
Create a recipe that appends multiparm instances instead of replacing them |
|
Apply a parameter preset |
In the parameter editor, |
Saving node presets ¶
You can save a set of parameter values and even spare parameters on a node as a recipe, and then apply those saved parameter values to other nodes. You can then apply the preset to an existing node when you want to set those values all at once.
You can also optionally save the contents of a node as part of the recipe. This might be useful, for example, to save the dive target contents of a Pyro Solver SOP so that applying the recipe sets certain parameters on a node and also fills in the DOP network.
Note
This type of recipe is for changing the parameter values and possibly the contents of an existing node. If you just want a way to put down a certain type of node with certain parameter values and contents, use a tool recipe instead (see below).
When you save spare parameters as part of a preset, applying the preset will create those spare parameters on the target node if they don’t already exist.
To... | Do this |
---|---|
Save parameter values as a preset |
Tip If you edit the parameters in the parameter editor pane, you can click |
Apply a parameter preset to a node |
|
Edit an existing parameter preset |
|
See how to edit a preset below.
Saving decoration recipes ¶
A decoration is similar to a tool recipe, but you designate one node in the recipe as the “central” node. The central node is like a placeholder for the node the user applies the decoration to. When you apply the decoration to a “target” node in the network, Houdini does the following:
-
Applies any parameters the recipe author saved on the central node.
-
Creates the other nodes in the recipe around the target nodes.
-
Rewires connections on the target node into the appropriate nodes in the new node setup, as set by the recipe author.
For example, if you usually append nodes to sharpen the volume after a Pyro solver, you could create a tool recipe that puts down a pre-made set up of a Pyro solver plus the sharpening nodes, or you could create a decoration recipe that adds the sharpening nodes to an existing Pyro solver. Or, you could even create both, to allow you to create new setups using the tool, and add to existing setups using the decoration.
To... | Do this |
---|---|
Save a node setup as a decoration |
|
Apply a decoration to a node |
In the network editor, right-click the node, open the Recipes submenu and click the decoration you want to apply. |
See how to edit a decoration below.
Saving tool recipes ¶
A tool recipe saves a node or set of nodes, including their wiring and current parameter values, as a new tool on the tab menu. You can then choose the tool from the tab menu to recreate the saved node setup.
To... | Do this |
---|---|
Save a node or set of nodes as a tool |
|
Place the contents of a tool recipe |
Placing a tool recipe works the same as other tools that create a single node, except a recipe can create multiple nodes at once.
|
Wire the contents of a tool into or out of a node |
Starting a wire and choosing a tool recipe works the same as other tools that create a single node, except a recipe can create multiple nodes at once.
|
See how to edit a tool below.
Patterns ¶
For presets and decorations, you can choose which node types or parameters the recipe appears for in the recipe menu.
Node Type Pattern ¶
-
This applies to parameter presets, node presets, and decorations. This is either the Pattern parameter (when Show for is
Nodes Matching a Custom Pattern
) or Node Type Pattern parameter. -
The node type for which this recipe appears in the recipe menu. The default is for it to appear for the same node types as the original node (for presets) or the central node (for decorations).
-
The pattern uses standard Houdini pattern matching, as in the hou.text.patternMatch function. The
*
wildcard matches any run of characters. -
The pattern can be a space-separated list of patterns. The recipe will show for a node type whose name matches any of the patterns in the list.
-
Houdini tries to match the pattern to a node’s internal name including category, for example
acme::Sop/foobar::2.0
. -
For example, use
acme::*
to match all nodes in theacme
namespace. -
If you want to match multiple categories, such as any SOP or any DOP, you need to write a space-separated list of multiple patterns to match the possible cases, in this case SOP without namespace, SOP with namespace, DOP without namespace, and DOP with namespace:
Sop/* *:Sop/* Dop/* *:Dop/*
. -
You don’t have to use wildcards in the pattern. If you want the recipe to only show for a specific set of node types, you can simply write the internal names of those nodes in a space-separated list.
Tip
You can edit the pattern after creating the recipe, if you find a case where the pattern doesn’t match properly.
You can also use hou.text.patternMatch and hou.Node.nameWithCategory to check whether a node would match the pattern:
>>> my_pattern = "acme::*" >>> # Does this node match the pattern? >>> hou.text.patternMatches(my_pattern, hou.node("/obj/geo1/my_node").type().nameWithCategory()) True
Parm Name Pattern ¶
-
This applies to parameter presets.
-
The parameter name for which the recipe is available in the recipe menu. The default is for it to appear for the same parameter the recipe is trying to capture.
-
To match all parameters in Houdini that end with
seed
, set this to*seed
and turn off Node Type Pattern. For example, this is useful when you want to make the recipe available for all parameters that end withseed
.
Parm Type Pattern ¶
-
This applies to parameter presets.
-
The parameter type for which the recipe is available in the recipe menu. The default is for it to appear for the same parameter type the recipe is trying to capture.
-
For example, use
float integer
to show the recipe for only float and integer parameters.
Tip
To check whether a parameter type would match the pattern:
>>> my_pattern = "float" >>> # Does this node match the pattern? >>> hou.text.patternMatches(my_pattern, hou.parmTuple('/obj/geo1/scale').parmTemplate().interfaceType()) True
Choosing where to save (advanced) ¶
The Save to menu in recipe dialogs defaults to User Preferences. This saves all recipes into an asset library in your user preferences directory, which usually all you need. However, if you want to embed the recipe in an existing asset, or if you are working on a recipe to be shared (such as in a large studio), you can change where you save the recipe, and you can edit the recipe asset’s internal name.
For example, if you're making a tool for shared use in a studio, you may want to save it to a shared network drive, and give it an internal name using a studio-specific namespace and a version number, such as acme::vellum_cloth_tool::2.0
Save location ¶
To... | Do this |
---|---|
Choose where to save a recipe |
In the recipe dialog, click the Save to pop-up menu and choose one of the following: User Preferences Saves the recipe asset into Store In Same Library as ‹name› Saves the recipe into the same asset library as the source node type. This option is not available for “factory” node types installed with Houdini. $HIP/otls Directory Saves the asset into an $JOB/otls Directory Saves the asset into an Embed in Current HIP File Embeds the asset as part of the current scene file. This is sometimes useful for sharing a self-contained, working scene file. Note that this can bloat the size of the scene file. Custom File Path Choose this option, then enter the path to the asset library you want to save to in the field next to the pop-up menu, or click the file chooser icon to choose the file to save to from a file dialog. Tip After you update Houdini, you can copy previous |
Internal name ¶
Each recipe asset has a default internal name designed to prevent naming conflicts. It uses the type of the node you created the asset from as the scope, your username (or the value of $HOUDINI_AUTHOR
if it’s set) as the namespace, and an encoded version of the recipe title as the base name.
To... | Do this |
---|---|
Change the internal name when you create a recipe |
|
Editing recipes ¶
To... | Do this |
---|---|
Open the recipe manager |
In the main menus, choose Windows ▸ Recipe Manager. |
Delete a recipe |
In the recipe manager, select the recipe you want to edit and click Delete. |
Rename a recipe |
or
|
Hide a recipe |
|
Edit a recipe from the recipe manager |
Note If you edit recipes often, you may want to create them using a |
Tip
Since recipes are stored in digital assets, you can also manage them using the Asset Manager, the Type Properties Editor, and HOM functions for manipulating node types and asset definitions.
Advanced options ¶
You will not usually need to change these settings. To show them in the recipe dialog, click Show Advanced Options.
Recursively save node contents
If you turn this off, the tool or decoration will only have the top level nodes, it will not save the contents of subnetworks or unlocked assets.
Save Editable Dive Targets
Assets can specify subnetworks in their definitions as editable dive targets, where the user who created the asset instance can put their own nodes to affect how the asset works. Houdini normally saves the contents these subnetworks as part of the recipe. Turn off this option to ignore the contents of these subnetworks.
There are separate controls for saving editable contents of the central/anchor node, and saving them for all other nodes.
Save View Flags (at top level)
Normally, Houdini does not save view flags (output, display, render) as part of the recipe, because usually you don’t want applying a recipe to change them. Non-view flags (such as “frozen” or “bypass”) are always saved. You can turn on this option to save view flags as part of the recipe.
Only Save Nodes
Normally Houdini saves sticky notes, network boxes, and dots, as part of the recipe. If you turn on this option, the recipe will only save nodes, ignoring other types of network objects.
Last invoked recipe ¶
Houdini keeps a record of the last invoked recipe each time you apply a Parameter preset and Node preset recipe to a node. When you save a recipe with a submenu, the Recipe menu displays the last invoked recipe’s name alongside the submenu entry.
You can also display the last invoked recipe in a custom preset menu. See the create preset menu example for more information.
Recipe builder ¶
Another method of generating recipes is to use a Recipe Builder, which automates the creation of recipes. This lets you put the recipe contents inside a subnetwork, and preserve the content and capture settings in a HIP file.
For more information, see Recipe Builder.
Scripting ¶
See Scripting recipes for information about how to use scripts to create, apply, and run in recipes.
Recipe data format ¶
See Recipe data format for information about the data format for recipes.