|On this page|
You can create compositing node (COP) assets that are defined by a Python script instead of a subnetwork of nodes (File ▸ New operator type, click Python type, set Network type to "Compositing"). This example defines a Python SOP that copies its input, creates a Cd (diffuse color) point attribute, and assigns each point a color based on the distance to a position.
This example requires the numpy library.
$HFS/houdini/help/files/hom_cookbook/multi_stamp.hip to see the node.
You can load the pre-made asset from
multistampnode and choose Type properties to open the asset’s type properties window.
We created parameters in the Parameters tab, just as we would for a normal asset.
The Code tab contains the Python code implementing the node’s logic.