mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 14:58:05 +08:00
Store Input for Monitor Nodes (#1454)
* Add input storage to monitor_node * Return input via serialize function
This commit is contained in:
@@ -203,7 +203,7 @@ impl NodeRuntime {
|
||||
|
||||
let monitor_nodes = scoped_network
|
||||
.recursive_nodes()
|
||||
.filter(|(_, node)| node.implementation == DocumentNodeImplementation::proto("graphene_core::memo::MonitorNode<_>"))
|
||||
.filter(|(_, node)| node.implementation == DocumentNodeImplementation::proto("graphene_core::memo::MonitorNode<_, _, _>"))
|
||||
.map(|(_, node)| node.path.clone().unwrap_or_default())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
@@ -259,10 +259,12 @@ impl NodeRuntime {
|
||||
warn!("Failed to introspect monitor node for thumbnail");
|
||||
continue;
|
||||
};
|
||||
let Some(graphic_element_data) = value.downcast_ref::<graphene_core::GraphicElementData>() else {
|
||||
|
||||
let Some(io_data) = value.downcast_ref::<graphene_core::memo::IORecord<Footprint, graphene_core::GraphicElementData>>() else {
|
||||
warn!("Failed to downcast thumbnail to graphic element data");
|
||||
continue;
|
||||
};
|
||||
let graphic_element_data = &io_data.output;
|
||||
use graphene_core::renderer::*;
|
||||
let bounds = graphic_element_data.bounding_box(DAffine2::IDENTITY);
|
||||
let render_params = RenderParams::new(ViewMode::Normal, ImageRenderMode::BlobUrl, bounds, true);
|
||||
|
||||
Reference in New Issue
Block a user