From 5e918af37134749f530fe888e3feca8dd96a5c86 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 23 Aug 2026 08:31:40 +0000 Subject: [PATCH] Restore the sample_polyline test attribute and drop dead scaffolding --- .../interpreted-executor/src/node_registry.rs | 2 -- node-graph/nodes/repeat/src/repeat_nodes.rs | 16 +--------------- node-graph/nodes/vector/src/vector_nodes.rs | 1 + 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/node-graph/interpreted-executor/src/node_registry.rs b/node-graph/interpreted-executor/src/node_registry.rs index 82e8f2a580..3297b6baa2 100644 --- a/node-graph/interpreted-executor/src/node_registry.rs +++ b/node-graph/interpreted-executor/src/node_registry.rs @@ -1,8 +1,6 @@ use glam::{DAffine2, DVec2, IVec2}; use graphene_std::gradient::GradientStops; use graphene_std::list::{AttributeDyn, AttributeValueDyn, List, ListDyn}; -#[cfg(target_family = "wasm")] -use graphene_std::platform_application_io::canvas_utils::CanvasHandle; #[cfg(feature = "gpu")] use graphene_std::raster::GPU; use graphene_std::raster::color::Color; diff --git a/node-graph/nodes/repeat/src/repeat_nodes.rs b/node-graph/nodes/repeat/src/repeat_nodes.rs index eb43dac53a..a8f4ad95eb 100644 --- a/node-graph/nodes/repeat/src/repeat_nodes.rs +++ b/node-graph/nodes/repeat/src/repeat_nodes.rs @@ -187,7 +187,7 @@ fn repeat_on_points + Default + Send + Clone + 'static>( mod test { use super::*; use core_types::arena::Arena; - use core_types::context::{ContextImpl, EvalScope, ExtractIndex, ExtractPosition}; + use core_types::context::{ContextImpl, EvalScope, ExtractPosition}; use core_types::gpoll::GPoll; use core_types::list::Item; use core_types::node::{Node, StatusCell}; @@ -206,20 +206,6 @@ mod test { } } - /// Returns one default `Vector` whose transform records the innermost context index in its x translation. - struct IndexProbe; - - impl Node for IndexProbe { - type Output = List; - - fn eval(&self, input: &Input) -> GPoll> { - let index = input.try_index().and_then(|mut levels| levels.next()).expect("repeat must push an index level"); - let mut list = List::new(); - list.push(Item::new_from_element(Vector::default()).with_attribute(ATTR_TRANSFORM, DAffine2::from_translation(DVec2::new(index as f64, 0.)))); - GPoll::Final(list) - } - } - /// Returns one default `Vector` recording the innermost context position under `TEST_POSITION`. struct PositionProbe; diff --git a/node-graph/nodes/vector/src/vector_nodes.rs b/node-graph/nodes/vector/src/vector_nodes.rs index 92330e544f..853d225c92 100644 --- a/node-graph/nodes/vector/src/vector_nodes.rs +++ b/node-graph/nodes/vector/src/vector_nodes.rs @@ -3702,6 +3702,7 @@ mod test { assert_eq!(manipulator_groups_anchors[i], expected_bounding_box[i]); } } + #[test] fn sample_polyline() { let path = BezPath::from_vec(vec![PathEl::MoveTo(Point::ZERO), PathEl::CurveTo(Point::ZERO, Point::new(100., 0.), Point::new(100., 0.))]); let (sample_polyline, _) = super::sample_polyline(&Footprint::default(), (Vector::from_bezpath(path), Attr(DAffine2::IDENTITY)), PointSpacingType::Separation, 30., 0, 0., 0., false);