run_shelf_tool
Run a shelf tool and report the nodes it created.
Instructions
Run a shelf tool and report the nodes it created.
A tool that asks for objects takes selection, or the objects already
selected, as in Houdini. A tool that asks for anything else is retried
once as a Ctrl+click, Houdini's "place immediately" (ran_as_ctrl_click):
the Crowds Simulate tool then builds its whole default crowd. A tool that
still asks (the FLIP ocean layer, collide-with) is refused, since through
the bridge it would block Houdini until someone clicks: read the recipe
with get_shelf_tool_script and build the nodes with build_network.
Nodes the tool added inside networks that already existed (a FLIP tool
into the current POP network) are listed in created_in_existing;
current_dop_network says where DOP tools put theirs, before and after.
A tool that creates a DOP network (model_popnet) does not make it the
current one, so the next DOP tool would build into the previous network:
pass that network as dop_network.
A tool whose script fails has what it built removed, and the error names it. A dialog tool refused for its question names, when there is one, a tool that builds the same branch without asking.
Args:
tool_name: Internal tool name, from list_shelf_tools.
kwargs: Overrides merged into the synthetic kwargs the script reads.
parent_path: An extra network to watch for new nodes. /obj, /stage,
/out, /mat and /img are always watched, because a shelf tool is
free to build in more than one of them: largeOcean creates both
a geo in /obj and a LOP in /stage. A SOP network given here is
also where a SOP tool places its nodes (placed_in).
selection: Object paths the tool takes as its object selection. The
scene's selection is left as it was, whatever the tool selects.
dop_network: DOP network to make current before the run
(hou.setCurrentDopNet), where DOP tools build. It stays current
afterwards, as when an artist picks it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kwargs | No | ||
| selection | No | ||
| tool_name | Yes | ||
| dop_network | No | ||
| parent_path | No |