viewport
viewport
¶
MCP tool definitions for Houdini viewport and UI operations.
Provides tools for inspecting and controlling Houdini's viewport panes, display modes, camera assignment, screenshot capture, network editor navigation, and error node discovery.
Functions:
| Name | Description |
|---|---|
capture_network_editor |
Capture a screenshot of the network editor. |
capture_path |
|
capture_screenshot |
Capture a screenshot of the viewport or a specific pane tab. |
find_error_nodes |
Find all nodes with errors or warnings in the scene. |
frame_all |
Frame all geometry in the viewport, or only some nodes or a box. |
frame_selection |
Frame the current selection in the viewport. |
get_viewport_info |
Get viewport settings for a pane tab. |
list_panes |
List all visible pane tabs in the Houdini UI. |
log_status |
Display a status message in Houdini's status bar. |
set_current_network |
Navigate the network editor to a network; the viewer follows it in. |
set_viewer_context |
Point the Scene Viewer at a network, and optionally a node inside it. |
set_viewport_camera |
Set the viewport to look through a specific camera. |
set_viewport_direction |
Set the viewport to a standard viewing direction, or place the free view. |
set_viewport_display |
Set how the viewport draws: shading, environment background, grid, |
set_viewport_renderer |
Set the viewport's Hydra rendering delegate for live preview. |
Functions:¶
capture_network_editor
async
¶
capture_network_editor(
ctx: Context, output_path: str | None = None, node_path: str | None = None
) -> dict
Capture a screenshot of the network editor.
With node_path the view is put on that node at once (no animated flight), and the reply says what the frame shows: visible_bounds, node_bounds and node_in_view, all in network space.
The image is written to disk only; open output_path with your file
reader to look at it. Prefer get_node_info or list_children for inspecting
node connections unless visual confirmation of wiring is genuinely needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str | None
|
Image file path. Default: a new PNG in the temp dir. |
None
|
|
str | None
|
Node path to frame before capture. |
None
|
capture_path
¶
output_path, or a fresh PNG under the temp dir when none was given.
Without it the agent had to invent a path on every capture. The temp dir is this process's, which is Houdini's machine unless FXHOUDINIMCP_BIND opened the plugin to remote clients; pass a shared path then.
capture_screenshot
async
¶
capture_screenshot(
ctx: Context,
output_path: str | None = None,
pane_name: str | None = None,
settle_seconds: float = 0,
) -> dict
Capture a screenshot of the viewport or a specific pane tab.
The image is written to disk only; open output_path with your file
reader to look at it. Prefer get_geometry_info, get_node_info or
get_scene_summary unless visual confirmation is genuinely needed.
A Scene Viewer capture names the network it shows (viewer_network);
viewer_note says when that is a DOP network, drawn as the simulation's
objects rather than the SOP display.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str | None
|
Image file path. Default: a new PNG in the temp dir. |
None
|
|
str | None
|
Pane tab name. |
None
|
|
float
|
Wait this long before capturing, without blocking Houdini, so a Karma viewport can converge after a change. Use this instead of a shell sleep between calls. Capped at 120. |
0
|
find_error_nodes
async
¶
frame_all
async
¶
frame_all(
ctx: Context,
pane_name: str | None = None,
node_paths: list[str] | None = None,
bounds: list[float] | None = None,
) -> dict
Frame all geometry in the viewport, or only some nodes or a box.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str | None
|
Pane tab name. |
None
|
|
list[str] | None
|
Frame just these objects or SOPs (their world bounds), not the spread of everything in the scene. An object frames what it draws: a null its marker, a camera or a light its icon. |
None
|
|
list[float] | None
|
Frame [xmin, ymin, zmin, xmax, ymax, zmax], world space. A
point is framed as a 1-unit cube around it ( |
None
|
frame_selection
async
¶
get_viewport_info
async
¶
log_status
async
¶
Display a status message in Houdini's status bar.
Call this at the START of every major step so the user can follow along in real time without having to inspect tool call logs. Examples: "Creating base geometry...", "Wiring SOP chain...", "Setting up pyro simulation...", "Assigning materials...".
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Status message to display (keep it short and human-readable). |
required |
|
str
|
"message" (default), "important", "warning", or "error". |
'message'
|
set_current_network
async
¶
set_current_network(
ctx: Context, network_path: str, other_objects: str | None = "hide"
) -> dict
Navigate the network editor to a network; the viewer follows it in.
Call it on the network you build in. By default the viewer then hides every other object (the viewport's Y hotkey, no display flag touched), so the work is seen on its own and the rest of the scene does not cook.
A DOP network becomes the current one, where DOP shelf tools build (the
reply names current_dop_network), as entering it in Houdini does; with
other_objects=None that is all it changes besides the editor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Network path to navigate to. |
required |
|
str | None
|
"hide" (default), "ghost", "show", or null to leave the viewer as it is. |
'hide'
|
set_viewer_context
async
¶
set_viewer_context(
ctx: Context,
network_path: str,
current_node: str | None = None,
pane_name: str | None = None,
) -> dict
Point the Scene Viewer at a network, and optionally a node inside it.
set_current_network moves the network EDITOR; this moves the VIEWER. That is what decides whether a scene graph view exists, so it is the prerequisite for previewing a USD stage or setting a Hydra delegate: call this with "/stage" before set_viewport_renderer or before binding a USD camera prim.
The result reports is_scene_graph_view, which is the question you are usually really asking.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Network for the viewer to display, e.g. "/stage". |
required |
|
str | None
|
Node inside it to make current, which selects the stage a Solaris viewport shows. |
None
|
|
str | None
|
Pane tab name. |
None
|
set_viewport_camera
async
¶
set_viewport_camera(
ctx: Context, camera_path: str, pane_name: str | None = None
) -> dict
Set the viewport to look through a specific camera.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Camera node path, or a USD camera prim path for a Solaris viewport. The result reports the camera the viewport is actually looking through, and fails if it did not take. |
required |
|
str | None
|
Pane tab name. |
None
|
set_viewport_direction
async
¶
set_viewport_direction(
ctx: Context,
direction: str | None = None,
pane_name: str | None = None,
rotation: list[float] | None = None,
pivot: list[float] | None = None,
distance: float | None = None,
) -> dict
Set the viewport to a standard viewing direction, or place the free view.
rotation/pivot/distance orbit the viewport's own (non-camera) view: rotation [rx, ry, rz] in degrees about the pivot, distance from it. The reply reads the view back. Looking through a camera, move the camera.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str | None
|
"front", "back", "top", "bottom", "left", "right", or "perspective". |
None
|
|
str | None
|
Pane tab name. |
None
|
|
list[float] | None
|
[rx, ry, rz] degrees for the free view. |
None
|
|
list[float] | None
|
[x, y, z] the free view orbits. |
None
|
|
float | None
|
Distance of the free view from its pivot along its view axis (the dolly); a sideways pan is not counted in it. |
None
|
set_viewport_display
async
¶
set_viewport_display(
ctx: Context,
display_mode: str | None = None,
pane_name: str | None = None,
environment_background: bool | None = None,
reference_plane: bool | None = None,
point_size: float | None = None,
color_scheme: str | None = None,
) -> dict
Set how the viewport draws: shading, environment background, grid, particle point size, colour scheme. Any of them in one call; each is read back in the reply.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str | None
|
One of 'wireframe', 'shaded', 'smooth', 'smooth_wire', 'hidden_line', 'flat', 'flat_wire', 'matcap', 'matcap_wire'. |
None
|
|
str | None
|
Pane tab name. |
None
|
|
bool | None
|
False hides an environment (dome) light's map behind the scene, True shows it. Set on every view of the viewer; the reply reads it back per view. |
None
|
|
bool | None
|
False hides the reference plane (the grid), True shows it. |
None
|
|
float | None
|
Diameter in pixels of particles drawn as points, on every view of the viewer. |
None
|
|
str | None
|
'dark', 'darkgrey', 'grey' or 'light', on every view. |
None
|
set_viewport_renderer
async
¶
Set the viewport's Hydra rendering delegate for live preview.
Use this during lookdev to preview materials and lighting directly in the viewport instead of writing full renders to disk.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Renderer name. The result reports the delegate that is actually active afterwards, read back from Houdini rather than inferred from a setter not raising. |
required |
|
str
|
Renderer name — "GL", "Storm", "Karma CPU", "Karma XPU", etc. Case-insensitive partial match. |
required |
|
str | None
|
Pane tab name. |
None
|