From 559878a1665d1c910c42bbf6f67a2b1b8c0ed436 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 28 Oct 2026 23:28:59 -0700 Subject: [PATCH] Shapes: read the Wiggle Transform group inside wiggle_transform wiggle_transform looks up its Transform group itself and returns when the group is missing, so it takes seven parameters and no longer needs the clippy::too_many_arguments allow. --- crates/render/src/shapes.rs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/crates/render/src/shapes.rs b/crates/render/src/shapes.rs index 293dd8bc2..9150243eb 100644 --- a/crates/render/src/shapes.rs +++ b/crates/render/src/shapes.rs @@ -193,17 +193,8 @@ fn used_slots(live: &[usize], draws: &[Draw]) -> Vec { /// Selector's do, with each Repeater copy (`copy_of`) as one unit: the copies of a Repeater above /// the operation move on their own as far as Correlation allows, and the copies of a Repeater /// below it move as one. The four transformations of one operation move together. -#[allow(clippy::too_many_arguments)] -fn wiggle_transform( - ctx: &EvalCtx, - layer: &Layer, - g: &PropGroup, - tr: &PropGroup, - arena: &mut [BezPath], - live: &[usize], - copy_of: &HashMap, - draws: &mut [Draw], -) { +fn wiggle_transform(ctx: &EvalCtx, layer: &Layer, g: &PropGroup, arena: &mut [BezPath], live: &[usize], copy_of: &HashMap, draws: &mut [Draw]) { + let Some(tr) = g.sub("transform") else { return }; let w = Wiggly { max: 1.0, min: -1.0, @@ -406,10 +397,7 @@ fn collect_in(ctx: &EvalCtx, layer: &Layer, contents: &PropGroup, arena: &mut Ve let t = layer.layer_time(ctx.time).seconds(); apply(arena, &live, |p| ops::wiggle(p, &w, t)); } - "wiggler" => { - let Some(tr) = g.sub("transform") else { continue }; - wiggle_transform(ctx, layer, g, tr, arena, &live, ©_ids.of, &mut draws); - } + "wiggler" => wiggle_transform(ctx, layer, g, arena, &live, ©_ids.of, &mut draws), "merge" => { let mode = ops::MergeMode::from_index(ctx.e(layer, g, "mode")); let input: Vec = live.iter().map(|&i| arena[i].clone()).collect();