set_hda_interface
Define an HDA's type-level interface—tab folders, parameters, menus, and conditional visibility—in one call, with dry-run validation.
Instructions
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
and instance_parms_missing.
Args:
ctx: MCP context.
node_path: An instance of the HDA whose definition is edited.
parameters: Interface spec (see above). create_spare_parameters'
spelling (parm_name, parm_type, default_value) is accepted too.
replace: Start from an empty interface. Built-in parameters of the node
type cannot be removed: Houdini puts them back
(reinstated_by_houdini).
dry_run: Validate and report the plan without writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| replace | No | ||
| node_path | Yes | ||
| parameters | Yes |