mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 16:18:12 +08:00
Rename NodeInput::Network to NodeInput::Import (#3163)
This commit is contained in:
Generated
+1
-1
File diff suppressed because one or more lines are too long
Generated
+1
-1
File diff suppressed because one or more lines are too long
Generated
+1
-1
File diff suppressed because one or more lines are too long
Generated
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Generated
+1
-1
File diff suppressed because one or more lines are too long
Generated
+1
-1
File diff suppressed because one or more lines are too long
@@ -169,30 +169,26 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
nodes: [
|
nodes: [
|
||||||
// Primary (bottom) input type coercion
|
// Primary (bottom) input type coercion
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(generic!(T), 0)],
|
inputs: vec![NodeInput::import(generic!(T), 0)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(graphic::to_graphic::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(graphic::to_graphic::IDENTIFIER),
|
||||||
call_argument: concrete!(Context),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
// Secondary (left) input type coercion
|
// Secondary (left) input type coercion
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(generic!(T), 1)],
|
inputs: vec![NodeInput::import(generic!(T), 1)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(graphic::wrap_graphic::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(graphic::wrap_graphic::IDENTIFIER),
|
||||||
call_argument: concrete!(Context),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
// Store the ID of the parent node (which encapsulates this sub-network) in each row we are extending the table with.
|
// Store the ID of the parent node (which encapsulates this sub-network) in each row we are extending the table with.
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::node(NodeId(1), 0), NodeInput::Reflection(graph_craft::document::DocumentNodeMetadata::DocumentNodePath)],
|
inputs: vec![NodeInput::node(NodeId(1), 0), NodeInput::Reflection(graph_craft::document::DocumentNodeMetadata::DocumentNodePath)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(graphic::source_node_id::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(graphic::source_node_id::IDENTIFIER),
|
||||||
call_argument: concrete!(Context),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
// The monitor node is used to display a thumbnail in the UI
|
// The monitor node is used to display a thumbnail in the UI
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::node(NodeId(2), 0)],
|
inputs: vec![NodeInput::node(NodeId(2), 0)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(memo::monitor::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(memo::monitor::IDENTIFIER),
|
||||||
call_argument: concrete!(Context),
|
|
||||||
skip_deduplication: true,
|
skip_deduplication: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
@@ -290,12 +286,12 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
call_argument: generic!(T),
|
call_argument: generic!(T),
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(artboard::create_artboard::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(artboard::create_artboard::IDENTIFIER),
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::network(concrete!(TaggedValue), 1),
|
NodeInput::import(concrete!(TaggedValue), 1),
|
||||||
NodeInput::value(TaggedValue::String(String::from("Artboard")), false),
|
NodeInput::value(TaggedValue::String(String::from("Artboard")), false),
|
||||||
NodeInput::network(concrete!(TaggedValue), 2),
|
NodeInput::import(concrete!(TaggedValue), 2),
|
||||||
NodeInput::network(concrete!(TaggedValue), 3),
|
NodeInput::import(concrete!(TaggedValue), 3),
|
||||||
NodeInput::network(concrete!(TaggedValue), 4),
|
NodeInput::import(concrete!(TaggedValue), 4),
|
||||||
NodeInput::network(concrete!(TaggedValue), 5),
|
NodeInput::import(concrete!(TaggedValue), 5),
|
||||||
],
|
],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
@@ -303,7 +299,6 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::node(NodeId(0), 0), NodeInput::Reflection(graph_craft::document::DocumentNodeMetadata::DocumentNodePath)],
|
inputs: vec![NodeInput::node(NodeId(0), 0), NodeInput::Reflection(graph_craft::document::DocumentNodeMetadata::DocumentNodePath)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(graphic::source_node_id::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(graphic::source_node_id::IDENTIFIER),
|
||||||
call_argument: concrete!(Context),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
// The monitor node is used to display a thumbnail in the UI.
|
// The monitor node is used to display a thumbnail in the UI.
|
||||||
@@ -316,9 +311,8 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
call_argument: concrete!(Context),
|
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::network(graphene_std::Type::Fn(Box::new(concrete!(Context)), Box::new(concrete!(Table<Artboard>))), 0),
|
NodeInput::import(graphene_std::Type::Fn(Box::new(concrete!(Context)), Box::new(concrete!(Table<Artboard>))), 0),
|
||||||
NodeInput::node(NodeId(2), 0),
|
NodeInput::node(NodeId(2), 0),
|
||||||
],
|
],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(graphic::extend::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(graphic::extend::IDENTIFIER),
|
||||||
@@ -431,14 +425,12 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
exports: vec![NodeInput::node(NodeId(1), 0)],
|
exports: vec![NodeInput::node(NodeId(1), 0)],
|
||||||
nodes: [
|
nodes: [
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::value(TaggedValue::None, false), NodeInput::scope("editor-api"), NodeInput::network(concrete!(String), 1)],
|
inputs: vec![NodeInput::value(TaggedValue::None, false), NodeInput::scope("editor-api"), NodeInput::import(concrete!(String), 1)],
|
||||||
call_argument: concrete!(Context),
|
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(wasm_application_io::load_resource::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(wasm_application_io::load_resource::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::node(NodeId(0), 0)],
|
inputs: vec![NodeInput::node(NodeId(0), 0)],
|
||||||
call_argument: concrete!(Context),
|
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(wasm_application_io::decode_image::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(wasm_application_io::decode_image::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
@@ -505,7 +497,6 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
call_argument: concrete!(Context),
|
|
||||||
inputs: vec![NodeInput::node(NodeId(0), 0)],
|
inputs: vec![NodeInput::node(NodeId(0), 0)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(memo::memo::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(memo::memo::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -567,20 +558,17 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::scope("editor-api")],
|
inputs: vec![NodeInput::scope("editor-api")],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(wasm_application_io::create_surface::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(wasm_application_io::create_surface::IDENTIFIER),
|
||||||
call_argument: concrete!(Context),
|
|
||||||
skip_deduplication: true,
|
skip_deduplication: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::node(NodeId(0), 0)],
|
inputs: vec![NodeInput::node(NodeId(0), 0)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(memo::memo::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(memo::memo::IDENTIFIER),
|
||||||
call_argument: concrete!(Context),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(generic!(T), 0), NodeInput::network(concrete!(Footprint), 1), NodeInput::node(NodeId(1), 0)],
|
inputs: vec![NodeInput::import(generic!(T), 0), NodeInput::import(concrete!(Footprint), 1), NodeInput::node(NodeId(1), 0)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(wasm_application_io::rasterize::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(wasm_application_io::rasterize::IDENTIFIER),
|
||||||
call_argument: concrete!(Context),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -653,7 +641,6 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
category: "Raster: Pattern",
|
category: "Raster: Pattern",
|
||||||
node_template: NodeTemplate {
|
node_template: NodeTemplate {
|
||||||
document_node: DocumentNode {
|
document_node: DocumentNode {
|
||||||
call_argument: concrete!(Context),
|
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(raster_nodes::std_nodes::noise_pattern::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(raster_nodes::std_nodes::noise_pattern::IDENTIFIER),
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::value(TaggedValue::None, false),
|
NodeInput::value(TaggedValue::None, false),
|
||||||
@@ -717,7 +704,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
nodes: [
|
nodes: [
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::network(concrete!(Table<Raster<CPU>>), 0),
|
NodeInput::import(concrete!(Table<Raster<CPU>>), 0),
|
||||||
NodeInput::value(TaggedValue::RedGreenBlueAlpha(RedGreenBlueAlpha::Red), false),
|
NodeInput::value(TaggedValue::RedGreenBlueAlpha(RedGreenBlueAlpha::Red), false),
|
||||||
],
|
],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(raster_nodes::adjustments::extract_channel::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(raster_nodes::adjustments::extract_channel::IDENTIFIER),
|
||||||
@@ -726,7 +713,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::network(concrete!(Table<Raster<CPU>>), 0),
|
NodeInput::import(concrete!(Table<Raster<CPU>>), 0),
|
||||||
NodeInput::value(TaggedValue::RedGreenBlueAlpha(RedGreenBlueAlpha::Green), false),
|
NodeInput::value(TaggedValue::RedGreenBlueAlpha(RedGreenBlueAlpha::Green), false),
|
||||||
],
|
],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(raster_nodes::adjustments::extract_channel::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(raster_nodes::adjustments::extract_channel::IDENTIFIER),
|
||||||
@@ -735,7 +722,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::network(concrete!(Table<Raster<CPU>>), 0),
|
NodeInput::import(concrete!(Table<Raster<CPU>>), 0),
|
||||||
NodeInput::value(TaggedValue::RedGreenBlueAlpha(RedGreenBlueAlpha::Blue), false),
|
NodeInput::value(TaggedValue::RedGreenBlueAlpha(RedGreenBlueAlpha::Blue), false),
|
||||||
],
|
],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(raster_nodes::adjustments::extract_channel::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(raster_nodes::adjustments::extract_channel::IDENTIFIER),
|
||||||
@@ -744,7 +731,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::network(concrete!(Table<Raster<CPU>>), 0),
|
NodeInput::import(concrete!(Table<Raster<CPU>>), 0),
|
||||||
NodeInput::value(TaggedValue::RedGreenBlueAlpha(RedGreenBlueAlpha::Alpha), false),
|
NodeInput::value(TaggedValue::RedGreenBlueAlpha(RedGreenBlueAlpha::Alpha), false),
|
||||||
],
|
],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(raster_nodes::adjustments::extract_channel::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(raster_nodes::adjustments::extract_channel::IDENTIFIER),
|
||||||
@@ -823,13 +810,13 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
exports: vec![NodeInput::value(TaggedValue::None, false), NodeInput::node(NodeId(0), 0), NodeInput::node(NodeId(1), 0)],
|
exports: vec![NodeInput::value(TaggedValue::None, false), NodeInput::node(NodeId(0), 0), NodeInput::node(NodeId(1), 0)],
|
||||||
nodes: [
|
nodes: [
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(Table<Raster<CPU>>), 0), NodeInput::value(TaggedValue::XY(XY::X), false)],
|
inputs: vec![NodeInput::import(concrete!(Table<Raster<CPU>>), 0), NodeInput::value(TaggedValue::XY(XY::X), false)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(extract_xy::extract_xy::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(extract_xy::extract_xy::IDENTIFIER),
|
||||||
call_argument: generic!(T),
|
call_argument: generic!(T),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(Table<Raster<CPU>>), 0), NodeInput::value(TaggedValue::XY(XY::Y), false)],
|
inputs: vec![NodeInput::import(concrete!(Table<Raster<CPU>>), 0), NodeInput::value(TaggedValue::XY(XY::Y), false)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(extract_xy::extract_xy::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(extract_xy::extract_xy::IDENTIFIER),
|
||||||
call_argument: generic!(T),
|
call_argument: generic!(T),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -894,11 +881,10 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
exports: vec![NodeInput::node(NodeId(0), 0)],
|
exports: vec![NodeInput::node(NodeId(0), 0)],
|
||||||
nodes: vec![DocumentNode {
|
nodes: vec![DocumentNode {
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::network(concrete!(Table<Raster<CPU>>), 0),
|
NodeInput::import(concrete!(Table<Raster<CPU>>), 0),
|
||||||
NodeInput::network(concrete!(Vec<brush::brush_stroke::BrushStroke>), 1),
|
NodeInput::import(concrete!(Vec<brush::brush_stroke::BrushStroke>), 1),
|
||||||
NodeInput::network(concrete!(BrushCache), 2),
|
NodeInput::import(concrete!(BrushCache), 2),
|
||||||
],
|
],
|
||||||
call_argument: concrete!(Context),
|
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(brush::brush::brush::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(brush::brush::brush::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}]
|
}]
|
||||||
@@ -949,7 +935,6 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
document_node: DocumentNode {
|
document_node: DocumentNode {
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(memo::memo::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(memo::memo::IDENTIFIER),
|
||||||
inputs: vec![NodeInput::value(TaggedValue::Raster(Default::default()), true)],
|
inputs: vec![NodeInput::value(TaggedValue::Raster(Default::default()), true)],
|
||||||
call_argument: concrete!(Context),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
persistent_node_metadata: DocumentNodePersistentMetadata {
|
persistent_node_metadata: DocumentNodePersistentMetadata {
|
||||||
@@ -968,7 +953,6 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
document_node: DocumentNode {
|
document_node: DocumentNode {
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(memo::impure_memo::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(memo::impure_memo::IDENTIFIER),
|
||||||
inputs: vec![NodeInput::value(TaggedValue::Raster(Default::default()), true)],
|
inputs: vec![NodeInput::value(TaggedValue::Raster(Default::default()), true)],
|
||||||
call_argument: concrete!(Context),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
persistent_node_metadata: DocumentNodePersistentMetadata {
|
persistent_node_metadata: DocumentNodePersistentMetadata {
|
||||||
@@ -990,13 +974,11 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
exports: vec![NodeInput::node(NodeId(1), 0)],
|
exports: vec![NodeInput::node(NodeId(1), 0)],
|
||||||
nodes: [
|
nodes: [
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
call_argument: concrete!(Context),
|
|
||||||
inputs: vec![NodeInput::scope("editor-api")],
|
inputs: vec![NodeInput::scope("editor-api")],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(wgpu_executor::create_gpu_surface::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(wgpu_executor::create_gpu_surface::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
call_argument: concrete!(Context),
|
|
||||||
inputs: vec![NodeInput::node(NodeId(0), 0)],
|
inputs: vec![NodeInput::node(NodeId(0), 0)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(memo::impure_memo::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(memo::impure_memo::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -1061,7 +1043,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(Table<Raster<CPU>>), 0), NodeInput::node(NodeId(0), 0)],
|
inputs: vec![NodeInput::import(concrete!(Table<Raster<CPU>>), 0), NodeInput::node(NodeId(0), 0)],
|
||||||
call_argument: generic!(T),
|
call_argument: generic!(T),
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(wgpu_executor::texture_upload::upload_texture::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(wgpu_executor::texture_upload::upload_texture::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -1181,7 +1163,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
exports: vec![NodeInput::node(NodeId(1), 0)],
|
exports: vec![NodeInput::node(NodeId(1), 0)],
|
||||||
nodes: vec![
|
nodes: vec![
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(Table<Vector>), 0)],
|
inputs: vec![NodeInput::import(concrete!(Table<Vector>), 0)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(memo::monitor::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(memo::monitor::IDENTIFIER),
|
||||||
call_argument: generic!(T),
|
call_argument: generic!(T),
|
||||||
skip_deduplication: true,
|
skip_deduplication: true,
|
||||||
@@ -1190,7 +1172,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::node(NodeId(0), 0),
|
NodeInput::node(NodeId(0), 0),
|
||||||
NodeInput::network(concrete!(graphene_std::vector::VectorModification), 1),
|
NodeInput::import(concrete!(graphene_std::vector::VectorModification), 1),
|
||||||
NodeInput::Reflection(graph_craft::document::DocumentNodeMetadata::DocumentNodePath),
|
NodeInput::Reflection(graph_craft::document::DocumentNodeMetadata::DocumentNodePath),
|
||||||
],
|
],
|
||||||
call_argument: generic!(T),
|
call_argument: generic!(T),
|
||||||
@@ -1253,7 +1235,6 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
node_template: NodeTemplate {
|
node_template: NodeTemplate {
|
||||||
document_node: DocumentNode {
|
document_node: DocumentNode {
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(text::text::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(text::text::IDENTIFIER),
|
||||||
call_argument: concrete!(Context),
|
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::scope("editor-api"),
|
NodeInput::scope("editor-api"),
|
||||||
NodeInput::value(TaggedValue::String("Lorem ipsum".to_string()), false),
|
NodeInput::value(TaggedValue::String("Lorem ipsum".to_string()), false),
|
||||||
@@ -1376,7 +1357,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
// From the Value import
|
// From the Value import
|
||||||
NodeInput::network(generic!(T), 0),
|
NodeInput::import(generic!(T), 0),
|
||||||
],
|
],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(memo::monitor::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(memo::monitor::IDENTIFIER),
|
||||||
call_argument: generic!(T),
|
call_argument: generic!(T),
|
||||||
@@ -1389,13 +1370,13 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
// From the Monitor node
|
// From the Monitor node
|
||||||
NodeInput::node(NodeId(0), 0),
|
NodeInput::node(NodeId(0), 0),
|
||||||
// From the Translation import
|
// From the Translation import
|
||||||
NodeInput::network(concrete!(DVec2), 1),
|
NodeInput::import(concrete!(DVec2), 1),
|
||||||
// From the Rotation import
|
// From the Rotation import
|
||||||
NodeInput::network(concrete!(f64), 2),
|
NodeInput::import(concrete!(f64), 2),
|
||||||
// From the Scale import
|
// From the Scale import
|
||||||
NodeInput::network(concrete!(DVec2), 3),
|
NodeInput::import(concrete!(DVec2), 3),
|
||||||
// From the Skew import
|
// From the Skew import
|
||||||
NodeInput::network(concrete!(DVec2), 4),
|
NodeInput::import(concrete!(DVec2), 4),
|
||||||
],
|
],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(transform_nodes::transform::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(transform_nodes::transform::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -1481,7 +1462,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
exports: vec![NodeInput::node(NodeId(1), 0)],
|
exports: vec![NodeInput::node(NodeId(1), 0)],
|
||||||
nodes: vec![
|
nodes: vec![
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(Table<Vector>), 0), NodeInput::network(concrete!(vector::style::Fill), 1)],
|
inputs: vec![NodeInput::import(concrete!(Table<Vector>), 0), NodeInput::import(concrete!(vector::style::Fill), 1)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(path_bool::boolean_operation::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(path_bool::boolean_operation::IDENTIFIER),
|
||||||
call_argument: generic!(T),
|
call_argument: generic!(T),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -1551,20 +1532,20 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
exports: vec![NodeInput::node(NodeId(2), 0)],
|
exports: vec![NodeInput::node(NodeId(2), 0)],
|
||||||
nodes: [
|
nodes: [
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(Table<Vector>), 0)],
|
inputs: vec![NodeInput::import(concrete!(Table<Vector>), 0)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(vector::subpath_segment_lengths::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(vector::subpath_segment_lengths::IDENTIFIER),
|
||||||
call_argument: generic!(T),
|
call_argument: generic!(T),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::network(concrete!(Table<Vector>), 0),
|
NodeInput::import(concrete!(Table<Vector>), 0),
|
||||||
NodeInput::network(concrete!(vector::misc::PointSpacingType), 1),
|
NodeInput::import(concrete!(vector::misc::PointSpacingType), 1),
|
||||||
NodeInput::network(concrete!(f64), 2),
|
NodeInput::import(concrete!(f64), 2),
|
||||||
NodeInput::network(concrete!(u32), 3),
|
NodeInput::import(concrete!(u32), 3),
|
||||||
NodeInput::network(concrete!(f64), 4),
|
NodeInput::import(concrete!(f64), 4),
|
||||||
NodeInput::network(concrete!(f64), 5),
|
NodeInput::import(concrete!(f64), 5),
|
||||||
NodeInput::network(concrete!(bool), 6),
|
NodeInput::import(concrete!(bool), 6),
|
||||||
NodeInput::node(NodeId(0), 0),
|
NodeInput::node(NodeId(0), 0),
|
||||||
],
|
],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(vector::sample_polyline::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(vector::sample_polyline::IDENTIFIER),
|
||||||
@@ -1690,9 +1671,9 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
|
|||||||
nodes: [
|
nodes: [
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::network(concrete!(Table<Vector>), 0),
|
NodeInput::import(concrete!(Table<Vector>), 0),
|
||||||
NodeInput::network(concrete!(f64), 1),
|
NodeInput::import(concrete!(f64), 1),
|
||||||
NodeInput::network(concrete!(u32), 2),
|
NodeInput::import(concrete!(u32), 2),
|
||||||
],
|
],
|
||||||
call_argument: generic!(T),
|
call_argument: generic!(T),
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(vector::poisson_disk_points::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(vector::poisson_disk_points::IDENTIFIER),
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ impl<'a> MessageHandler<NodeGraphMessage, NodeGraphMessageContext<'a>> for NodeG
|
|||||||
responses.add(PortfolioMessage::SubmitActiveGraphRender);
|
responses.add(PortfolioMessage::SubmitActiveGraphRender);
|
||||||
}
|
}
|
||||||
NodeGraphMessage::CreateWire { output_connector, input_connector } => {
|
NodeGraphMessage::CreateWire { output_connector, input_connector } => {
|
||||||
// TODO: Add support for flattening NodeInput::Network exports in flatten_with_fns https://github.com/GraphiteEditor/Graphite/issues/1762
|
// TODO: Add support for flattening NodeInput::Import exports in flatten_with_fns https://github.com/GraphiteEditor/Graphite/issues/1762
|
||||||
if matches!(input_connector, InputConnector::Export(_)) && matches!(output_connector, OutputConnector::Import { .. }) {
|
if matches!(input_connector, InputConnector::Export(_)) && matches!(output_connector, OutputConnector::Import { .. }) {
|
||||||
responses.add(DialogMessage::RequestComingSoonDialog { issue: Some(1762) });
|
responses.add(DialogMessage::RequestComingSoonDialog { issue: Some(1762) });
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -457,7 +457,7 @@ impl NodeNetworkInterface {
|
|||||||
let tagged_value = TaggedValue::from_type_or_none(&self.input_type(&InputConnector::node(*node_id, input_index), network_path).0);
|
let tagged_value = TaggedValue::from_type_or_none(&self.input_type(&InputConnector::node(*node_id, input_index), network_path).0);
|
||||||
*input = NodeInput::value(tagged_value, true);
|
*input = NodeInput::value(tagged_value, true);
|
||||||
}
|
}
|
||||||
} else if let &mut NodeInput::Network { .. } = input {
|
} else if let &mut NodeInput::Import { .. } = input {
|
||||||
// Always disconnect network node input
|
// Always disconnect network node input
|
||||||
let tagged_value = TaggedValue::from_type_or_none(&self.input_type(&InputConnector::node(*node_id, input_index), network_path).0);
|
let tagged_value = TaggedValue::from_type_or_none(&self.input_type(&InputConnector::node(*node_id, input_index), network_path).0);
|
||||||
*input = NodeInput::value(tagged_value, true);
|
*input = NodeInput::value(tagged_value, true);
|
||||||
@@ -725,7 +725,7 @@ impl NodeNetworkInterface {
|
|||||||
..
|
..
|
||||||
} => self.output_type(&OutputConnector::node(*nested_node_id, *output_index), &[network_path, &[*node_id]].concat()),
|
} => self.output_type(&OutputConnector::node(*nested_node_id, *output_index), &[network_path, &[*node_id]].concat()),
|
||||||
NodeInput::Value { tagged_value, .. } => (tagged_value.ty(), TypeSource::TaggedValue),
|
NodeInput::Value { tagged_value, .. } => (tagged_value.ty(), TypeSource::TaggedValue),
|
||||||
NodeInput::Network { .. } => {
|
NodeInput::Import { .. } => {
|
||||||
// let mut encapsulating_path = network_path.to_vec();
|
// let mut encapsulating_path = network_path.to_vec();
|
||||||
// let encapsulating_node = encapsulating_path.pop().expect("No imports exist in document network");
|
// let encapsulating_node = encapsulating_path.pop().expect("No imports exist in document network");
|
||||||
// self.input_type(&InputConnector::node(encapsulating_node, *import_index), network_path)
|
// self.input_type(&InputConnector::node(encapsulating_node, *import_index), network_path)
|
||||||
@@ -1586,7 +1586,7 @@ impl NodeNetworkInterface {
|
|||||||
let input = self.input_from_connector(input_connector, network_path);
|
let input = self.input_from_connector(input_connector, network_path);
|
||||||
input.and_then(|input| match input {
|
input.and_then(|input| match input {
|
||||||
NodeInput::Node { node_id, output_index, .. } => Some(OutputConnector::node(*node_id, *output_index)),
|
NodeInput::Node { node_id, output_index, .. } => Some(OutputConnector::node(*node_id, *output_index)),
|
||||||
NodeInput::Network { import_index, .. } => Some(OutputConnector::Import(*import_index)),
|
NodeInput::Import { import_index, .. } => Some(OutputConnector::Import(*import_index)),
|
||||||
_ => None,
|
_ => None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -2419,7 +2419,7 @@ impl NodeNetworkInterface {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
outward_wires_entry.push(InputConnector::node(*current_node_id, input_index));
|
outward_wires_entry.push(InputConnector::node(*current_node_id, input_index));
|
||||||
} else if let NodeInput::Network { import_index, .. } = input {
|
} else if let NodeInput::Import { import_index, .. } = input {
|
||||||
let outward_wires_entry = outward_wires
|
let outward_wires_entry = outward_wires
|
||||||
.get_mut(&OutputConnector::Import(*import_index))
|
.get_mut(&OutputConnector::Import(*import_index))
|
||||||
.unwrap_or_else(|| panic!("Output connector {:?} should be initialized for each import from a node", OutputConnector::Import(*import_index)));
|
.unwrap_or_else(|| panic!("Output connector {:?} should be initialized for each import from a node", OutputConnector::Import(*import_index)));
|
||||||
@@ -2436,7 +2436,7 @@ impl NodeNetworkInterface {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
outward_wires_entry.push(InputConnector::Export(export_index));
|
outward_wires_entry.push(InputConnector::Export(export_index));
|
||||||
} else if let NodeInput::Network { import_index, .. } = export {
|
} else if let NodeInput::Import { import_index, .. } = export {
|
||||||
let outward_wires_entry = outward_wires
|
let outward_wires_entry = outward_wires
|
||||||
.get_mut(&OutputConnector::Import(*import_index))
|
.get_mut(&OutputConnector::Import(*import_index))
|
||||||
.unwrap_or_else(|| panic!("Output connector {:?} should be initialized between imports and exports", OutputConnector::Import(*import_index)));
|
.unwrap_or_else(|| panic!("Output connector {:?} should be initialized between imports and exports", OutputConnector::Import(*import_index)));
|
||||||
@@ -4226,8 +4226,8 @@ impl NodeNetworkInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_input(&mut self, input_connector: &InputConnector, new_input: NodeInput, network_path: &[NodeId]) {
|
pub fn set_input(&mut self, input_connector: &InputConnector, new_input: NodeInput, network_path: &[NodeId]) {
|
||||||
if matches!(input_connector, InputConnector::Export(_)) && matches!(new_input, NodeInput::Network { .. }) {
|
if matches!(input_connector, InputConnector::Export(_)) && matches!(new_input, NodeInput::Import { .. }) {
|
||||||
// TODO: Add support for flattening NodeInput::Network exports in flatten_with_fns https://github.com/GraphiteEditor/Graphite/issues/1762
|
// TODO: Add support for flattening NodeInput::Import exports in flatten_with_fns https://github.com/GraphiteEditor/Graphite/issues/1762
|
||||||
log::error!("Cannot connect a network to an export, see https://github.com/GraphiteEditor/Graphite/issues/1762");
|
log::error!("Cannot connect a network to an export, see https://github.com/GraphiteEditor/Graphite/issues/1762");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4397,12 +4397,12 @@ impl NodeNetworkInterface {
|
|||||||
self.try_set_upstream_to_chain(input_connector, network_path);
|
self.try_set_upstream_to_chain(input_connector, network_path);
|
||||||
}
|
}
|
||||||
// If a connection is made to the imports
|
// If a connection is made to the imports
|
||||||
(NodeInput::Value { .. } | NodeInput::Scope { .. } | NodeInput::Inline { .. }, NodeInput::Network { .. }) => {
|
(NodeInput::Value { .. } | NodeInput::Scope { .. } | NodeInput::Inline { .. }, NodeInput::Import { .. }) => {
|
||||||
self.unload_outward_wires(network_path);
|
self.unload_outward_wires(network_path);
|
||||||
self.unload_wire(input_connector, network_path);
|
self.unload_wire(input_connector, network_path);
|
||||||
}
|
}
|
||||||
// If a connection to the imports is disconnected
|
// If a connection to the imports is disconnected
|
||||||
(NodeInput::Network { .. }, NodeInput::Value { .. } | NodeInput::Scope { .. } | NodeInput::Inline { .. }) => {
|
(NodeInput::Import { .. }, NodeInput::Value { .. } | NodeInput::Scope { .. } | NodeInput::Inline { .. }) => {
|
||||||
self.unload_outward_wires(network_path);
|
self.unload_outward_wires(network_path);
|
||||||
self.unload_wire(input_connector, network_path);
|
self.unload_wire(input_connector, network_path);
|
||||||
}
|
}
|
||||||
@@ -4512,7 +4512,7 @@ impl NodeNetworkInterface {
|
|||||||
pub fn create_wire(&mut self, output_connector: &OutputConnector, input_connector: &InputConnector, network_path: &[NodeId]) {
|
pub fn create_wire(&mut self, output_connector: &OutputConnector, input_connector: &InputConnector, network_path: &[NodeId]) {
|
||||||
let input = match output_connector {
|
let input = match output_connector {
|
||||||
OutputConnector::Node { node_id, output_index } => NodeInput::node(*node_id, *output_index),
|
OutputConnector::Node { node_id, output_index } => NodeInput::node(*node_id, *output_index),
|
||||||
OutputConnector::Import(import_index) => NodeInput::Network {
|
OutputConnector::Import(import_index) => NodeInput::Import {
|
||||||
import_type: graph_craft::generic!(T),
|
import_type: graph_craft::generic!(T),
|
||||||
import_index: *import_index,
|
import_index: *import_index,
|
||||||
},
|
},
|
||||||
@@ -4559,7 +4559,7 @@ impl NodeNetworkInterface {
|
|||||||
.document_node
|
.document_node
|
||||||
.inputs
|
.inputs
|
||||||
.iter()
|
.iter()
|
||||||
.all(|input| !(matches!(input, NodeInput::Node { .. }) || matches!(input, NodeInput::Network { .. })));
|
.all(|input| !(matches!(input, NodeInput::Node { .. }) || matches!(input, NodeInput::Import { .. })));
|
||||||
assert!(has_node_or_network_input, "Cannot insert node with node or network inputs. Use insert_node_group instead");
|
assert!(has_node_or_network_input, "Cannot insert node with node or network inputs. Use insert_node_group instead");
|
||||||
let Some(network) = self.network_mut(network_path) else {
|
let Some(network) = self.network_mut(network_path) else {
|
||||||
log::error!("Network not found in insert_node");
|
log::error!("Network not found in insert_node");
|
||||||
@@ -4696,7 +4696,7 @@ impl NodeNetworkInterface {
|
|||||||
node.inputs
|
node.inputs
|
||||||
.iter()
|
.iter()
|
||||||
.find(|input| input.is_exposed())
|
.find(|input| input.is_exposed())
|
||||||
.filter(|input| matches!(input, NodeInput::Node { .. } | NodeInput::Network { .. }))
|
.filter(|input| matches!(input, NodeInput::Node { .. } | NodeInput::Import { .. }))
|
||||||
.cloned()
|
.cloned()
|
||||||
});
|
});
|
||||||
// Get all upstream references
|
// Get all upstream references
|
||||||
@@ -4717,7 +4717,7 @@ impl NodeNetworkInterface {
|
|||||||
for downstream_input in &downstream_inputs_to_disconnect {
|
for downstream_input in &downstream_inputs_to_disconnect {
|
||||||
self.disconnect_input(downstream_input, network_path);
|
self.disconnect_input(downstream_input, network_path);
|
||||||
// Prevent reconnecting export to import until https://github.com/GraphiteEditor/Graphite/issues/1762 is solved
|
// Prevent reconnecting export to import until https://github.com/GraphiteEditor/Graphite/issues/1762 is solved
|
||||||
if !(matches!(reconnect_to_input, Some(NodeInput::Network { .. })) && matches!(downstream_input, InputConnector::Export(_))) {
|
if !(matches!(reconnect_to_input, Some(NodeInput::Import { .. })) && matches!(downstream_input, InputConnector::Export(_))) {
|
||||||
if let Some(reconnect_input) = &reconnect_to_input {
|
if let Some(reconnect_input) = &reconnect_to_input {
|
||||||
reconnect_node = reconnect_input.as_node().and_then(|node_id| if self.is_stack(&node_id, network_path) { Some(node_id) } else { None });
|
reconnect_node = reconnect_input.as_node().and_then(|node_id| if self.is_stack(&node_id, network_path) { Some(node_id) } else { None });
|
||||||
self.disconnect_input(&InputConnector::node(*node_id, 0), network_path);
|
self.disconnect_input(&InputConnector::node(*node_id, 0), network_path);
|
||||||
@@ -6003,7 +6003,7 @@ impl NodeNetworkInterface {
|
|||||||
self.shift_absolute_node_position(&layer.to_node(), shift, network_path);
|
self.shift_absolute_node_position(&layer.to_node(), shift, network_path);
|
||||||
self.insert_node_between(&layer.to_node(), &post_node, 0, network_path);
|
self.insert_node_between(&layer.to_node(), &post_node, 0, network_path);
|
||||||
}
|
}
|
||||||
NodeInput::Network { .. } => {
|
NodeInput::Import { .. } => {
|
||||||
log::error!("Cannot move post node to parent which connects to the imports")
|
log::error!("Cannot move post node to parent which connects to the imports")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6022,7 +6022,7 @@ impl NodeNetworkInterface {
|
|||||||
self.shift_absolute_node_position(&layer.to_node(), shift, network_path);
|
self.shift_absolute_node_position(&layer.to_node(), shift, network_path);
|
||||||
self.insert_node_between(&layer.to_node(), &post_node, 0, network_path);
|
self.insert_node_between(&layer.to_node(), &post_node, 0, network_path);
|
||||||
}
|
}
|
||||||
NodeInput::Network { .. } => {
|
NodeInput::Import { .. } => {
|
||||||
log::error!("Cannot move post node to parent which connects to the imports")
|
log::error!("Cannot move post node to parent which connects to the imports")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6225,7 +6225,7 @@ impl OutputConnector {
|
|||||||
|
|
||||||
pub fn from_input(input: &NodeInput) -> Option<Self> {
|
pub fn from_input(input: &NodeInput) -> Option<Self> {
|
||||||
match input {
|
match input {
|
||||||
NodeInput::Network { import_index, .. } => Some(Self::Import(*import_index)),
|
NodeInput::Import { import_index, .. } => Some(Self::Import(*import_index)),
|
||||||
NodeInput::Node { node_id, output_index, .. } => Some(Self::node(*node_id, *output_index)),
|
NodeInput::Node { node_id, output_index, .. } => Some(Self::node(*node_id, *output_index)),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ pub struct DocumentNode {
|
|||||||
/// The inputs to a node, which are either:
|
/// The inputs to a node, which are either:
|
||||||
/// - From other nodes within this graph [`NodeInput::Node`],
|
/// - From other nodes within this graph [`NodeInput::Node`],
|
||||||
/// - A constant value [`NodeInput::Value`],
|
/// - A constant value [`NodeInput::Value`],
|
||||||
/// - A [`NodeInput::Network`] which specifies that this input is from outside the graph, which is resolved in the graph flattening step in the case of nested networks.
|
/// - A [`NodeInput::Import`] which specifies that this input comes from outside the graph, which is resolved in the graph flattening step in the case of nested networks.
|
||||||
///
|
///
|
||||||
/// In the root network, it is resolved when evaluating the borrow tree.
|
/// In the root network, it is resolved when evaluating the borrow tree.
|
||||||
/// Ensure the click target in the encapsulating network is updated when the inputs cause the node shape to change (currently only when exposing/hiding an input)
|
/// Ensure the click target in the encapsulating network is updated when the inputs cause the node shape to change (currently only when exposing/hiding an input)
|
||||||
@@ -119,7 +119,7 @@ impl OriginalLocation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl DocumentNode {
|
impl DocumentNode {
|
||||||
/// Locate the input that is a [`NodeInput::Network`] at index `offset` and replace it with a [`NodeInput::Node`].
|
/// Locate the input that is a [`NodeInput::Import`] at index `offset` and replace it with a [`NodeInput::Node`].
|
||||||
pub fn populate_first_network_input(&mut self, node_id: NodeId, output_index: usize, offset: usize, source: impl Iterator<Item = Source>, skip: usize) {
|
pub fn populate_first_network_input(&mut self, node_id: NodeId, output_index: usize, offset: usize, source: impl Iterator<Item = Source>, skip: usize) {
|
||||||
let (index, _) = self
|
let (index, _) = self
|
||||||
.inputs
|
.inputs
|
||||||
@@ -139,28 +139,29 @@ impl DocumentNode {
|
|||||||
let DocumentNodeImplementation::ProtoNode(identifier) = self.implementation else {
|
let DocumentNodeImplementation::ProtoNode(identifier) = self.implementation else {
|
||||||
unreachable!("tried to resolve not flattened node on resolved node {self:?}");
|
unreachable!("tried to resolve not flattened node on resolved node {self:?}");
|
||||||
};
|
};
|
||||||
|
assert!(!self.inputs.iter().any(|input| matches!(input, NodeInput::Import { .. })), "received non-resolved input");
|
||||||
|
|
||||||
let (input, mut args) = (self.call_argument, ConstructionArgs::Nodes(vec![]));
|
let mut construction_args = ConstructionArgs::Nodes(vec![]);
|
||||||
assert!(!self.inputs.iter().any(|input| matches!(input, NodeInput::Network { .. })), "received non-resolved input");
|
|
||||||
|
|
||||||
// If we have one input of the type inline, set it as the construction args
|
// If we have one input of the type inline, set it as the construction args
|
||||||
if let &[NodeInput::Inline(ref inline)] = self.inputs.as_slice() {
|
if let &[NodeInput::Inline(ref inline)] = self.inputs.as_slice() {
|
||||||
args = ConstructionArgs::Inline(inline.clone());
|
construction_args = ConstructionArgs::Inline(inline.clone());
|
||||||
}
|
}
|
||||||
// If we have one input of the type inline, set it as the construction args
|
// If we have one input of the type inline, set it as the construction args
|
||||||
if let &[NodeInput::Value { ref tagged_value, .. }] = self.inputs.as_slice() {
|
if let &[NodeInput::Value { ref tagged_value, .. }] = self.inputs.as_slice() {
|
||||||
args = ConstructionArgs::Value(tagged_value.clone());
|
construction_args = ConstructionArgs::Value(tagged_value.clone());
|
||||||
}
|
}
|
||||||
if let ConstructionArgs::Nodes(nodes) = &mut args {
|
if let ConstructionArgs::Nodes(nodes) = &mut construction_args {
|
||||||
nodes.extend(self.inputs.iter().map(|input| match input {
|
nodes.extend(self.inputs.iter().map(|input| match input {
|
||||||
NodeInput::Node { node_id, .. } => *node_id,
|
NodeInput::Node { node_id, .. } => *node_id,
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
ProtoNode {
|
ProtoNode {
|
||||||
identifier,
|
identifier,
|
||||||
call_argument: input,
|
call_argument: self.call_argument,
|
||||||
construction_args: args,
|
construction_args,
|
||||||
original_location: self.original_location,
|
original_location: self.original_location,
|
||||||
skip_deduplication: self.skip_deduplication,
|
skip_deduplication: self.skip_deduplication,
|
||||||
context_features: self.context_features,
|
context_features: self.context_features,
|
||||||
@@ -178,8 +179,9 @@ pub enum NodeInput {
|
|||||||
Value { tagged_value: MemoHash<TaggedValue>, exposed: bool },
|
Value { tagged_value: MemoHash<TaggedValue>, exposed: bool },
|
||||||
|
|
||||||
// TODO: Remove import_type and get type from parent node input
|
// TODO: Remove import_type and get type from parent node input
|
||||||
/// Input that is provided by the parent network to this document node, instead of from a hardcoded value or another node within the same network.
|
/// Input that is provided by the import from the parent network to this document node network.
|
||||||
Network { import_type: Type, import_index: usize },
|
#[serde(alias = "Network")]
|
||||||
|
Import { import_type: Type, import_index: usize },
|
||||||
|
|
||||||
/// Input that is extracted from the parent scopes the node resides in. The string argument is the key.
|
/// Input that is extracted from the parent scopes the node resides in. The string argument is the key.
|
||||||
Scope(Cow<'static, str>),
|
Scope(Cow<'static, str>),
|
||||||
@@ -219,8 +221,8 @@ impl NodeInput {
|
|||||||
Self::Value { tagged_value, exposed }
|
Self::Value { tagged_value, exposed }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const fn network(import_type: Type, import_index: usize) -> Self {
|
pub const fn import(import_type: Type, import_index: usize) -> Self {
|
||||||
Self::Network { import_type, import_index }
|
Self::Import { import_type, import_index }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn scope(key: impl Into<Cow<'static, str>>) -> Self {
|
pub fn scope(key: impl Into<Cow<'static, str>>) -> Self {
|
||||||
@@ -237,7 +239,7 @@ impl NodeInput {
|
|||||||
match self {
|
match self {
|
||||||
NodeInput::Node { .. } => true,
|
NodeInput::Node { .. } => true,
|
||||||
NodeInput::Value { exposed, .. } => *exposed,
|
NodeInput::Value { exposed, .. } => *exposed,
|
||||||
NodeInput::Network { .. } => true,
|
NodeInput::Import { .. } => true,
|
||||||
NodeInput::Inline(_) => false,
|
NodeInput::Inline(_) => false,
|
||||||
NodeInput::Scope(_) => false,
|
NodeInput::Scope(_) => false,
|
||||||
NodeInput::Reflection(_) => false,
|
NodeInput::Reflection(_) => false,
|
||||||
@@ -248,9 +250,9 @@ impl NodeInput {
|
|||||||
match self {
|
match self {
|
||||||
NodeInput::Node { .. } => unreachable!("ty() called on NodeInput::Node"),
|
NodeInput::Node { .. } => unreachable!("ty() called on NodeInput::Node"),
|
||||||
NodeInput::Value { tagged_value, .. } => tagged_value.ty(),
|
NodeInput::Value { tagged_value, .. } => tagged_value.ty(),
|
||||||
NodeInput::Network { import_type, .. } => import_type.clone(),
|
NodeInput::Import { import_type, .. } => import_type.clone(),
|
||||||
NodeInput::Inline(_) => panic!("ty() called on NodeInput::Inline"),
|
NodeInput::Inline(_) => panic!("ty() called on NodeInput::Inline"),
|
||||||
NodeInput::Scope(_) => unreachable!("ty() called on NodeInput::Scope"),
|
NodeInput::Scope(_) => panic!("ty() called on NodeInput::Scope"),
|
||||||
NodeInput::Reflection(_) => concrete!(Metadata),
|
NodeInput::Reflection(_) => concrete!(Metadata),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -292,7 +294,7 @@ pub enum DocumentNodeImplementation {
|
|||||||
/// A proto node identifier which can be found in `node_registry.rs`.
|
/// A proto node identifier which can be found in `node_registry.rs`.
|
||||||
#[serde(alias = "Unresolved")] // TODO: Eventually remove this alias document upgrade code
|
#[serde(alias = "Unresolved")] // TODO: Eventually remove this alias document upgrade code
|
||||||
ProtoNode(ProtoNodeIdentifier),
|
ProtoNode(ProtoNodeIdentifier),
|
||||||
/// The Extract variant is a tag which tells the compilation process to do something special. It invokes language-level functionality built for use by the ExtractNode to enable metaprogramming.
|
/// The Extract variant is a tag which tells the compilation process to do something special: it invokes language-level functionality built for use by the ExtractNode to enable metaprogramming.
|
||||||
/// When the ExtractNode is compiled, it gets replaced by a value node containing a representation of the source code for the function/lambda of the document node that's fed into the ExtractNode
|
/// When the ExtractNode is compiled, it gets replaced by a value node containing a representation of the source code for the function/lambda of the document node that's fed into the ExtractNode
|
||||||
/// (but only that one document node, not upstream nodes).
|
/// (but only that one document node, not upstream nodes).
|
||||||
///
|
///
|
||||||
@@ -404,7 +406,7 @@ pub struct OldDocumentNode {
|
|||||||
/// The inputs to a node, which are either:
|
/// The inputs to a node, which are either:
|
||||||
/// - From other nodes within this graph [`NodeInput::Node`],
|
/// - From other nodes within this graph [`NodeInput::Node`],
|
||||||
/// - A constant value [`NodeInput::Value`],
|
/// - A constant value [`NodeInput::Value`],
|
||||||
/// - A [`NodeInput::Network`] which specifies that this input is from outside the graph, which is resolved in the graph flattening step in the case of nested networks.
|
/// - A [`NodeInput::Import`] which specifies that this input is from outside the graph, which is resolved in the graph flattening step in the case of nested networks.
|
||||||
///
|
///
|
||||||
/// In the root network, it is resolved when evaluating the borrow tree.
|
/// In the root network, it is resolved when evaluating the borrow tree.
|
||||||
/// Ensure the click target in the encapsulating network is updated when the inputs cause the node shape to change (currently only when exposing/hiding an input) by using network.update_click_target(node_id).
|
/// Ensure the click target in the encapsulating network is updated when the inputs cause the node shape to change (currently only when exposing/hiding an input) by using network.update_click_target(node_id).
|
||||||
@@ -515,7 +517,7 @@ pub struct NodeNetwork {
|
|||||||
// TODO: Eventually remove this alias document upgrade code
|
// TODO: Eventually remove this alias document upgrade code
|
||||||
#[cfg_attr(target_family = "wasm", serde(alias = "outputs", deserialize_with = "deserialize_exports"))]
|
#[cfg_attr(target_family = "wasm", serde(alias = "outputs", deserialize_with = "deserialize_exports"))]
|
||||||
pub exports: Vec<NodeInput>,
|
pub exports: Vec<NodeInput>,
|
||||||
// TODO: Instead of storing import types in each NodeInput::Network connection, the types are stored here. This is similar to how types need to be defined for parameters when creating a function in Rust.
|
// TODO: Instead of storing import types in each NodeInput::Import connection, the types are stored here. This is similar to how types need to be defined for parameters when creating a function in Rust.
|
||||||
// pub import_types: Vec<Type>,
|
// pub import_types: Vec<Type>,
|
||||||
/// The list of all nodes in this network.
|
/// The list of all nodes in this network.
|
||||||
#[serde(serialize_with = "graphene_core::vector::serialize_hashmap", deserialize_with = "graphene_core::vector::deserialize_hashmap")]
|
#[serde(serialize_with = "graphene_core::vector::serialize_hashmap", deserialize_with = "graphene_core::vector::deserialize_hashmap")]
|
||||||
@@ -737,7 +739,7 @@ impl NodeNetwork {
|
|||||||
let mut are_inputs_used = vec![false; number_of_inputs];
|
let mut are_inputs_used = vec![false; number_of_inputs];
|
||||||
for node in &self.nodes {
|
for node in &self.nodes {
|
||||||
for node_input in &node.1.inputs {
|
for node_input in &node.1.inputs {
|
||||||
if let NodeInput::Network { import_index, .. } = node_input {
|
if let NodeInput::Import { import_index, .. } = node_input {
|
||||||
if let Some(is_used) = are_inputs_used.get_mut(*import_index) {
|
if let Some(is_used) = are_inputs_used.get_mut(*import_index) {
|
||||||
*is_used = true;
|
*is_used = true;
|
||||||
}
|
}
|
||||||
@@ -827,7 +829,7 @@ impl NodeNetwork {
|
|||||||
// Match the document node input and the inputs of the inner network
|
// Match the document node input and the inputs of the inner network
|
||||||
for (nested_node_id, mut nested_node) in inner_network.nodes.into_iter() {
|
for (nested_node_id, mut nested_node) in inner_network.nodes.into_iter() {
|
||||||
for (nested_input_index, nested_input) in nested_node.clone().inputs.iter().enumerate() {
|
for (nested_input_index, nested_input) in nested_node.clone().inputs.iter().enumerate() {
|
||||||
if let NodeInput::Network { import_index, .. } = nested_input {
|
if let NodeInput::Import { import_index, .. } = nested_input {
|
||||||
let parent_input = node.inputs.get(*import_index).unwrap_or_else(|| panic!("Import index {import_index} should always exist"));
|
let parent_input = node.inputs.get(*import_index).unwrap_or_else(|| panic!("Import index {import_index} should always exist"));
|
||||||
match *parent_input {
|
match *parent_input {
|
||||||
// If the input to self is a node, connect the corresponding output of the inner network to it
|
// If the input to self is a node, connect the corresponding output of the inner network to it
|
||||||
@@ -836,9 +838,9 @@ impl NodeNetwork {
|
|||||||
let input_node = self.nodes.get_mut(&node_id).unwrap_or_else(|| panic!("unable find input node {node_id:?}"));
|
let input_node = self.nodes.get_mut(&node_id).unwrap_or_else(|| panic!("unable find input node {node_id:?}"));
|
||||||
input_node.original_location.dependants[output_index].push(nested_node_id);
|
input_node.original_location.dependants[output_index].push(nested_node_id);
|
||||||
}
|
}
|
||||||
NodeInput::Network { import_index, .. } => {
|
NodeInput::Import { import_index, .. } => {
|
||||||
let parent_input_index = import_index;
|
let parent_input_index = import_index;
|
||||||
let Some(NodeInput::Network { import_index, .. }) = nested_node.inputs.get_mut(nested_input_index) else {
|
let Some(NodeInput::Import { import_index, .. }) = nested_node.inputs.get_mut(nested_input_index) else {
|
||||||
log::error!("Nested node should have a network input");
|
log::error!("Nested node should have a network input");
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
@@ -857,7 +859,7 @@ impl NodeNetwork {
|
|||||||
}
|
}
|
||||||
self.nodes.insert(nested_node_id, nested_node);
|
self.nodes.insert(nested_node_id, nested_node);
|
||||||
}
|
}
|
||||||
// TODO: Add support for flattening exports that are NodeInput::Network (https://github.com/GraphiteEditor/Graphite/issues/1762)
|
// TODO: Add support for flattening exports that are NodeInput::Import (https://github.com/GraphiteEditor/Graphite/issues/1762)
|
||||||
|
|
||||||
// Connect all nodes that were previously connected to this node to the nodes of the inner network
|
// Connect all nodes that were previously connected to this node to the nodes of the inner network
|
||||||
for (i, export) in inner_network.exports.into_iter().enumerate() {
|
for (i, export) in inner_network.exports.into_iter().enumerate() {
|
||||||
@@ -895,7 +897,7 @@ impl NodeNetwork {
|
|||||||
// Replace value exports and imports with value nodes, added inside the nested network
|
// Replace value exports and imports with value nodes, added inside the nested network
|
||||||
for export in inputs {
|
for export in inputs {
|
||||||
let export: &mut NodeInput = export;
|
let export: &mut NodeInput = export;
|
||||||
let previous_export = std::mem::replace(export, NodeInput::network(concrete!(()), 0));
|
let previous_export = std::mem::replace(export, NodeInput::import(concrete!(()), 0));
|
||||||
|
|
||||||
let (tagged_value, exposed) = match previous_export {
|
let (tagged_value, exposed) = match previous_export {
|
||||||
NodeInput::Value { tagged_value, exposed } => (tagged_value, exposed),
|
NodeInput::Value { tagged_value, exposed } => (tagged_value, exposed),
|
||||||
@@ -1026,14 +1028,14 @@ impl NodeNetwork {
|
|||||||
node.implementation = DocumentNodeImplementation::ProtoNode("graphene_core::value::ClonedNode".into());
|
node.implementation = DocumentNodeImplementation::ProtoNode("graphene_core::value::ClonedNode".into());
|
||||||
if let Some(input) = input_node.inputs.get_mut(0) {
|
if let Some(input) = input_node.inputs.get_mut(0) {
|
||||||
*input = match &input {
|
*input = match &input {
|
||||||
NodeInput::Node { .. } => NodeInput::network(generic!(T), 0),
|
NodeInput::Node { .. } => NodeInput::import(generic!(T), 0),
|
||||||
ni => NodeInput::network(ni.ty(), 0),
|
ni => NodeInput::import(ni.ty(), 0),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
for input in input_node.inputs.iter_mut() {
|
for input in input_node.inputs.iter_mut() {
|
||||||
if let NodeInput::Node { .. } = input {
|
if let NodeInput::Node { .. } = input {
|
||||||
*input = NodeInput::network(generic!(T), 0)
|
*input = NodeInput::import(generic!(T), 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
node.inputs = vec![NodeInput::value(TaggedValue::DocumentNode(input_node), false)];
|
node.inputs = vec![NodeInput::value(TaggedValue::DocumentNode(input_node), false)];
|
||||||
@@ -1139,7 +1141,7 @@ mod test {
|
|||||||
(
|
(
|
||||||
NodeId(0),
|
NodeId(0),
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(u32), 0), NodeInput::network(concrete!(u32), 1)],
|
inputs: vec![NodeInput::import(concrete!(u32), 0), NodeInput::import(concrete!(u32), 1)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode("graphene_core::structural::ConsNode".into()),
|
implementation: DocumentNodeImplementation::ProtoNode("graphene_core::structural::ConsNode".into()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
@@ -1169,7 +1171,7 @@ mod test {
|
|||||||
(
|
(
|
||||||
NodeId(1),
|
NodeId(1),
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(u32), 0), NodeInput::network(concrete!(u32), 1)],
|
inputs: vec![NodeInput::import(concrete!(u32), 0), NodeInput::import(concrete!(u32), 1)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode("graphene_core::structural::ConsNode".into()),
|
implementation: DocumentNodeImplementation::ProtoNode("graphene_core::structural::ConsNode".into()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
@@ -1228,7 +1230,7 @@ mod test {
|
|||||||
nodes: [(
|
nodes: [(
|
||||||
NodeId(1),
|
NodeId(1),
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(u32), 0), NodeInput::value(TaggedValue::U32(2), false)],
|
inputs: vec![NodeInput::import(concrete!(u32), 0), NodeInput::value(TaggedValue::U32(2), false)],
|
||||||
implementation: DocumentNodeImplementation::Network(add_network()),
|
implementation: DocumentNodeImplementation::Network(add_network()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
@@ -1391,7 +1393,7 @@ mod test {
|
|||||||
(
|
(
|
||||||
NodeId(1),
|
NodeId(1),
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(u32), 0)],
|
inputs: vec![NodeInput::import(concrete!(u32), 0)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(graphene_core::ops::identity::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(graphene_core::ops::identity::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
@@ -1399,7 +1401,7 @@ mod test {
|
|||||||
(
|
(
|
||||||
NodeId(2),
|
NodeId(2),
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(concrete!(u32), 1)],
|
inputs: vec![NodeInput::import(concrete!(u32), 1)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(graphene_core::ops::identity::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(graphene_core::ops::identity::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -32,13 +32,11 @@ pub fn wrap_network_in_scope(mut network: NodeNetwork, editor_api: Arc<WasmEdito
|
|||||||
nodes: [
|
nodes: [
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::scope("editor-api")],
|
inputs: vec![NodeInput::scope("editor-api")],
|
||||||
call_argument: concrete!(Context),
|
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("wgpu_executor::CreateGpuSurfaceNode")),
|
implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("wgpu_executor::CreateGpuSurfaceNode")),
|
||||||
skip_deduplication: true,
|
skip_deduplication: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
call_argument: concrete!(Context),
|
|
||||||
inputs: vec![NodeInput::node(NodeId(0), 0)],
|
inputs: vec![NodeInput::node(NodeId(0), 0)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(graphene_core::memo::memo::IDENTIFIER),
|
implementation: DocumentNodeImplementation::ProtoNode(graphene_core::memo::memo::IDENTIFIER),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -48,7 +46,7 @@ pub fn wrap_network_in_scope(mut network: NodeNetwork, editor_api: Arc<WasmEdito
|
|||||||
call_argument: concrete!(graphene_std::application_io::RenderConfig),
|
call_argument: concrete!(graphene_std::application_io::RenderConfig),
|
||||||
inputs: vec![
|
inputs: vec![
|
||||||
NodeInput::scope("editor-api"),
|
NodeInput::scope("editor-api"),
|
||||||
NodeInput::network(graphene_core::Type::Fn(Box::new(concrete!(Context)), Box::new(generic!(T))), 0),
|
NodeInput::import(graphene_core::Type::Fn(Box::new(concrete!(Context)), Box::new(generic!(T))), 0),
|
||||||
NodeInput::node(NodeId(1), 0),
|
NodeInput::node(NodeId(1), 0),
|
||||||
],
|
],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_std::wasm_application_io::RenderNode")),
|
implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_std::wasm_application_io::RenderNode")),
|
||||||
|
|||||||
@@ -86,15 +86,14 @@ pub fn generate_node_substitutions() -> HashMap<ProtoNodeIdentifier, DocumentNod
|
|||||||
};
|
};
|
||||||
|
|
||||||
DocumentNode {
|
DocumentNode {
|
||||||
inputs: vec![NodeInput::network(input.clone(), i)],
|
inputs: vec![NodeInput::import(input.clone(), i)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(proto_node),
|
implementation: DocumentNodeImplementation::ProtoNode(proto_node),
|
||||||
visible: true,
|
visible: true,
|
||||||
call_argument: concrete!(Context),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => DocumentNode {
|
_ => DocumentNode {
|
||||||
inputs: vec![NodeInput::network(generic!(X), i)],
|
inputs: vec![NodeInput::import(generic!(X), i)],
|
||||||
implementation: DocumentNodeImplementation::ProtoNode(identity_node.clone()),
|
implementation: DocumentNodeImplementation::ProtoNode(identity_node.clone()),
|
||||||
visible: false,
|
visible: false,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|||||||
Reference in New Issue
Block a user