press_button
Press a node's button parameter, such as Stash Input or Reload Geometry, then read its errors and warnings. Press across multiple nodes in one undoable batch, optionally cooking first.
Instructions
Press a button parameter — "Stash Input", "Reload Geometry", an asset's own Build button — and read the node's errors and warnings afterwards.
The call holds until the callback returns, with no deadline. A callback
that opens a dialog blocks Houdini's main thread and this bridge with it;
read the button's script first if in doubt. A Python callback that
RAISES does not hang anything: the bridge runs it rather than
pressButton(), and its error comes back as this call's error.
callback_route says how the press ran: python, hscript or native (a
built-in action). For a Save to Disk or a render use write_cache /
start_render, which report a verdict.
A press usually only dirties the node, so errors/warnings are from
its last cook unless cook=True; without it needs_cook says whether
they are stale (a cook that failed leaves it True too). has_script_callback is False for built-in buttons that still
do work (File's Reload, Stash's Stash Input).
A parm that is not a button and has no callback is refused: pressing it does nothing. The small action button beside a field ("Create spare parameters" on a VEXpression) runs with action=True; an action that opens a picker holds the bridge like a dialog does.
node_paths presses the same button on each node in turn (results[] per node), and set_first writes parameters on each node before its press, as set_parameters does: {"aovs": 0} then Add AOVs on eight File COPs is one call. Every node, button and parameter is checked before anything is written; the batch is one undo step and stops at a failing press, naming the nodes already pressed.
Args: node_path: Node that owns the button. parm_name: The button parameter's name. arguments: Optional kwargs handed to the callback script; values must be int, bool, float or str. cook: Cook the node after the press so errors describe the result. action: Run the parm's action button (script_action) instead of its callback. node_paths: Press the same button on each of these nodes instead of node_path. set_first: Parameter values written on each node before its press.
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": "press_button"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cook | No | ||
| action | No | ||
| arguments | No | ||
| node_path | No | ||
| parm_name | No | ||
| set_first | No | ||
| node_paths | No |