hda
hda
¶
MCP tool wrappers for Houdini Digital Asset (HDA) operations.
Each tool delegates to the corresponding handler running inside Houdini via the HTTP bridge.
Functions:
| Name | Description |
|---|---|
create_hda |
Create a new HDA from an existing subnet node. |
edit_hda_interface |
Edit an HDA's EXISTING Type Properties interface in one atomic call: |
get_hda_info |
Get detailed information about an HDA definition. |
get_hda_section_content |
Read the content of a specific section in an HDA definition. |
get_hda_sections |
List all sections in an HDA definition. |
install_hda |
Install an HDA file into the current session. |
list_hda_versions |
Every installed definition of an HDA node's type: version, file, which is current. |
list_installed_hdas |
List installed HDA definitions, grouped by library file. |
reload_hda |
Reload an HDA file from disk. |
set_hda_interface |
Author an HDA's Type Properties interface in one call. |
set_hda_section_content |
Write content to a specific section in an HDA definition. |
uninstall_hda |
Uninstall an HDA file from the current session. |
update_hda |
Save the current node contents back to its HDA definition. |
Functions:¶
create_hda
async
¶
create_hda(
ctx: Context,
node_path: str,
hda_file: str,
type_name: str,
label: str,
version: str = "1.0",
) -> dict
Create a new HDA from an existing subnet node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Context
|
MCP context. |
required |
|
str
|
Subnet node path. |
required |
|
str
|
Destination HDA file path. |
required |
|
str
|
Operator type name. |
required |
|
str
|
Human-readable label. |
required |
|
str
|
Version string. |
'1.0'
|
edit_hda_interface
async
¶
Edit an HDA's EXISTING Type Properties interface in one atomic call: insert at a position, remove, hide/show, replace, modify, move.
set_hda_interface only appends. Every op here works on the definition's parameter group; all ops are applied to a copy, the result is checked for component-name collisions, and it is written once — a failing op changes nothing. Read the interface first with get_parm_template_tree.
Ops (dicts, applied in order): {"op": "insert", "spec": {...}, "after": name | "before": name | "in_folder": label or [labels]} — omit the position to append. spec is a set_hda_interface spec, plus types button (with "callback", Python by default), separator, label, vector, color, file, oppath; and fields naming_scheme (base1|xyzw|rgba|minmax| startend|uvw), default_expression (+ default_expression_language), hidden, join_with_next, callback, tags; folder_type "multiparm" for a multiparm block (children named "item#"). {"op": "remove", "name": name_or_folder_label} {"op": "hide" | "show", "name": ...} {"op": "replace", "name": ..., "spec": {...}} {"op": "modify", "name": ...,
Names are template names (t, not tx; stud_count); folders are
addressed by label ("Controls"). Built-in parameters of the node type
(an Object's Transform) cannot be removed — Houdini re-adds them at the
top level and the reply says so in reinstated_by_houdini; hide them.
default_expression_language is "hscript" (Houdini's default) or
"python"; given alone in a modify, it changes the language of the
expression already there. stored reads both back, and
instance_expression_errors names a default expression that does not
evaluate on the instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Context
|
MCP context. |
required |
|
str
|
An instance of the HDA whose definition is edited. |
required |
|
list[dict]
|
Operations, in order. |
required |
|
bool
|
Validate and report the plan without writing. |
False
|
get_hda_info
async
¶
get_hda_section_content
async
¶
get_hda_sections
async
¶
install_hda
async
¶
list_hda_versions
async
¶
list_installed_hdas
async
¶
List installed HDA definitions, grouped by library file.
A stock install loads thousands; pass a filter (namespace, name or path
fragment). truncated says when limit cut the list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Context
|
MCP context. |
required |
|
str | None
|
Substring filter for type names or file paths. |
None
|
|
int
|
Maximum definitions returned. |
100
|
reload_hda
async
¶
set_hda_interface
async
¶
set_hda_interface(
ctx: Context,
node_path: str,
parameters: list[dict],
replace: bool = False,
dry_run: bool = False,
) -> dict
Author an HDA's Type Properties interface in one call.
Use this for the asset's TYPE interface — tab folders, strict ranges,
ordered menus, Hide/Disable When. create_spare_parameter is a different
thing: it adds parameters to one node instance and never reaches the type.
Each entry of parameters is a dict:
name, label, type (int|float|string|toggle|menu|folder),
default, min, max, min_strict, max_strict, components,
menu_items ([value, label] pairs or plain strings),
folder_type (tabs|simple|collapsible|radio) + children for folders,
hide_when / disable_when (Houdini conditionals), help.
Example — a Controls tab whose Bevel disappears for a single stud: [{"name": "controls", "label": "Controls", "type": "folder", "children": [ {"name": "stud_count", "type": "int", "default": 4, "min": 1, "max": 8, "min_strict": True, "max_strict": True}, {"name": "bevel", "type": "float", "default": 0.02, "min": 0.0, "max": 0.1, "hide_when": "{ stud_count == 1 }"}, {"name": "material", "type": "menu", "menu_items": [["plastic", "Plastic"], ["metal", "Metal"]]}]}]
It is edit_hda_interface with one insert per entry: names already in the
interface are refused before anything is written, and the reply is read
back off the definition — ops[].stored, renamed_by_houdini (a tab
folder joins the existing tab set's naming series), not_found_after_write,
instance_parms_missing and instance_expression_errors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Context
|
MCP context. |
required |
|
str
|
An instance of the HDA whose definition is edited. |
required |
|
list[dict]
|
Interface spec (see above). create_spare_parameters' spelling (parm_name, parm_type, default_value) is accepted too. |
required |
|
bool
|
Start from an empty interface. Built-in parameters of the node
type cannot be removed: Houdini puts them back
( |
False
|
|
bool
|
Validate and report the plan without writing. |
False
|
set_hda_section_content
async
¶
uninstall_hda
async
¶
update_hda
async
¶
Save the current node contents back to its HDA definition.
The definition's library file is written by this call: saved_to_disk
and library_file_mtime say so, so no separate save is needed. An
embedded definition lives in the hip file and is kept when the scene is
saved.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Context
|
MCP context. |
required |
|
str
|
Node path. |
required |