Set gradient
gradient_setReplace a node's color ramp stops in an IlluGen project; previous stops are discarded and the project file is updated in place.
Instructions
Replaces a node's color gradient (Color Ramp, Color Interpolate, Geometry Combine Color...).
The previous stops are discarded. Fails if the node has no gradient. Writes the project file in place.
Returns: stops (number written) and color_space.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the .illugen project file. | |
| graph | No | Graph to work in: empty for the top-level graph, or the id or label of a Node_Subgraph node ('outer/inner' for nested subgraphs). | |
| index | No | Which gradient of the node, for nodes with several. 0 = first. | |
| stops | Yes | At least one stop: [[position 0..1, color], ...], color as [r, g, b, a] floats 0..1 or '#rrggbb[aa]'. | |
| node_id | Yes | Node id as a string (from project_summary or node_add), or the node's label if it is unique. | |
| color_space | No | Interpolation space between stops. Empty = keep the current one. |