Houdini 20.5 Nodes APEX nodes

BoolToIntBitMask

Constructs a bit mask from the entries of the input ports.

On this page
Since 20.0

Create a Value<Bool> node for each bit in the bit mask, where True represents a value of 1 in the bit mask, and False represents a value of 0. Connect the Value nodes to the subports of the entries variadic input in order of least significant bit to most significant bit.

The image below shows an example of the use of a bit mask to constrain a transform component:

Some example bit mask values:

Input Subports Bit Mask Int Output
entries0 = True

0001

1

entries0 = False
entries1 = False
entries2 = False
entries3 = True

1000

8

entries0 = False
entries1 = True
entries2 = False
entries3 = True

1010

10

Tip

If you plan on setting many bits in a large bit mask, it may be easier to create a single Value<Bool> node with a value of True, and another Value<Bool> node with a value of False, and make multiple connections from these Value nodes to the BoolToIntBitMask node.

Inputs

entries: VariadicArg<Bool>

Variadic input of Bool values. Each entry represents a single bit of the bit mask, with the first entry corresponding to the least significant bit.

Outputs

mask: Int

The constructed bit mask. Defaults to 0 if no input values are set.

See also

APEX nodes