Hide the Cull node by integrating it into all generator nodes (#1538)

* Hide the Cull node by integrating it into all generator nodes

* Remove internal Cull node from Mandelbrot
This commit is contained in:
Keavon Chambers
2023-12-30 12:28:06 -08:00
committed by GitHub
parent 0e49388312
commit 1cc23320a5
10 changed files with 445 additions and 65 deletions

View File

@@ -998,7 +998,6 @@ impl NodeNetwork {
if let Some(new_output_node) = self.nodes.get_mut(&output.node_id) {
for source in node.original_location.outputs(i) {
info!("{:?} {}", source, output.node_output_index);
new_output_node.original_location.outputs_source.insert(source, output.node_output_index);
}
}

View File

@@ -578,16 +578,16 @@ impl core::fmt::Debug for GraphErrorType {
x if x.ends_with('1') && !x.ends_with("11") => format!("{x}st"),
x if x.ends_with('2') && !x.ends_with("12") => format!("{x}nd"),
x if x.ends_with('3') && !x.ends_with("13") => format!("{x}rd"),
x => format!("{x}th parameter"),
x => format!("{x}th"),
};
let format_index = |index: usize| if index == 0 { "primary".to_string() } else { format!("{} parameter", ordinal(index - 1)) };
let format_index = |index: usize| if index == 0 { "primary".to_string() } else { format!("{} parameter", ordinal(index)) };
let format_error = |(index, (real, expected)): &(usize, (Type, Type))| format!("• The {} input expected {} but found {}", format_index(*index), expected, real);
let format_error_list = |errors: &Vec<(usize, (Type, Type))>| errors.iter().map(format_error).collect::<Vec<_>>().join("\n");
let errors = error_inputs.iter().map(format_error_list).collect::<Vec<_>>();
write!(
f,
"Node graph type error! If this just appeared while editing the graph,\n\
consider using undo to go back and trying another way to connect the nodes.\n\
consider using undo to go back and try another way to connect the nodes.\n\
\n\
No node implementation exists for type ({parameters}).\n\
\n\