Skip to content

Commit 3cf5e86

Browse files
committed
Fix bugs
1 parent a53b509 commit 3cf5e86

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

editor/src/messages/portfolio/document/node_graph/document_node_types.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
272272
NodeInput::network(concrete!(TaggedValue), 3),
273273
NodeInput::network(concrete!(TaggedValue), 4),
274274
NodeInput::network(concrete!(TaggedValue), 5),
275-
NodeInput::network(concrete!(TaggedValue), 6),
276275
],
277276
implementation: DocumentNodeImplementation::proto("graphene_core::ConstructArtboardNode<_, _, _, _, _, _>"),
278277
metadata: DocumentNodeMetadata { position: glam::IVec2::new(-10, -3) }, // To Artboard

frontend/wasm/src/editor_api.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,10 @@ async fn poll_node_graph_evaluation() {
766766
editor_and_handle(|editor, handle| {
767767
let mut messages = VecDeque::new();
768768
if let Err(e) = editor.poll_node_graph_evaluation(&mut messages) {
769-
error!("Error evaluating node graph {e}");
769+
// TODO: This is a hacky way to suppress the error, but it shouldn't be generated in the first place
770+
if e != "No active document" {
771+
error!("Error evaluating node graph {e}");
772+
}
770773
}
771774

772775
// Send each `FrontendMessage` to the JavaScript frontend

node-graph/graph-craft/src/document.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ impl NodeNetwork {
11641164

11651165
for (nested_input_index, nested_input) in nested_node.clone().inputs.iter().enumerate() {
11661166
if let NodeInput::Network { import_index, .. } = nested_input {
1167-
let parent_input = node.inputs.get(*import_index).expect("Import index should always exist");
1167+
let parent_input = node.inputs.get(*import_index).expect(&format!("Import index {} should always exist", import_index));
11681168
match *parent_input {
11691169
// If the input to self is a node, connect the corresponding output of the inner network to it
11701170
NodeInput::Node { node_id, output_index, lambda } => {
@@ -1190,7 +1190,7 @@ impl NodeNetwork {
11901190
// Match the document node input and the exports of the inner network if the export is a NodeInput::Network
11911191
// for (i, export) in inner_network.exports.iter().enumerate() {
11921192
// if let NodeInput::Network { import_index, .. } = export {
1193-
// let parent_input = node.inputs.get(*import_index).expect("Import index should always exist");
1193+
// let parent_input = node.inputs.get(*import_index).expect(&format!("Import index {} should always exist", import_index));
11941194
// match *parent_input {
11951195
// // If the input to self is a node, connect the corresponding output of the inner network to it
11961196
// NodeInput::Node { node_id, output_index, lambda } => {

node-graph/graph-craft/src/proto.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,8 @@ impl core::fmt::Debug for GraphErrorType {
605605
"Node graph type error! If this just appeared while editing the graph,\n\
606606
consider using undo to go back and try another way to connect the nodes.\n\
607607
\n\
608-
No node implementation exists for type ({parameters}).\n\
608+
No node implementation exists for type:\n\
609+
({parameters})\n\
609610
\n\
610611
Caused by{}:\n\
611612
{}",

node-graph/interpreted-executor/src/node_registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
522522
}
523523
})
524524
},
525-
NodeIOTypes::new(concrete!(ImageFrame<Color>), concrete!(ImageFrame<Color>), vec![fn_type!(f32), fn_type!(f32), fn_type!(bool)]),
525+
NodeIOTypes::new(concrete!(ImageFrame<Color>), concrete!(ImageFrame<Color>), vec![fn_type!(f64), fn_type!(f64), fn_type!(bool)]),
526526
)],
527527
vec![
528528
(

0 commit comments

Comments
 (0)