@@ -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 { }
@@ -295,6 +295,7 @@ impl PerPixelAdjustCodegen<'_> {
295295 let mut parsed_node_fn = ParsedNodeFn {
296296 vis : self . parsed . vis . clone ( ) ,
297297 attributes : NodeFnAttributes {
298+ display_name : self . parsed . attributes . display_name . as_ref ( ) . map ( |name| LitStr :: new ( & format ! ( "{} GPU" , name. value( ) ) , name. span ( ) ) ) ,
298299 shader_node : Some ( ShaderNodeType :: GpuNode ) ,
299300 ..self . parsed . attributes . clone ( )
300301 } ,
@@ -312,7 +313,7 @@ impl PerPixelAdjustCodegen<'_> {
312313 is_async : true ,
313314 fields,
314315 body,
315- description : "" . to_string ( ) ,
316+ description : self . parsed . description . clone ( ) ,
316317 } ;
317318 parsed_node_fn. replace_impl_trait_in_input ( ) ;
318319 let gpu_node_impl = crate :: codegen:: generate_node_code ( self . crate_ident , & parsed_node_fn) ?;
0 commit comments