set_parameters
Batch-write multiple parameters to a Houdini node in a specified order, with options to override expressions and run callbacks, returning per-parameter results.
Instructions
Batch-set multiple parameters on a node, in the order given.
Inside a DOP network a write does not reset frames already simulated:
simulation_cache names the network to pass to reset_simulation.
Parameters that held an expression and therefore ignored the literal are
listed in expressions_kept, with a top-level warning: a batch whose
errors is empty can still contain a write that did not take. Values that
landed on ANOTHER node, because the parameter is a bare ch() reference
Houdini writes through, are in written_through. Each entry in set
carries the same keys as set_parameter's reply. Pass
override_expression=True to clear those expressions and links instead.
Locked parameters are in errors with locked: true and listed in
locked_parms; the error names the menu whose callback sets the lock.
With run_callbacks=True each parameter's callback runs after its write, so
{"res_mode": "manual", "resolutiony": 1080} unlocks and then writes; a
callback that raised is listed in callbacks_not_run.
Args:
node_path: Node path.
params: Mapping of parameter names to values, written in this order.
A value written {"expr": "...", "language": "hscript" | "python"}
is set as an expression, as in build_network, also as one
component of a list ("t": [{"expr": "$F"}, 0, 0]). A ramp takes the
whole ramp at once: {"keys": [0, 1], "values": [[1, 0, 0],
[0, 0, 1]], "basis": "linear"} (one basis or one per key; a
float ramp takes numbers), the shape get_parameter reads it in.
A ramp's new_value is what it holds once the whole call is
through, so a key added by count and then set reads as set.
override_expression: Remove expressions standing in the way.
run_callbacks: Run each parameter's callback script after its write,
as the UI does.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes | ||
| node_path | Yes | ||
| run_callbacks | No | ||
| override_expression | No |