Move Imaginate cache into the node

This commit is contained in:
Dennis Kobert
2023-07-14 16:40:56 +02:00
committed by Keavon Chambers
parent d52ea18a1f
commit 4c9daadb01
3 changed files with 18 additions and 12 deletions

View File

@@ -467,9 +467,8 @@ fn node_registry() -> HashMap<NodeIdentifier, HashMap<NodeIOTypes, NodeConstruct
|args: Vec<Arc<graph_craft::proto::NodeContainer>>| {
Box::pin(async move {
use graphene_std::raster::ImaginateNode;
let cache: ImaginateCache = graphene_std::any::input_node(args.last().unwrap().clone()).eval(()).await;
macro_rules! instanciate_imaginate_node {
($($i:expr,)*) => { ImaginateNode::new($(graphene_std::any::input_node(args[$i].clone()),)* cache.into_inner()) };
($($i:expr,)*) => { ImaginateNode::new($(graphene_std::any::input_node(args[$i].clone()),)* ) };
}
let node: ImaginateNode<Color, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _> = instanciate_imaginate_node!(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,);
let any = graphene_std::any::DynAnyNode::new(node);
@@ -497,7 +496,6 @@ fn node_registry() -> HashMap<NodeIdentifier, HashMap<NodeIOTypes, NodeConstruct
fn_type!(ImaginateMaskStartingFill),
fn_type!(bool),
fn_type!(bool),
fn_type!(ImaginateCache),
],
),
),