1- use graph_craft:: ProtoNodeIdentifier ;
21use graph_craft:: application_io:: PlatformEditorApi ;
32use graph_craft:: concrete;
43use graph_craft:: document:: value:: TaggedValue ;
@@ -8,7 +7,6 @@ use graphene_std::Context;
87use graphene_std:: ContextFeatures ;
98use graphene_std:: uuid:: NodeId ;
109use std:: sync:: Arc ;
11- use wgpu_executor:: WgpuExecutor ;
1210
1311pub fn wrap_network_in_scope ( network : NodeNetwork , editor_api : Arc < PlatformEditorApi > ) -> NodeNetwork {
1412 let inner_network = DocumentNode {
@@ -40,7 +38,7 @@ pub fn wrap_network_in_scope(network: NodeNetwork, editor_api: Arc<PlatformEdito
4038 } ,
4139 DocumentNode {
4240 call_argument : concrete ! ( Context ) ,
43- inputs : vec ! [ NodeInput :: scope( "editor-api" ) , NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
41+ inputs : vec ! [ NodeInput :: scope( graphene_std :: platform_application_io :: wgpu_executor :: IDENTIFIER ) , NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
4442 implementation : DocumentNodeImplementation :: ProtoNode ( graphene_std:: render_node:: render:: IDENTIFIER ) ,
4543 context_features : graphene_std:: ContextDependencies {
4644 extract : ContextFeatures :: FOOTPRINT | ContextFeatures :: VARARGS ,
@@ -50,7 +48,11 @@ pub fn wrap_network_in_scope(network: NodeNetwork, editor_api: Arc<PlatformEdito
5048 } ,
5149 DocumentNode {
5250 call_argument : concrete ! ( Context ) ,
53- inputs : vec ! [ NodeInput :: scope( "editor-api" ) , NodeInput :: node( NodeId ( 1 ) , 0 ) ] ,
51+ inputs : vec ! [
52+ NodeInput :: scope( graphene_std:: platform_application_io:: wgpu_executor:: IDENTIFIER ) ,
53+ NodeInput :: scope( "editor-api" ) ,
54+ NodeInput :: node( NodeId ( 1 ) , 0 ) ,
55+ ] ,
5456 implementation : DocumentNodeImplementation :: ProtoNode ( graphene_std:: render_cache:: render_output_cache:: IDENTIFIER ) ,
5557 context_features : graphene_std:: ContextDependencies {
5658 extract : ContextFeatures :: FOOTPRINT | ContextFeatures :: VARARGS ,
@@ -60,8 +62,8 @@ pub fn wrap_network_in_scope(network: NodeNetwork, editor_api: Arc<PlatformEdito
6062 } ,
6163 DocumentNode {
6264 call_argument : concrete ! ( Context ) ,
63- inputs : vec ! [ NodeInput :: scope( "editor-api" ) , NodeInput :: node( NodeId ( 2 ) , 0 ) ] ,
64- implementation : DocumentNodeImplementation :: ProtoNode ( graphene_std:: pixel_preview :: pixel_preview :: IDENTIFIER ) ,
65+ inputs : vec ! [ NodeInput :: scope( graphene_std :: render_pixel_preview :: pixel_preview_pipeline :: IDENTIFIER ) , NodeInput :: node( NodeId ( 2 ) , 0 ) ] ,
66+ implementation : DocumentNodeImplementation :: ProtoNode ( graphene_std:: render_pixel_preview :: render_pixel_preview :: IDENTIFIER ) ,
6567 context_features : graphene_std:: ContextDependencies {
6668 extract : ContextFeatures :: FOOTPRINT | ContextFeatures :: VARARGS ,
6769 inject : ContextFeatures :: FOOTPRINT | ContextFeatures :: VARARGS ,
@@ -70,8 +72,11 @@ pub fn wrap_network_in_scope(network: NodeNetwork, editor_api: Arc<PlatformEdito
7072 } ,
7173 DocumentNode {
7274 call_argument : concrete ! ( Context ) ,
73- inputs : vec ! [ NodeInput :: scope( "editor-api" ) , NodeInput :: node( NodeId ( 3 ) , 0 ) ] ,
74- implementation : DocumentNodeImplementation :: ProtoNode ( graphene_std:: render_node:: render_background:: IDENTIFIER ) ,
75+ inputs : vec ! [
76+ NodeInput :: scope( graphene_std:: render_background:: background_compositor_pipeline:: IDENTIFIER ) ,
77+ NodeInput :: node( NodeId ( 3 ) , 0 ) ,
78+ ] ,
79+ implementation : DocumentNodeImplementation :: ProtoNode ( graphene_std:: render_background:: render_background:: IDENTIFIER ) ,
7580 context_features : graphene_std:: ContextDependencies {
7681 extract : ContextFeatures :: FOOTPRINT | ContextFeatures :: VARARGS ,
7782 inject : ContextFeatures :: empty ( ) ,
@@ -100,7 +105,7 @@ pub fn wrap_network_in_scope(network: NodeNetwork, editor_api: Arc<PlatformEdito
100105 } ;
101106
102107 // wrap the inner network in a scope
103- let mut nodes = vec ! [
108+ let nodes = vec ! [
104109 inner_network,
105110 render_node,
106111 DocumentNode {
@@ -109,16 +114,7 @@ pub fn wrap_network_in_scope(network: NodeNetwork, editor_api: Arc<PlatformEdito
109114 ..Default :: default ( )
110115 } ,
111116 ] ;
112- let mut scope_injections = vec ! [ ( "editor-api" . to_string( ) , ( NodeId ( 2 ) , concrete!( & PlatformEditorApi ) ) ) ] ;
113-
114- if cfg ! ( feature = "gpu" ) {
115- nodes. push ( DocumentNode {
116- implementation : DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new ( "graphene_core::ops::IntoNode<&WgpuExecutor>" ) ) ,
117- inputs : vec ! [ NodeInput :: node( NodeId ( 2 ) , 0 ) ] ,
118- ..Default :: default ( )
119- } ) ;
120- scope_injections. push ( ( "wgpu-executor" . to_string ( ) , ( NodeId ( 3 ) , concrete ! ( & WgpuExecutor ) ) ) ) ;
121- }
117+ let scope_injections = vec ! [ ( "editor-api" . to_string( ) , ( NodeId ( 2 ) , concrete!( & PlatformEditorApi ) ) ) ] ;
122118
123119 NodeNetwork {
124120 exports : vec ! [ NodeInput :: node( NodeId ( 1 ) , 0 ) ] ,
0 commit comments