Skip to content

Node graph improvements #855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Nov 17, 2022
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
use crate::messages::prelude::*;
use graph_craft::document::{value::TaggedValue, NodeId};
use graph_craft::proto::NodeIdentifier;

#[remain::sorted]
#[impl_message(Message, DocumentMessage, NodeGraph)]
#[derive(PartialEq, Clone, Debug, serde::Serialize, serde::Deserialize)]
pub enum NodeGraphMessage {
// Messages
AddLink {
from: NodeId,
to: NodeId,
to_index: usize,
},
CloseNodeGraph,
ConnectNodesByLink {
output_node: u64,
input_node: u64,
input_node_connector_index: u32,
input_node_connector_index: usize,
},
CreateNode {
// Having the caller generate the id means that we don't have to return it. This can be a random u64.
node_id: NodeId,
// I don't really know what this is for (perhaps a user identifiable name).
name: String,
// The node identifier must mach that found in `node-graph/graph-craft/src/node_registry.rs` e.g. "graphene_core::raster::GrayscaleNode
identifier: NodeIdentifier,
num_inputs: u32,
node_type: String,
},
DeleteNode {
node_id: NodeId,
},
ExposeInput {
node_id: NodeId,
input_index: usize,
new_exposed: bool,
},
MoveSelectedNodes {
displacement_x: i32,
displacement_y: i32,
},
OpenNodeGraph {
layer_path: Vec<graphene::LayerId>,
},
Expand Down
Loading