|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 Asset…, click Python type, set Network type to "Compositing Generator" or "Composting Filter"). This example defines a Python COP 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 which ships with Houdini.
$HFS/houdini/help/files/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.