@@ -7,7 +7,7 @@ use quote::{ToTokens, format_ident, quote};
77use std:: borrow:: Cow ;
88use syn:: parse:: { Parse , ParseStream } ;
99use syn:: punctuated:: Punctuated ;
10- use syn:: { PatIdent , Type , parse_quote} ;
10+ use syn:: { LitStr , PatIdent , Type , parse_quote} ;
1111
1212#[ derive( Debug , Clone ) ]
1313pub struct PerPixelAdjust { }
@@ -293,6 +293,7 @@ impl PerPixelAdjustCodegen<'_> {
293293 let mut parsed_node_fn = ParsedNodeFn {
294294 vis : self . parsed . vis . clone ( ) ,
295295 attributes : NodeFnAttributes {
296+ display_name : self . parsed . attributes . display_name . as_ref ( ) . map ( |name| LitStr :: new ( & format ! ( "{} GPU" , name. value( ) ) , name. span ( ) ) ) ,
296297 shader_node : Some ( ShaderNodeType :: ShaderNode ) ,
297298 ..self . parsed . attributes . clone ( )
298299 } ,
@@ -310,7 +311,7 @@ impl PerPixelAdjustCodegen<'_> {
310311 is_async : true ,
311312 fields,
312313 body,
313- description : "" . to_string ( ) ,
314+ description : self . parsed . description . clone ( ) ,
314315 } ;
315316 parsed_node_fn. replace_impl_trait_in_input ( ) ;
316317 let gpu_node_impl = crate :: codegen:: generate_node_code ( self . crate_ident , & parsed_node_fn) ?;
0 commit comments