@@ -17,7 +17,7 @@ use graphene_std::raster::color::Color;
1717use graphene_std:: raster:: * ;
1818use graphene_std:: raster:: { CPU , Raster } ;
1919use graphene_std:: render_node:: RenderIntermediate ;
20- use graphene_std:: table:: Table ;
20+ use graphene_std:: table:: { AttributeColumnDyn , AttributeValueDyn , Table , TableDyn } ;
2121use graphene_std:: transform:: Footprint ;
2222use graphene_std:: uuid:: NodeId ;
2323use graphene_std:: vector:: Vector ;
@@ -42,6 +42,54 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
4242 convert_node!( from: Table <Raster <CPU >>, to: Table <Graphic >) ,
4343 #[ cfg( feature = "gpu" ) ]
4444 convert_node!( from: Table <Raster <GPU >>, to: Table <Graphic >) ,
45+ // Type-erased attribute column conversions for the `Attach Attribute` node, so it monomorphizes only over the destination table type.
46+ convert_node!( from: Table <Artboard >, to: AttributeColumnDyn ) ,
47+ convert_node!( from: Table <Graphic >, to: AttributeColumnDyn ) ,
48+ convert_node!( from: Table <Vector >, to: AttributeColumnDyn ) ,
49+ convert_node!( from: Table <Raster <CPU >>, to: AttributeColumnDyn ) ,
50+ convert_node!( from: Table <Color >, to: AttributeColumnDyn ) ,
51+ convert_node!( from: Table <GradientStops >, to: AttributeColumnDyn ) ,
52+ convert_node!( from: Table <f64 >, to: AttributeColumnDyn ) ,
53+ convert_node!( from: Table <bool >, to: AttributeColumnDyn ) ,
54+ convert_node!( from: Table <String >, to: AttributeColumnDyn ) ,
55+ convert_node!( from: Table <DAffine2 >, to: AttributeColumnDyn ) ,
56+ convert_node!( from: Table <BlendMode >, to: AttributeColumnDyn ) ,
57+ convert_node!( from: Table <graphene_std:: vector:: style:: GradientType >, to: AttributeColumnDyn ) ,
58+ convert_node!( from: Table <graphene_std:: vector:: style:: GradientSpreadMethod >, to: AttributeColumnDyn ) ,
59+ convert_node!( from: Table <Artboard >, to: TableDyn ) ,
60+ convert_node!( from: Table <Graphic >, to: TableDyn ) ,
61+ convert_node!( from: Table <Vector >, to: TableDyn ) ,
62+ convert_node!( from: Table <Raster <CPU >>, to: TableDyn ) ,
63+ #[ cfg( feature = "gpu" ) ]
64+ convert_node!( from: Table <Raster <GPU >>, to: TableDyn ) ,
65+ convert_node!( from: Table <Color >, to: TableDyn ) ,
66+ convert_node!( from: Table <GradientStops >, to: TableDyn ) ,
67+ convert_node!( from: Table <f64 >, to: TableDyn ) ,
68+ convert_node!( from: Table <bool >, to: TableDyn ) ,
69+ convert_node!( from: Table <String >, to: TableDyn ) ,
70+ convert_node!( from: Table <u8 >, to: TableDyn ) ,
71+ convert_node!( from: Table <NodeId >, to: TableDyn ) ,
72+ convert_node!( from: Table <DAffine2 >, to: TableDyn ) ,
73+ convert_node!( from: Table <BlendMode >, to: TableDyn ) ,
74+ convert_node!( from: Table <graphene_std:: vector:: style:: GradientType >, to: TableDyn ) ,
75+ convert_node!( from: Table <graphene_std:: vector:: style:: GradientSpreadMethod >, to: TableDyn ) ,
76+ // Type-erased attribute value conversions for the `Write Attribute` node, so it monomorphizes only over the destination table type.
77+ convert_node!( from: f64 , to: AttributeValueDyn ) ,
78+ convert_node!( from: u32 , to: AttributeValueDyn ) ,
79+ convert_node!( from: u64 , to: AttributeValueDyn ) ,
80+ convert_node!( from: bool , to: AttributeValueDyn ) ,
81+ convert_node!( from: String , to: AttributeValueDyn ) ,
82+ convert_node!( from: DVec2 , to: AttributeValueDyn ) ,
83+ convert_node!( from: DAffine2 , to: AttributeValueDyn ) ,
84+ convert_node!( from: Color , to: AttributeValueDyn ) ,
85+ convert_node!( from: BlendMode , to: AttributeValueDyn ) ,
86+ convert_node!( from: graphene_std:: vector:: style:: GradientType , to: AttributeValueDyn ) ,
87+ convert_node!( from: graphene_std:: vector:: style:: GradientSpreadMethod , to: AttributeValueDyn ) ,
88+ convert_node!( from: Table <String >, to: AttributeValueDyn ) ,
89+ convert_node!( from: Table <NodeId >, to: AttributeValueDyn ) ,
90+ convert_node!( from: Table <Color >, to: AttributeValueDyn ) ,
91+ convert_node!( from: Table <GradientStops >, to: AttributeValueDyn ) ,
92+ convert_node!( from: Table <Graphic >, to: AttributeValueDyn ) ,
4593 // into_node!(from: Table<Raster<CPU>>, to: Table<Raster<SRGBA8>>),
4694 #[ cfg( feature = "gpu" ) ]
4795 into_node!( from: & PlatformEditorApi , to: & WgpuExecutor ) ,
@@ -99,6 +147,14 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
99147 async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => Table <NodeId >] ) ,
100148 async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => Table <f64 >] ) ,
101149 async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => Table <u8 >] ) ,
150+ async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => Table <bool >] ) ,
151+ async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => Table <DAffine2 >] ) ,
152+ async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => Table <BlendMode >] ) ,
153+ async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => Table <graphene_std:: vector:: style:: GradientType >] ) ,
154+ async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => Table <graphene_std:: vector:: style:: GradientSpreadMethod >] ) ,
155+ async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => AttributeColumnDyn ] ) ,
156+ async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => AttributeValueDyn ] ) ,
157+ async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => TableDyn ] ) ,
102158 async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => Graphic ] ) ,
103159 async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => graphene_std:: text:: Font ] ) ,
104160 async_node!( graphene_core:: memo:: MonitorNode <_, _, _>, input: Context , fn_params: [ Context => Table <BrushStroke >] ) ,
@@ -138,11 +194,14 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
138194 async_node!( graphene_core:: context_modification:: ContextModificationNode <_, _>, input: Context , fn_params: [ Context => & PlatformEditorApi , Context => graphene_std:: ContextFeatures ] ) ,
139195 async_node!( graphene_core:: context_modification:: ContextModificationNode <_, _>, input: Context , fn_params: [ Context => RenderIntermediate , Context => graphene_std:: ContextFeatures ] ) ,
140196 async_node!( graphene_core:: context_modification:: ContextModificationNode <_, _>, input: Context , fn_params: [ Context => RenderOutput , Context => graphene_std:: ContextFeatures ] ) ,
197+ async_node!( graphene_core:: context_modification:: ContextModificationNode <_, _>, input: Context , fn_params: [ Context => AttributeColumnDyn , Context => graphene_std:: ContextFeatures ] ) ,
198+ async_node!( graphene_core:: context_modification:: ContextModificationNode <_, _>, input: Context , fn_params: [ Context => AttributeValueDyn , Context => graphene_std:: ContextFeatures ] ) ,
199+ async_node!( graphene_core:: context_modification:: ContextModificationNode <_, _>, input: Context , fn_params: [ Context => TableDyn , Context => graphene_std:: ContextFeatures ] ) ,
141200 #[ cfg( target_family = "wasm" ) ]
142201 async_node!( graphene_core:: context_modification:: ContextModificationNode <_, _>, input: Context , fn_params: [ Context => CanvasHandle , Context => graphene_std:: ContextFeatures ] ) ,
143- // =============
144- // MEMOIZE NODES
145- // =============
202+ // ==========
203+ // MEMO NODES
204+ // ==========
146205 async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => ( ) ] ) ,
147206 async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => bool ] ) ,
148207 async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => Table <Artboard >] ) ,
@@ -156,6 +215,14 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
156215 async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => Table <NodeId >] ) ,
157216 async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => Table <f64 >] ) ,
158217 async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => Table <u8 >] ) ,
218+ async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => Table <bool >] ) ,
219+ async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => Table <DAffine2 >] ) ,
220+ async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => Table <BlendMode >] ) ,
221+ async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => Table <graphene_std:: vector:: style:: GradientType >] ) ,
222+ async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => Table <graphene_std:: vector:: style:: GradientSpreadMethod >] ) ,
223+ async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => AttributeColumnDyn ] ) ,
224+ async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => AttributeValueDyn ] ) ,
225+ async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => TableDyn ] ) ,
159226 #[ cfg( target_family = "wasm" ) ]
160227 async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => CanvasHandle ] ) ,
161228 async_node!( graphene_core:: memo:: MemoizeNode <_, _>, input: Context , fn_params: [ Context => f64 ] ) ,
0 commit comments