From 7b993c5de65301cbf7a9c890a6eb1fff69520f77 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sat, 22 Aug 2026 17:29:51 +0000 Subject: [PATCH] Place lane paint onto the vector interiors at the legacy boundary --- .../libraries/graphic-types/src/graphic.rs | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/node-graph/libraries/graphic-types/src/graphic.rs b/node-graph/libraries/graphic-types/src/graphic.rs index 8813887580..2eccd46054 100644 --- a/node-graph/libraries/graphic-types/src/graphic.rs +++ b/node-graph/libraries/graphic-types/src/graphic.rs @@ -708,10 +708,39 @@ pub fn run_to_render_list(item: &core_types::r for element in graphics.iter_element_values_mut() { *element = map_groups_to_legacy(element); } + push_lane_paint_into_interiors(graphics); } Some(list) } +/// The transitional paint placement: a lane-level fill or stroke paint +/// attribute moves onto the vector interiors the legacy paint readers +/// inspect, reaching as far as the pre-flip broadcast did. +fn push_lane_paint_into_interiors(list: &mut List) { + for index in 0..list.len() { + for key in [ATTR_FILL, ATTR_STROKE] { + let Some(paint) = paint_at(list, index, key).filter(|paint| is_paint_present(paint)).cloned() else { continue }; + let Some(element) = list.element_mut(index) else { continue }; + let fill_list = |inner: &mut List| { + for item in 0..inner.len() { + set_paint_attribute_at(inner, item, key, paint.clone()); + } + }; + match element { + Graphic::Vector(inner) => fill_list(inner), + Graphic::Graphic(children) => { + for child in children.iter_element_values_mut() { + if let Some(inner) = child.as_vector_mut() { + fill_list(inner); + } + } + } + _ => {} + } + } + } +} + /// The deep clone-out for `Graphic` elements: a plain clone of a group /// interior would carry frame pointers into the evaluation's arena, so memo /// and capture seams copy out the legacy-converted form, which owns all of @@ -763,6 +792,7 @@ pub fn group_to_legacy_list(group: &core_types::record::Group) -> List for element in list.iter_element_values_mut() { *element = map_groups_to_legacy(element); } + push_lane_paint_into_interiors(&mut list); return list; } let element = None @@ -792,6 +822,7 @@ pub fn group_to_legacy_list(group: &core_types::record::Group) -> List } } } + push_lane_paint_into_interiors(&mut list); list } }