Move source_node_id to "editor:layer" and Vector<Upstream> to "editor:merged_layers", backed by a new 'Write Attribute' node (#4061)

* Fix click target propagation with the Rasterize node

* Add the 'Write Attribute' node

* Remove tag_layer in favor of the new Write Attribute node, prune redundant attribute writes

* Replace the Vector<Upstream> type argument with the "editor:merged_layers" attribute
This commit is contained in:
Keavon Chambers
2026-04-28 03:28:31 -07:00
parent 76938eb69a
commit afc2c9178e
27 changed files with 312 additions and 376 deletions
@@ -169,10 +169,6 @@ const NODE_REPLACEMENTS: &[NodeReplacement<'static>] = &[
"graphene_core::graphic::LegacyLayerExtendNode",
],
},
NodeReplacement {
node: graphene_std::graphic_nodes::source_node_id::IDENTIFIER,
aliases: &["graphene_core::graphic::graphic::SourceNodeIdNode", "graphene_core::graphic::SourceNodeIdNode"],
},
NodeReplacement {
node: graphene_std::graphic::to_graphic::IDENTIFIER,
aliases: &[
@@ -1024,6 +1020,16 @@ pub fn document_migration_reset_node_definition(document_serialized_content: &st
return true;
}
// The `source_node_id` proto node was removed in favor of `parent_layer` + `write_attribute`.
// Documents that still reference it inside their Merge or Artboard layer networks need those layer definitions
// reset to the current default so the new internal plumbing replaces the obsolete node.
if document_serialized_content.contains("graphic_nodes::graphic::SourceNodeIdNode")
|| document_serialized_content.contains("graphene_core::graphic::graphic::SourceNodeIdNode")
|| document_serialized_content.contains("graphene_core::graphic::SourceNodeIdNode")
{
return true;
}
false
}