press_button
Trigger a Houdini node's button parameter, such as Stash Input or Reload Geometry, then read its errors and warnings; cook the node to refresh stale results.
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.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cook | No | ||
| action | No | ||
| arguments | No | ||
| node_path | Yes | ||
| parm_name | Yes |