connect
Change how nodes feed each other.
Instructions
Change how nodes feed each other.
Modes: connect, disconnect, reorder.
Use it after node_edit made the nodes. A list of wires goes in one undo
group and one round trip.
Do not use it to wire a node that you make now: node_edit mode "create"
takes `input_path` and wires it in the same call. Do not use it to read the
wires: scene_overview mode "network" lists them.
mode:
"connect" — src_path feeds dst_path. dst_input_index chooses the
input, src_output_index the output. Both count from 0.
A wire into an input that has one replaces it.
Either end can be a network dot.
"disconnect" — path loses the wire on input_index.
"reorder" — path takes its inputs in the order input_indices.
For several wires, give `items`: for "connect", each item has src_path and
dst_path, and can have dst_input_index and src_output_index; for
"disconnect", each item has path, and can have input_index.
Returns JSON, one line for each wire, with the paths that Houdini used.
An input index that the node does not have is reported, not dropped.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "connect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | One of "connect", "disconnect", "reorder". | connect |
| path | No | disconnect and reorder: the node whose inputs change. | |
| items | No | A list of wires for "connect" or "disconnect", each a dictionary with the keys of one wire, for example {"src_path": "/obj/geo1/grid1", "dst_path": "/obj/geo1/mountain1"}. An argument outside items is the default for each one. | |
| dst_path | No | connect: the node or network dot whose input takes the wire. | |
| src_path | No | connect: the node or network dot whose output feeds the wire. | |
| input_index | No | disconnect: the input that loses its wire, from 0. | |
| input_indices | No | reorder: the old input indices in their new order, for example [1, 0]. | |
| dst_input_index | No | connect: the input of dst_path, from 0. | |
| src_output_index | No | connect: the output of src_path, from 0. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |