Clean up document message wrappers around proto nodes so they're now used directly (#4101)

* Rename the 'Identity' node to 'Passthrough' internally

* Rename the 'Memoize'  node to 'Cache' internally

* Let skip_impl proto nodes auto-generate as document node definitions

* Remove the wrapper 'Passthrough' node from document_node_definitions.rs

* Remove the wrapper 'Cache' node from document_node_definitions.rs

* Remove the wrapper 'Monitor' node from document_node_definitions.rs

* Remove the wrapper 'Noise Pattern' node from document_node_definitions.rs

* Remove the wrapper 'Brush' node from document_node_definitions.rs

* Remove the wrapper 'Transform' node from document_node_definitions.rs

* Code review improvements

* Rename Cache node back to Memoize

* More code review
This commit is contained in:
Keavon Chambers
2026-05-03 19:26:36 -07:00
committed by GitHub
parent b27b4c6be7
commit 21e5e06b0b
29 changed files with 408 additions and 662 deletions

View File

@@ -6,7 +6,7 @@ pub mod util;
mod tests {
use core_types::*;
use futures::executor::block_on;
use graphene_core::ops::identity;
use graphene_core::ops::passthrough;
#[test]
fn double_number() {
@@ -16,17 +16,17 @@ mod tests {
let network = NodeNetwork {
exports: vec![NodeInput::node(NodeId(1), 0)],
nodes: [
// Simple identity node taking a number as input from outside the graph
// Simple passthrough node taking a number as input from outside the graph
(
NodeId(0),
DocumentNode {
inputs: vec![],
call_argument: concrete!(u32),
implementation: DocumentNodeImplementation::ProtoNode(identity::IDENTIFIER),
implementation: DocumentNodeImplementation::ProtoNode(passthrough::IDENTIFIER),
..Default::default()
},
),
// An add node adding the result of the id node to its self
// An add node adding the result of the passthrough node to its self
(
NodeId(1),
DocumentNode {