@@ -7,7 +7,7 @@ use quote::{ToTokens, format_ident, quote};
7
7
use std:: borrow:: Cow ;
8
8
use syn:: parse:: { Parse , ParseStream } ;
9
9
use syn:: punctuated:: Punctuated ;
10
- use syn:: { PatIdent , Type , parse_quote} ;
10
+ use syn:: { LitStr , PatIdent , Type , parse_quote} ;
11
11
12
12
#[ derive( Debug , Clone ) ]
13
13
pub struct PerPixelAdjust { }
@@ -295,6 +295,7 @@ impl PerPixelAdjustCodegen<'_> {
295
295
let mut parsed_node_fn = ParsedNodeFn {
296
296
vis : self . parsed . vis . clone ( ) ,
297
297
attributes : NodeFnAttributes {
298
+ display_name : self . parsed . attributes . display_name . as_ref ( ) . map ( |name| LitStr :: new ( & format ! ( "{} GPU" , name. value( ) ) , name. span ( ) ) ) ,
298
299
shader_node : Some ( ShaderNodeType :: GpuNode ) ,
299
300
..self . parsed . attributes . clone ( )
300
301
} ,
@@ -312,7 +313,7 @@ impl PerPixelAdjustCodegen<'_> {
312
313
is_async : true ,
313
314
fields,
314
315
body,
315
- description : "" . to_string ( ) ,
316
+ description : self . parsed . description . clone ( ) ,
316
317
} ;
317
318
parsed_node_fn. replace_impl_trait_in_input ( ) ;
318
319
let gpu_node_impl = crate :: codegen:: generate_node_code ( self . crate_ident , & parsed_node_fn) ?;
0 commit comments