On this page |
Overview ¶
You can create a named “bundle” of nodes and use that name prefixed with a @ sign (for example, @lights
) to stand for the contents of the bundle in any parameter that accepts a list of nodes.
Tip
Bundles were originally created to help with light linking. However, the current recommended way to do automatic light linking is to use categories, which are work through tagging rather than explicitly building lists of nodes.
Bundles may still be useful in certain circumstances.
The bundle list shows all bundles in the current scene. Bundles are groups of nodes, potentially from different networks. Bundles let you refer to a group of nodes by name instead of listing them explicitly. Bundles are especially useful for light linking.
To use a bundle anywhere Houdini expects a list of nodes by using @‹bundle›
. For example, if you have a bundle named keylights
, you can use @keylights
to refer to it in a light mask.
Bundles will only show in choice menus when the filter is set appropriately. For example, for a choice menu that only accept objects (such as Candidate Objects in a ROP), the filter in the bundle needs to be set to Geometry Only.
Normal (manual) bundles ¶
You can set the contents of normal bundles by dragging nodes onto the bundle in the bundle list pane or by using the toolbar buttons (see below).
To... | Do this |
---|---|
Create a new bundle |
Choose Bundle ▸ New Bundle, or click New Bundle in the toolbar. |
Create a bundle from the current selection |
Right-click the network editor background and choose Add ▸ Add bundle. |
Make a bundle only able to contain certain types of nodes |
Select the bundle in the list on the left and use the Filter menu at the bottom. |
Add nodes to a bundle |
Drag the node(s) from a network editor and drop it on the bundle name in the list on the left. or
|
Remove a node from a bundle |
or
|
View and edit the flags of nodes in a bundle |
|
Rename a bundle |
Click the bundle’s name in the list on the left. |
Duplicate an existing bundle |
Select the bundle in the bundle list pane and choose Bundle ▸ Duplicate. |
Merge the contents of multiple bundles into a single bundle |
Select the bundles you want to merge in the bundle list pane and choose Bundle ▸ Merge. |
Delete a bundle |
Select the bundle in the bundle list pane and choose Bundle ▸ Delete. |
Convert Normal Bundle to Smart Bundle |
Select the bundle in the bundle list pane and choose Bundle ▸ Convert To Smart Bundle. |
Toolbar ¶
Creates a new bundle.
Creates a new smart bundle (see below).
Set the contents of the displayed bundle to the current selection.
Adds the current selection to the displayed bundle.
Removes the current selection from the displayed bundle.
Turns the select flag on or off for all nodes in the bundle that have the flag.
Turns the display flag on or off for all nodes in the bundle that have the flag.
Turns the bypass flag on or off for all nodes in the bundle that have the flag.
Turns the template flag on or off for all nodes in the bundle that have the flag.
Turns the expose flag on or off for all nodes in the bundle that have the flag.
Selects the contents of the displayed bundle.
Adds the contents of the displayed bundle to the current selection.
Removes the contents of the displayed bundle from the current selection.
Smart bundles ¶
Normally you define the contents of bundles by dragging nodes onto the bundle in the bundle list pane. However, you can also define smart bundles. These are like smart playlists in iTunes: they automatically include all nodes that match a pattern you define.
To... | Do this |
---|---|
Create a smart bundle |
Choose Bundle ▸ New Smart Bundle, or click New Smart Bundle in the toolbar. |
Edit a smart bundle’s matching pattern |
Double-click the smart bundle’s icon. Nodes whose paths match this pattern will be put into the bundle. As nodes are created or deleted, the contents of the bundle update automatically. You can also use a space-separated list of patterns, in which a node will be included if its path matches all the patterns. |
Convert a smart bundle to a normal bundle |
|
Smart bundle patterns ¶
-
Use
*
to match any string. -
Use
?
to match any single character. -
Use
^
to match only if the following pattern doesn’t match. -
Use
%
to match anything up to but not including the next/
-
Use
(
,|
, and)
to match any of the|
separated strings you specify. -
Patterns that don’t contain a slash will match any node where the pattern matches the node’s name.
-
Putting a star at the end of a pattern, e.g.
/obj/model*
, will match nodes under/obj/
whose names start withmodel
, and any of their children, because*
matches slashes (/
) in the path.To match nodes whose names start with
model
but not their children, use the compound pattern:/obj/model* ^/obj/model*/*
. The^
in front of the second pattern means to not include nodes matching/obj/model*/*
.
Example Smart Bundle Patterns ¶
/obj/%
Match any nodes at the object level, but none of their children.
/obj/node(12|13|14)/child
Match the nodes with any of the following paths:
/obj/node12/child
, /obj/node13/child
, obj/node14/child
/obj/*/child
Match any node called “child” that is a subchild of obj. (i.e. * will match anything in between “/obj/” and “/child”)
Adapting to categories ¶
It’s possible through some scripting to use the names of the bundles an object belongs to as category names.
Try putting the following function in the Python session module (Windows ▸ Edit Python Source).
def bundleList(): node = hou.pwd() bundles = [] for b in hou.nodeBundles(): if b.containsNode(node): bundles.append(b.name()) return ' '.join(bundles)
Then put pythonexprs('hou.session.bundleList()')
in the Categories parameter of geometry nodes. You should have the bundle names showing up as categories for your objects.