mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 19:08:05 +08:00
Clean up document message wrappers around proto nodes so they're now used directly (#4101)
* Rename the 'Identity' node to 'Passthrough' internally * Rename the 'Memoize' node to 'Cache' internally * Let skip_impl proto nodes auto-generate as document node definitions * Remove the wrapper 'Passthrough' node from document_node_definitions.rs * Remove the wrapper 'Cache' node from document_node_definitions.rs * Remove the wrapper 'Monitor' node from document_node_definitions.rs * Remove the wrapper 'Noise Pattern' node from document_node_definitions.rs * Remove the wrapper 'Brush' node from document_node_definitions.rs * Remove the wrapper 'Transform' node from document_node_definitions.rs * Code review improvements * Rename Cache node back to Memoize * More code review
This commit is contained in:
@@ -52,7 +52,7 @@ pub(crate) struct NodeFnAttributes {
|
||||
pub(crate) shader_node: Option<ShaderNodeType>,
|
||||
/// Custom serialization function path (e.g., "my_module::custom_serialize")
|
||||
pub(crate) serialize: Option<Path>,
|
||||
/// Whether the preprocessor should add a Memo node after this node in the generated subnetwork
|
||||
/// Whether the preprocessor should add a Memoize node after this node in the generated subnetwork
|
||||
pub(crate) memoize: bool,
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ impl Parse for NodeFnAttributes {
|
||||
.map_err(|_| Error::new_spanned(meta, "Expected a valid path for 'serialize', e.g., serialize(my_module::custom_serialize)"))?;
|
||||
serialize = Some(parsed_path);
|
||||
}
|
||||
// Instructs the preprocessor to insert a Memo node after this node in the generated subnetwork,
|
||||
// Instructs the preprocessor to insert a Memoize node after this node in the generated subnetwork,
|
||||
// caching its output across evaluations with identical inputs.
|
||||
//
|
||||
// Example usage:
|
||||
|
||||
Reference in New Issue
Block a user