set_parameter
Set a Houdini parameter value, handling expression conflicts and write-throughs. Optionally run callbacks.
Instructions
Set a parameter value.
A parameter that holds an expression does NOT take a literal: Houdini
writes the value into a slot the expression keeps overriding. The reply
then carries expression_kept: true with the surviving expression and
what you requested (plus same_as_evaluated when the expression happens
to evaluate to that value right now) — read those before calling the write
done. Pass override_expression=True to clear the expression first.
A parameter holding a BARE ch() reference is the opposite trap: Houdini
writes THROUGH it into the parameter it reads, so the value lands on
another node. The reply names that parameter in written_through.
Inside a DOP network a write does not reset frames already simulated:
simulation_cache names the network to pass to reset_simulation.
A String parameter echoes raw_value (the unexpanded text, $JOB/...)
next to the expanded new_value.
A list with {"expr": ...} components ("t": [{"expr": "$F"}, 0, 0]) and
a whole ramp ({"keys", "values", "basis"}) go through set_parameters:
this tool's value takes plain values only.
A LOCKED parameter (karmarendersettings resolutiony under res_mode autoheight) takes nothing at all; the error names the menu whose callback sets the lock. Houdini runs such callbacks only from the UI: set that menu with run_callbacks=True first, then the locked parameter.
Args:
node_path: Node path.
parm_name: Parameter name.
value: New value (int, float, string, bool, or list).
override_expression: Remove an expression standing in the way,
instead of reporting that the write did not take.
run_callbacks: Run the parameter's callback script after the write,
as editing it in the UI does (callback_run in the reply, and
callback_error when the callback raised).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| node_path | Yes | ||
| parm_name | Yes | ||
| run_callbacks | No | ||
| override_expression | No |