mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
Rework the runtime delta experiment to the agreed shape: graph-craft structural deltas, an editor metadata wrapper, and diff-derived metadata ops
This commit is contained in:
@@ -7,6 +7,7 @@ pub use core_types::{ProtoNodeIdentifier, Type, TypeDescriptor, concrete, descri
|
||||
|
||||
pub mod application_io;
|
||||
pub mod document;
|
||||
pub mod runtime_delta;
|
||||
pub use document::{DocumentNode, NodeNetwork};
|
||||
pub mod graphene_compiler;
|
||||
pub mod proto;
|
||||
|
||||
30
node-graph/graph-craft/src/runtime_delta.rs
Normal file
30
node-graph/graph-craft/src/runtime_delta.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
use crate::document::{DocumentNode, NodeId, NodeInput};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum RuntimeDelta {
|
||||
AddNode {
|
||||
network_path: Vec<NodeId>,
|
||||
node_id: NodeId,
|
||||
node: Box<DocumentNode>,
|
||||
},
|
||||
ReplaceNode {
|
||||
network_path: Vec<NodeId>,
|
||||
node_id: NodeId,
|
||||
node: Box<DocumentNode>,
|
||||
},
|
||||
RemoveNode {
|
||||
network_path: Vec<NodeId>,
|
||||
node_id: NodeId,
|
||||
},
|
||||
SetInput {
|
||||
network_path: Vec<NodeId>,
|
||||
node_id: NodeId,
|
||||
input_index: usize,
|
||||
input: NodeInput,
|
||||
},
|
||||
SetExport {
|
||||
network_path: Vec<NodeId>,
|
||||
export_index: usize,
|
||||
input: NodeInput,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user