build_material_function_graph
Construct the node graph for a Material Function by defining nodes and connections, optionally clearing existing expressions.
Instructions
Build the internal node graph of a Material Function in one atomic call.
Same interface as build_material_graph but for Material Functions.
FunctionInput nodes use type="FunctionInput" with extra fields: input_name, input_type (Scalar/Vector2/Vector3/Vector4/Texture2D/TextureCube/ Texture2DArray/VolumeTexture/StaticBool/MaterialAttributes/TextureExternal/Bool/Substrate), description, sort_priority, use_preview_as_default, preview_value ([x,y,z,w])
FunctionOutput nodes use type="FunctionOutput" with extra fields: output_name, description, sort_priority
Connections between nodes use the same format as build_material_graph: from_node (int), from_pin (str), to_node (int), to_pin (str)
To connect a node to a FunctionOutput's input, use to_pin="" (the output has a single unnamed input pin labeled "A" internally).
Args: function_path: Full path to existing material function nodes: JSON array of node definitions connections: JSON array of connections clear_existing: Remove existing expressions before building (default True)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | ||
| connections | Yes | ||
| function_path | Yes | ||
| clear_existing | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |