mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 19:48:12 +08:00
Convert copy to points, sample polyline, scatter, spline, jitter, and assign colors
This commit is contained in:
@@ -1391,6 +1391,17 @@ fn migrate_node(node_id: &NodeId, node: &DocumentNode, network_path: &[NodeId],
|
||||
if reset_node_definitions_on_open && let Some(reference) = document.network_interface.reference(node_id, network_path) {
|
||||
let node_definition = resolve_document_node_type(&reference)?;
|
||||
document.network_interface.replace_implementation(node_id, network_path, &mut node_definition.default_node_template());
|
||||
|
||||
// The leveled-records flip moved the Copy to Points content wire ahead of the points wire.
|
||||
if reference == DefinitionIdentifier::ProtoNode(graphene_std::vector::copy_to_points::IDENTIFIER) {
|
||||
let mut node_template = node_definition.default_node_template();
|
||||
let old_inputs = document.network_interface.replace_inputs(node_id, network_path, &mut node_template)?;
|
||||
document.network_interface.set_input(&InputConnector::node(*node_id, 0), old_inputs[1].clone(), network_path);
|
||||
document.network_interface.set_input(&InputConnector::node(*node_id, 1), old_inputs[0].clone(), network_path);
|
||||
for (index, input) in old_inputs.into_iter().enumerate().skip(2) {
|
||||
document.network_interface.set_input(&InputConnector::node(*node_id, index), input, network_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rebuild stale Merge/Artboard subgraphs that still use the removed LegacyLayerExtendNode internally
|
||||
|
||||
Reference in New Issue
Block a user