Add upgrade script to convert "Spline" node to "Path" -> "Spline from Points" (#2274)

* write document upgrade code to transfrom Spline node into Path -> Spline from Points

* fix only connecting to single output

* shift position of newly inserted Path -> Spline from Points node

* refactor

* remove all old Spline node code

* rename Spline from Points node to Spline

* Code cleanup

* Update the demo art to natively use the new Spline node

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Priyanshu
2025-02-12 23:45:30 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent 95bbc95606
commit 2d90bb0cbf
7 changed files with 87 additions and 40 deletions
@@ -283,7 +283,7 @@ impl Fsm for SplineToolFsmState {
let path_node_type = resolve_document_node_type("Path").expect("Path node does not exist");
let path_node = path_node_type.default_node_template();
let spline_node_type = resolve_document_node_type("Splines from Points").expect("Spline from Points node does not exist");
let spline_node_type = resolve_document_node_type("Spline").expect("Spline node does not exist");
let spline_node = spline_node_type.node_template_input_override([Some(NodeInput::node(NodeId(1), 0))]);
let nodes = vec![(NodeId(1), path_node), (NodeId(0), spline_node)];