You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: node-graph/graph-craft/src/document.rs
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ use glam::IVec2;
7
7
use graphene_core::memo::MemoHashGuard;
8
8
pubuse graphene_core::uuid::NodeId;
9
9
pubuse graphene_core::uuid::generate_uuid;
10
-
use graphene_core::{Context,Cow,MemoHash,ProtoNodeIdentifier,Type};
10
+
use graphene_core::{Context,ContextDependencies,Cow,MemoHash,ProtoNodeIdentifier,Type};
11
11
use log::Metadata;
12
12
use rustc_hash::FxHashMap;
13
13
use std::collections::HashMap;
@@ -129,6 +129,9 @@ pub struct DocumentNode {
129
129
/// The path to this node and its inputs and outputs as of when [`NodeNetwork::generate_node_paths`] was called.
130
130
#[serde(skip)]
131
131
puboriginal_location:OriginalLocation,
132
+
// List of Extract and Inject annotations for the Context
133
+
#[serde(default)]
134
+
pubcontext_features:ContextDependencies,
132
135
}
133
136
134
137
/// Represents the original location of a node input/output when [`NodeNetwork::generate_node_paths`] was called, allowing the types and errors to be derived.
@@ -163,6 +166,7 @@ impl Default for DocumentNode {
// TODO: Implement full context flow analysis with:
300
+
// 1. DFS traversal to track context feature requirements
301
+
// 2. Branch convergence analysis
302
+
// 3. Post-injection nullification
303
+
// 4. Insert ContextModificationNode instances where beneficial
304
+
305
+
Ok(())
306
+
}
307
+
293
308
/// Inserts a [`structural::ComposeNode`] for each node that has a [`ProtoNodeInput::Node`]. The compose node evaluates the first node, and then sends the result into the second node.
use gcore::{Node,NodeIOTypes, concrete, fn_type, fn_type_fut, future,ProtoNodeIdentifier,WasmNotSync,NodeIO};
332
+
use gcore::{Node,NodeIOTypes, concrete, fn_type, fn_type_fut, future,ProtoNodeIdentifier,WasmNotSync,NodeIO,ContextFeature};
331
333
use gcore::value::ClonedNode;
332
334
use gcore::ops::TypeNode;
333
335
use gcore::registry::{NodeMetadata,FieldMetadata,NODE_REGISTRY,NODE_METADATA,DynAnyNode,DowncastBothNode,DynFuture,TypeErasedBox,PanicNode,RegistryValueSource,RegistryWidgetOverride};
0 commit comments