Houdini 16.5 Nodes VOP nodes

If-Then Block VOP node

Contains other VOP operators.

On this page

This operator contains other VOP operators. The code for the contained operators is executed only if the value fed into the first input matches the criterion specified by the Condition parameter. At least one input must be connected to this operator.

Use this operator when you want something to happen only if a certain condition is met. The Condition Value is usually the output of a Compare operator, but any integer value can be used.

Any value that you wish to modify inside the If-Then Block operator must be provided as an input. The outputs of the If-Then Block operator will contain the modified versions of the inputs (if the condition was met) or the unmodified version of the inputs (if the condition was not met). The actual values wired into the If-Then Block operator inputs are never modified, and so can be connected to other operators in the network, but remember that the values from these operators will always be the values unmodified by the If-Then Block operator.

There is no place in this operator to specify what should happen if the condition is not met (i.e. an Else block). To achieve the same effect as an if-then-else statement, use two If operators. Connect the same output value to both Condition Value inputs of the two If-Then Block operators. Then set the Condition parameters of the two If-Then Block operators to be different. At this point one If-Then Block operator represents the "if" block, and the other represents the "else" block. Then connect your inputs to the "if" block operator. Then connect all but the Condition Value output from the "if" block into the inputs of the "else" block. Now the outputs of the "else" block are going to be what you would expect from an if-then-else statement. For simple if-then-else constructs, use the Two Way Switch operator instead.



Specifies the condition that must be met by the first input for the contained code to be executed. Either the input value must be False (equal to 0) or True (not equal to zero).


Condition Value

This integer input must be connected. The value connected to this input is compared to the requirements of the Condition parameter. Usually this input will be connected to the output of a Compare operator, or one of the logical operators (And and Or).

Next Input

Up to 64 inputs can be connected here. Each time an input is connected, a new input slot is added. All connected inputs mimic the properties of the output wired into them. They adopt the same help label and name as the output connected to them. If multiple outputs with the same name are connected, the names of the inputs are automatically incremented to make them unique.


The list of outputs depends on the inputs connected to the Subnet Output operator contained in this operator. The data type and name of each output will match the corresponding input of the Subnet Output operator.

See also

VOP nodes