Migrate pass through and value node to identity implementation

This commit is contained in:
Adam
2025-07-06 13:23:24 -07:00
parent 007812077b
commit 7ecd1d0054
11 changed files with 83 additions and 68 deletions

View File

@@ -20,7 +20,13 @@ mod tests {
NodeId(0),
DocumentNode {
inputs: vec![NodeInput::network(concrete!(u32), 0)],
<<<<<<< HEAD
implementation: DocumentNodeImplementation::ProtoNode(ops::identity::IDENTIFIER),
||||||| parent of 8e045313 (Migrate pass through and value node to identity implementation)
implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_core::ops::IdentityNode")),
=======
implementation: DocumentNodeImplementation::ProtoNode(ProtoNodeIdentifier::new("graphene_std::any::IdentityNode")),
>>>>>>> 8e045313 (Migrate pass through and value node to identity implementation)
..Default::default()
},
),

View File

@@ -14,7 +14,7 @@ use graphene_std::Context;
use graphene_std::GraphicElement;
#[cfg(feature = "gpu")]
use graphene_std::any::DowncastBothNode;
use graphene_std::any::{ComposeTypeErased, DynAnyNode, IntoTypeErasedNode, Value};
use graphene_std::any::{ComposeTypeErased, DynAnyNode, IdentityNode, IntoTypeErasedNode};
use graphene_std::application_io::{ImageTexture, SurfaceFrame};
#[cfg(feature = "gpu")]
use graphene_std::wasm_application_io::{WasmEditorApi, WasmSurfaceHandle};
@@ -115,10 +115,10 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
),
),
(
ProtoNodeIdentifier::new("graphene_core::any::ValueNode"),
ProtoNodeIdentifier::new("graphene_std::any::IdentityNode"),
|args| {
Box::pin(async move {
let node = Value::new(args[0].clone());
let node = IdentityNode::new(args[0].clone());
node.into_type_erased()
})
},

View File

@@ -68,7 +68,13 @@ pub fn wrap_network_in_scope(mut network: NodeNetwork, editor_api: Arc<WasmEdito
inner_network,
render_node,
DocumentNode {
<<<<<<< HEAD
implementation: DocumentNodeImplementation::ProtoNode(graphene_std::ops::identity::IDENTIFIER),
||||||| parent of 8e045313 (Migrate pass through and value node to identity implementation)
implementation: DocumentNodeImplementation::proto("graphene_core::ops::IdentityNode"),
=======
implementation: DocumentNodeImplementation::proto("graphene_std::any::IdentityNode"),
>>>>>>> 8e045313 (Migrate pass through and value node to identity implementation)
inputs: vec![NodeInput::value(TaggedValue::EditorApi(editor_api), false)],
..Default::default()
},