Make copying/duplicating nodes not preserve the incoming connection (#917)

* Remove wires to nodes outside of copy

* Fix logic error

* Shift pasted nodes

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2022-12-28 20:00:53 +00:00
committed by Keavon Chambers
co-authored by Keavon Chambers
parent c552edd525
commit b408bef14b
4 changed files with 88 additions and 40 deletions
@@ -173,7 +173,7 @@ impl Fsm for ImaginateToolFsmState {
name: "Input".into(),
inputs: vec![NodeInput::Network],
implementation: DocumentNodeImplementation::Unresolved(NodeIdentifier::new("graphene_core::ops::IdNode", &[generic!("T")])),
metadata: DocumentNodeMetadata { position: (8, 4) },
metadata: DocumentNodeMetadata { position: (8, 4).into() },
},
),
(
@@ -182,7 +182,7 @@ impl Fsm for ImaginateToolFsmState {
name: "Output".into(),
inputs: vec![NodeInput::Node(2)],
implementation: DocumentNodeImplementation::Unresolved(NodeIdentifier::new("graphene_core::ops::IdNode", &[generic!("T")])),
metadata: DocumentNodeMetadata { position: (32, 4) },
metadata: DocumentNodeMetadata { position: (32, 4).into() },
},
),
(
@@ -192,7 +192,7 @@ impl Fsm for ImaginateToolFsmState {
inputs: imaginate_inputs,
// TODO: Allow inserting nodes that contain other nodes.
implementation: DocumentNodeImplementation::Network(imaginate_inner_network),
metadata: graph_craft::document::DocumentNodeMetadata { position: (20, 4) },
metadata: graph_craft::document::DocumentNodeMetadata { position: (20, 4).into() },
},
),
]
@@ -148,7 +148,7 @@ impl Fsm for NodeGraphToolFsmState {
name: "Input".into(),
inputs: vec![NodeInput::Network],
implementation: DocumentNodeImplementation::Unresolved(NodeIdentifier::new("graphene_core::ops::IdNode", &[generic!("T")])),
metadata: DocumentNodeMetadata { position: (8, 4) },
metadata: DocumentNodeMetadata { position: (8, 4).into() },
},
),
(
@@ -157,7 +157,7 @@ impl Fsm for NodeGraphToolFsmState {
name: "Output".into(),
inputs: vec![NodeInput::Node(0)],
implementation: DocumentNodeImplementation::Unresolved(NodeIdentifier::new("graphene_core::ops::IdNode", &[generic!("T")])),
metadata: DocumentNodeMetadata { position: (20, 4) },
metadata: DocumentNodeMetadata { position: (20, 4).into() },
},
),
]