From 8266a61c522061c5bf20981816ad000afbd61af6 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Tue, 8 Sep 2026 19:42:50 +0000 Subject: [PATCH] Pad master era stroke nodes with the trailing paint order input --- editor/src/messages/portfolio/document_migration.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/editor/src/messages/portfolio/document_migration.rs b/editor/src/messages/portfolio/document_migration.rs index eb95a24cb6..7603e7858a 100644 --- a/editor/src/messages/portfolio/document_migration.rs +++ b/editor/src/messages/portfolio/document_migration.rs @@ -1750,6 +1750,19 @@ fn migrate_node(node_id: &NodeId, node: &DocumentNode, network_path: &[NodeId], inputs_count = 7; } + // Master retired the stroke paint order input, encoding the order as coverage list position instead. Ours keeps the + // input and carries it LAST, so a master-era stroke node arrives one input short and is padded with the default order. + if reference == DefinitionIdentifier::ProtoNode(graphene_std::vector::stroke::IDENTIFIER) && inputs_count == 9 { + let mut node_template = resolve_document_node_type(&reference)?.default_node_template(); + let old_inputs = document.network_interface.replace_inputs(node_id, network_path, &mut node_template)?; + for (index, input) in old_inputs.into_iter().enumerate() { + document.network_interface.set_input(&InputConnector::node_at_index(*node_id, index), input, network_path); + } + document + .network_interface + .set_input(&InputConnector::node_at_index(*node_id, 9), NodeInput::value(TaggedValue::PaintOrder(Default::default()), false), network_path); + } + // Fill split its `Option` placement into a `_has_transform` bool immediately before the `_transform` matrix. The modern // shape is also 7 inputs, so this era is identified by its `_spread_method` input at 5 or its optional transform at 6. let is_pre_transform_split_fill = inputs_count == 7