diff --git a/editor/src/messages/portfolio/document/node_graph/graph_operation_message_handler.rs b/editor/src/messages/portfolio/document/node_graph/graph_operation_message_handler.rs index 38eac169..f65aaa64 100644 --- a/editor/src/messages/portfolio/document/node_graph/graph_operation_message_handler.rs +++ b/editor/src/messages/portfolio/document/node_graph/graph_operation_message_handler.rs @@ -109,7 +109,7 @@ impl<'a> ModifyInputsContext<'a> { fn stroke_set(&mut self, stroke: Stroke) { self.modify_inputs("Stroke", false, |inputs| { - inputs[1] = NodeInput::value(TaggedValue::Color(stroke.color.unwrap_or_default()), false); + inputs[1] = NodeInput::value(TaggedValue::OptionalColor(stroke.color), false); inputs[2] = NodeInput::value(TaggedValue::F64(stroke.weight), false); inputs[3] = NodeInput::value(TaggedValue::VecF32(stroke.dash_lengths), false); inputs[4] = NodeInput::value(TaggedValue::F64(stroke.dash_offset), false); diff --git a/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler/document_node_types.rs b/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler/document_node_types.rs index dd4f6aad..c51ab582 100644 --- a/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler/document_node_types.rs +++ b/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler/document_node_types.rs @@ -722,7 +722,7 @@ fn static_nodes() -> Vec { identifier: NodeImplementation::proto("graphene_core::vector::SetStrokeNode<_, _, _, _, _, _, _>"), inputs: vec![ DocumentInputType::value("Vector Data", TaggedValue::VectorData(graphene_core::vector::VectorData::empty()), true), - DocumentInputType::value("Color", TaggedValue::Color(Color::BLACK), false), + DocumentInputType::value("Color", TaggedValue::OptionalColor(Some(Color::BLACK)), false), DocumentInputType::value("Weight", TaggedValue::F64(0.), false), DocumentInputType::value("Dash Lengths", TaggedValue::VecF32(Vec::new()), false), DocumentInputType::value("Dash Offset", TaggedValue::F64(0.), false), diff --git a/node-graph/gcore/src/vector/vector_nodes.rs b/node-graph/gcore/src/vector/vector_nodes.rs index 2ce4c8f8..4fee1fb5 100644 --- a/node-graph/gcore/src/vector/vector_nodes.rs +++ b/node-graph/gcore/src/vector/vector_nodes.rs @@ -52,7 +52,7 @@ pub struct SetStrokeNode, weight: f64, dash_lengths: Vec, dash_offset: f64, @@ -61,7 +61,7 @@ fn set_vector_data_stroke( miter_limit: f64, ) -> VectorData { vector_data.style.set_stroke(Stroke { - color: Some(color), + color, weight, dash_lengths, dash_offset, diff --git a/node-graph/interpreted-executor/src/node_registry.rs b/node-graph/interpreted-executor/src/node_registry.rs index 59d968ad..72c7adfa 100644 --- a/node-graph/interpreted-executor/src/node_registry.rs +++ b/node-graph/interpreted-executor/src/node_registry.rs @@ -348,8 +348,8 @@ fn node_registry() -> HashMap, input: &QuantizationChannels, params: []), register_node!(graphene_core::transform::TransformNode<_, _, _, _, _>, input: VectorData, params: [DVec2, f64, DVec2, DVec2, DVec2]), register_node!(graphene_core::transform::TransformNode<_, _, _, _, _>, input: ImageFrame, params: [DVec2, f64, DVec2, DVec2, DVec2]), - register_node!(graphene_core::vector::SetFillNode<_, _, _, _, _, _, _>, input: VectorData, params: [ graphene_core::vector::style::FillType, Option, graphene_core::vector::style::GradientType, DVec2, DVec2, DAffine2, Vec<(f64, Option)>]), - register_node!(graphene_core::vector::SetStrokeNode<_, _, _, _, _, _, _>, input: VectorData, params: [graphene_core::Color, f64, Vec, f64, graphene_core::vector::style::LineCap, graphene_core::vector::style::LineJoin, f64]), + register_node!(graphene_core::vector::SetFillNode<_, _, _, _, _, _, _>, input: VectorData, params: [graphene_core::vector::style::FillType, Option, graphene_core::vector::style::GradientType, DVec2, DVec2, DAffine2, Vec<(f64, Option)>]), + register_node!(graphene_core::vector::SetStrokeNode<_, _, _, _, _, _, _>, input: VectorData, params: [Option, f64, Vec, f64, graphene_core::vector::style::LineCap, graphene_core::vector::style::LineJoin, f64]), register_node!(graphene_core::vector::generator_nodes::UnitCircleGenerator, input: (), params: []), register_node!( graphene_core::vector::generator_nodes::PathGenerator<_>,