pub fn calculate_random_values(
manifest: &NodeManifest,
_ctx: &ActionContext<'_>,
seed: u64,
) -> Result<Vec<ParamUpdate>, String>Expand description
Calculate random values within parameter ranges
Generates parameter updates with randomized values respecting widget constraints.
§Arguments
manifest- Node manifest containing parameter definitions and widget configs_ctx- Action context (unused for random, but kept for API consistency)seed- Random seed for reproducible randomization
§Returns
Ok(Vec<ParamUpdate>)- List of parameter updates to applyErr(String)- Error message if randomization fails
§Example
ⓘ
use std::time::{SystemTime, UNIX_EPOCH};
let seed = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs();
let updates = calculate_random_values(&manifest, &ctx, seed)?;