Skip to content

Commit 0eab6aa

Browse files
authored
Rename the nodes 'Length' -> 'Magnitude', 'Flatten Path' -> 'Combine Paths', 'Vec2 Value' -> 'Combine Vec2', and add a new 'Vec2 Value' node (#4349)
* Rename the node 'Length' -> 'Magnitude' * Rename the node 'Flatten Path' -> 'Combine Paths' * Replace the node 'Vec2 Value' with 'Combine Vec2' and add a new 'Vec2 Value' that's actually a vec2 * Update demo artwork
1 parent 581bb05 commit 0eab6aa

19 files changed

Lines changed: 78 additions & 47 deletions

File tree

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/messages/portfolio/document/graph_operation/utility_types.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,17 +433,17 @@ impl<'a> ModifyInputsContext<'a> {
433433
return None;
434434
};
435435

436-
// If inserting a 'Path' node, insert a 'Flatten Path' node if the type is `Graphic`.
436+
// If inserting a 'Path' node, insert a 'Combine Paths' node if the type is `Graphic`.
437437
// TODO: Allow the 'Path' node to operate on `List` data by utilizing the reference (index or ID?) for each item.
438438
if node_definition.identifier == "Path" {
439439
let layer_input_type = self.network_interface.input_type(&InputConnector::node(output_layer.to_node(), 1), &[]);
440440
if layer_input_type.compiled_element_name().as_deref() == Some("Graphic") {
441-
let Some(flatten_path_definition) = resolve_proto_node_type(graphene_std::vector_nodes::flatten_path::IDENTIFIER) else {
442-
log::error!("Flatten Path does not exist in ModifyInputsContext::existing_node_id");
441+
let Some(combine_paths_definition) = resolve_proto_node_type(graphene_std::vector_nodes::combine_paths::IDENTIFIER) else {
442+
log::error!("Combine Paths does not exist in ModifyInputsContext::existing_node_id");
443443
return None;
444444
};
445445
let node_id = NodeId::new();
446-
self.network_interface.insert_node(node_id, flatten_path_definition.default_node_template(), &[]);
446+
self.network_interface.insert_node(node_id, combine_paths_definition.default_node_template(), &[]);
447447
self.network_interface.move_node_to_chain_start(&node_id, output_layer, &[], self.import);
448448
}
449449
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -806,9 +806,9 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
806806
inputs: vec![NodeInput::node(NodeId(4), 0), NodeInput::node(NodeId(3), 0)],
807807
..Default::default()
808808
},
809-
// 6: Flatten Path
809+
// 6: Combine Paths
810810
DocumentNode {
811-
implementation: DocumentNodeImplementation::ProtoNode(vector::flatten_path::IDENTIFIER),
811+
implementation: DocumentNodeImplementation::ProtoNode(vector::combine_paths::IDENTIFIER),
812812
inputs: vec![NodeInput::node(NodeId(5), 0)],
813813
..Default::default()
814814
},
@@ -883,7 +883,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
883883
},
884884
..Default::default()
885885
},
886-
// 6: Flatten Path
886+
// 6: Combine Paths
887887
DocumentNodeMetadata {
888888
persistent_metadata: DocumentNodePersistentMetadata {
889889
node_type_metadata: NodeTypePersistentMetadata::node(IVec2::new(35, 0)),
@@ -1239,7 +1239,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
12391239
description: Cow::Borrowed(
12401240
"Decomposes the X and Y components of a vec2.\n\
12411241
\n\
1242-
The inverse of this node is \"Vec2 Value\", which can have either or both its X and Y parameters exposed as graph inputs.",
1242+
The inverse of this node is **Combine Vec2**, which composes a vec2 from its X and Y components.",
12431243
),
12441244
properties: None,
12451245
},

0 commit comments

Comments
 (0)