|On this page|
This node lets you isolate context option values to a specific section of the network.
Counter-intuitively, the options are set on the node at the end of the block, not this node. See the Edit Context Options node.
At the start of the block, the new context options/values are pushed onto a "stack". Within the block, lookups for the context options use values set in this node. At the end of the block, these context options are "popped" off the stack, so the previous values come back into effect. This allows you to hierarchically modify context values if necessary.
For example, consider the following network, where two nested context option blocks redefine the value of the context option
foo within the bounds of the block:
Global context options: foo = 5 [optionblock_begin_a] foo = 10 | [node] foo = 10 | [optionblock_begin_b] foo = 20 | [node] foo = 20 | [optionblock_end_b] foo = 20 | [node] foo = 10 | [optionblock_end_b] foo = 10 foo = 5
Houdini draws a hull around the nodes in the block in the network editor to help visualize where the context options are valid.
The For Each block is built from this node. It uses context options to track the current iteration.
A context option block can be useful inside a subnetwork or HDA, where you may want to use context options, but you don’t want those internal context options to "leak" out of the subnetwork to the nodes further up the cook chain.
An Edit Context Options node sets/edits the values of context options for all nodes above it in the network. If you turn on its Create option block parameter and put a Begin Context Options Block node before it in the chain, it creates a block instead and only sets/edits the option within that block. See Edit Context Options for more information.
Perform Layer Break
Whether to start a new active USD layer for nodes inside the block. This is the same as adding a Layer Break node above the block, however this is so often what you want that it was added as an option on this node as a convenience.