mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-01 09:18:13 +08:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user