code
code
¶
MCP tools for code execution inside Houdini.
Exposes 4 tools for running Python code, HScript commands, evaluating expressions, and reading Houdini environment variables.
Functions:
| Name | Description |
|---|---|
evaluate_expression |
Evaluate an expression in Houdini and return its result. |
execute_hscript |
Execute an HScript command in Houdini. |
execute_python |
Execute Python code inside Houdini for scene-level scripting only. |
get_env_variable |
Get a Houdini environment variable value. |
Functions¶
evaluate_expression
async
¶
evaluate_expression(
ctx: Context, expression: str, language: str = "hscript"
) -> dict
execute_hscript
async
¶
execute_python
async
¶
execute_python(
ctx: Context, code: str, return_expression: str | None = None
) -> dict
Execute Python code inside Houdini for scene-level scripting only.
Use create_node/create_wrangle for geometry work instead.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Python source code to execute. |
required |
|
str | None
|
Python expression to evaluate after execution. |
None
|