From fe245394d35969d9616736e7b89cca3dffe86d6f Mon Sep 17 00:00:00 2001 From: hypercube <0hypercube@gmail.com> Date: Wed, 29 Jan 2025 16:59:01 +0000 Subject: [PATCH 1/2] Fix a minor regression in monitor nodes with VectorData --- editor/src/node_graph_executor.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/editor/src/node_graph_executor.rs b/editor/src/node_graph_executor.rs index 1dd24236e3..9274c641be 100644 --- a/editor/src/node_graph_executor.rs +++ b/editor/src/node_graph_executor.rs @@ -15,6 +15,7 @@ use graphene_core::renderer::{RenderSvgSegmentList, SvgSegment}; use graphene_core::text::FontCache; use graphene_core::transform::Footprint; use graphene_core::vector::style::ViewMode; +use graphene_std::instances::Instances; use graphene_std::renderer::{format_transform_matrix, RenderMetadata}; use graphene_std::vector::VectorData; use graphene_std::wasm_application_io::{WasmApplicationIo, WasmEditorApi}; @@ -296,10 +297,10 @@ impl NodeRuntime { Self::process_graphic_element(&mut self.thumbnail_renders, parent_network_node_id, &io.output, responses, update_thumbnails) } // Insert the vector modify if we are dealing with vector data - else if let Some(record) = introspected_data.downcast_ref::>() { - self.vector_modify.insert(parent_network_node_id, record.output.clone()); - } else if let Some(record) = introspected_data.downcast_ref::>() { - self.vector_modify.insert(parent_network_node_id, record.output.clone()); + else if let Some(record) = introspected_data.downcast_ref::>>() { + self.vector_modify.insert(parent_network_node_id, record.output.one_item().clone()); + } else if let Some(record) = introspected_data.downcast_ref::>>() { + self.vector_modify.insert(parent_network_node_id, record.output.one_item().clone()); } } } From 4e931f88c38ac15e56468bc6167a9036c01f730c Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Wed, 29 Jan 2025 11:33:54 -0800 Subject: [PATCH 2/2] Use type alias instead of full type --- editor/src/node_graph_executor.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/editor/src/node_graph_executor.rs b/editor/src/node_graph_executor.rs index 9274c641be..28ab819b8e 100644 --- a/editor/src/node_graph_executor.rs +++ b/editor/src/node_graph_executor.rs @@ -15,14 +15,13 @@ use graphene_core::renderer::{RenderSvgSegmentList, SvgSegment}; use graphene_core::text::FontCache; use graphene_core::transform::Footprint; use graphene_core::vector::style::ViewMode; -use graphene_std::instances::Instances; use graphene_std::renderer::{format_transform_matrix, RenderMetadata}; -use graphene_std::vector::VectorData; +use graphene_std::vector::{VectorData, VectorDataTable}; use graphene_std::wasm_application_io::{WasmApplicationIo, WasmEditorApi}; use interpreted_executor::dynamic_executor::{DynamicExecutor, IntrospectError, ResolvedDocumentNodeTypesDelta}; +use interpreted_executor::util::wrap_network_in_scope; use glam::{DAffine2, DVec2, UVec2}; -use interpreted_executor::util::wrap_network_in_scope; use once_cell::sync::Lazy; use spin::Mutex; use std::sync::mpsc::{Receiver, Sender}; @@ -297,9 +296,9 @@ impl NodeRuntime { Self::process_graphic_element(&mut self.thumbnail_renders, parent_network_node_id, &io.output, responses, update_thumbnails) } // Insert the vector modify if we are dealing with vector data - else if let Some(record) = introspected_data.downcast_ref::>>() { + else if let Some(record) = introspected_data.downcast_ref::>() { self.vector_modify.insert(parent_network_node_id, record.output.one_item().clone()); - } else if let Some(record) = introspected_data.downcast_ref::>>() { + } else if let Some(record) = introspected_data.downcast_ref::>() { self.vector_modify.insert(parent_network_node_id, record.output.one_item().clone()); } }