Skip to content

Commit be7e88f

Browse files
Keavonseam0s-dev
authored andcommitted
Instance tables refactor part 8: Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector' (GraphiteEditor#2697)
Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector'
1 parent 3e7d8c9 commit be7e88f

26 files changed

+252
-125
lines changed

demo-artwork/changing-seasons.graphite

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo-artwork/isometric-fountain.graphite

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo-artwork/marbled-mandelbrot.graphite

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo-artwork/painted-dreams.graphite

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo-artwork/parametric-dunescape.graphite

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo-artwork/procedural-string-lights.graphite

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo-artwork/red-dress.graphite

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo-artwork/valley-of-spires.graphite

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editor/src/dispatcher.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,14 @@ mod test {
498498
println!("-------------------------------------------------");
499499
println!("Failed test due to receiving a DisplayDialogError while loading a Graphite demo file.");
500500
println!();
501+
println!("NOTE:");
502+
println!("Document upgrading isn't performed in tests like when opening in the actual editor.");
503+
println!("You may need to open and re-save a document in the editor to apply its migrations.");
504+
println!();
501505
println!("DisplayDialogError details:");
502506
println!();
503-
println!("Description: {value}");
507+
println!("Description:");
508+
println!("{value}");
504509
println!("-------------------------------------------------");
505510
println!();
506511

@@ -538,7 +543,9 @@ mod test {
538543
});
539544

540545
// Check if the graph renders
541-
editor.eval_graph().await;
546+
if let Err(e) = editor.eval_graph().await {
547+
print_problem_to_terminal_on_failure(&format!("Failed to evaluate the graph for document '{document_name}':\n{e}"));
548+
}
542549

543550
for response in responses {
544551
// Check for the existence of the file format incompatibility warning dialog after opening the test file

editor/src/messages/portfolio/document/graph_operation/utility_types.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,17 +289,17 @@ impl<'a> ModifyInputsContext<'a> {
289289
log::error!("Node type {} does not exist in ModifyInputsContext::existing_node_id", reference);
290290
return None;
291291
};
292-
// If inserting a path node, insert a flatten vector elements if the type is a graphic group.
292+
// If inserting a path node, insert a Flatten Path if the type is a graphic group.
293293
// TODO: Allow the path node to operate on Graphic Group data by utilizing the reference for each vector data in a group.
294294
if node_definition.identifier == "Path" {
295295
let layer_input_type = self.network_interface.input_type(&InputConnector::node(output_layer.to_node(), 1), &[]).0.nested_type().clone();
296296
if layer_input_type == concrete!(GraphicGroupTable) {
297-
let Some(flatten_vector_elements_definition) = resolve_document_node_type("Flatten Vector Elements") else {
298-
log::error!("Flatten Vector Elements does not exist in ModifyInputsContext::existing_node_id");
297+
let Some(flatten_path_definition) = resolve_document_node_type("Flatten Path") else {
298+
log::error!("Flatten Path does not exist in ModifyInputsContext::existing_node_id");
299299
return None;
300300
};
301301
let node_id = NodeId::new();
302-
self.network_interface.insert_node(node_id, flatten_vector_elements_definition.default_node_template(), &[]);
302+
self.network_interface.insert_node(node_id, flatten_path_definition.default_node_template(), &[]);
303303
self.network_interface.move_node_to_chain_start(&node_id, output_layer, &[]);
304304
}
305305
}

0 commit comments

Comments
 (0)