From 2b380cec3ad6b9238cbd251468d592b1e56e21e4 Mon Sep 17 00:00:00 2001 From: Firestar99 Date: Sun, 6 Jul 2025 11:00:07 +0200 Subject: [PATCH] Fix more node migrations that lost their implementations (#2836) * fix migration for `SampleGradientNode` * fix `BrushNode` unadjusted path * fix `NoisePatternNode` unadjusted path --- .../document/node_graph/document_node_definitions.rs | 4 ++-- editor/src/messages/portfolio/document_migration.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs b/editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs index d6fa996f1..346969c5e 100644 --- a/editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs +++ b/editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs @@ -778,7 +778,7 @@ fn static_nodes() -> Vec { node_template: NodeTemplate { document_node: DocumentNode { manual_composition: Some(concrete!(Context)), - implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_std::raster::NoisePatternNode")), + implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_raster_nodes::std_nodes::NoisePatternNode")), inputs: vec![ NodeInput::value(TaggedValue::None, false), NodeInput::value(TaggedValue::Bool(true), false), @@ -1024,7 +1024,7 @@ fn static_nodes() -> Vec { NodeInput::network(concrete!(BrushCache), 2), ], manual_composition: Some(concrete!(Context)), - implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_std::brush::BrushNode")), + implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_brush::brush::BrushNode")), ..Default::default() }] .into_iter() diff --git a/editor/src/messages/portfolio/document_migration.rs b/editor/src/messages/portfolio/document_migration.rs index 7df0b3839..0d42f30f8 100644 --- a/editor/src/messages/portfolio/document_migration.rs +++ b/editor/src/messages/portfolio/document_migration.rs @@ -65,6 +65,7 @@ const REPLACEMENTS: &[(&str, &str)] = &[ ("graphene_core::ops::Vector2ValueNode", "graphene_math_nodes::CoordinateValueNode"), ("graphene_core::ops::ColorValueNode", "graphene_math_nodes::ColorValueNode"), ("graphene_core::ops::GradientValueNode", "graphene_math_nodes::GradientValueNode"), + ("graphene_core::ops::SampleGradientNode", "graphene_math_nodes::SampleGradientNode"), ("graphene_core::ops::StringValueNode", "graphene_math_nodes::StringValueNode"), ("graphene_core::ops::DotProductNode", "graphene_math_nodes::DotProductNode"), // debug