[python houdini] create output(s) from node

Working in Houdini, we need NULL node all the time. It doesn’t consume memory and make the network become organized. Another advantage of Null is when we name it in UPPERCASE it will show in the first row of operator chooser list such as Object Merge node.

Creating Null is already easy in Houdini, just press “TAB” and choose “Null”. But let’s make it easier and more functional to meet some scenario.

Below are two scenarios:

In Scenario 01, it’s quite straight-forward:

  • If you select one node, the python script will create one null node with its original name and prefix is “OUT_”. Then connect to the first input.
  • If you select many nodes, the python script will create null nodes and name them according to their original nodes.

In Scenario 02, it’s more complicated:

  • If you select more-than-one node, it won’t work because we want from one single node branches out many nodes.
  • So, if you select one node and let say you want 3 OUT null nodes (1 is for density, 2 is for velocity, 3 is for hi-poly), you can input the amount number of OUT node (in this case is 3) then you can give each one OUT node a distinct name.

Here’s the video about the code and how it works in Houdini

Here’s the code:

Hope this make your houdini workflow faster.

Enjoy your weekend!