@@ -1095,6 +1095,21 @@ fn migrate_node(node_id: &NodeId, node: &DocumentNode, network_path: &[NodeId],
10951095 document. network_interface . set_input ( & InputConnector :: node ( * node_id, 9 ) , old_inputs[ 4 ] . clone ( ) , network_path) ;
10961096 }
10971097
1098+ // Upgrade Transform node to add "Pivot" input
1099+ if reference == DefinitionIdentifier :: ProtoNode ( graphene_std:: transform_nodes:: transform:: IDENTIFIER ) && inputs_count == 5 {
1100+ let mut node_template = resolve_document_node_type ( & reference) ?. default_node_template ( ) ;
1101+ let old_inputs = document. network_interface . replace_inputs ( node_id, network_path, & mut node_template) ?;
1102+
1103+ let pivot_input = NodeInput :: value ( TaggedValue :: DVec2 ( DVec2 :: ZERO ) , false ) ;
1104+
1105+ document. network_interface . set_input ( & InputConnector :: node ( * node_id, 0 ) , old_inputs[ 0 ] . clone ( ) , network_path) ;
1106+ document. network_interface . set_input ( & InputConnector :: node ( * node_id, 1 ) , old_inputs[ 1 ] . clone ( ) , network_path) ;
1107+ document. network_interface . set_input ( & InputConnector :: node ( * node_id, 2 ) , old_inputs[ 2 ] . clone ( ) , network_path) ;
1108+ document. network_interface . set_input ( & InputConnector :: node ( * node_id, 3 ) , old_inputs[ 3 ] . clone ( ) , network_path) ;
1109+ document. network_interface . set_input ( & InputConnector :: node ( * node_id, 4 ) , old_inputs[ 4 ] . clone ( ) , network_path) ;
1110+ document. network_interface . set_input ( & InputConnector :: node ( * node_id, 5 ) , pivot_input, network_path) ;
1111+ }
1112+
10981113 // Upgrade the old "Spline" node to the new "Spline" node
10991114 if reference == DefinitionIdentifier :: ProtoNode ( graphene_std:: vector:: spline:: IDENTIFIER )
11001115 || reference == DefinitionIdentifier :: ProtoNode ( ProtoNodeIdentifier :: new ( "graphene_core::vector::generator_nodes::SplineNode" ) )
0 commit comments