Skip to content

Commit 5f38106

Browse files
committed
Rename nodes 'Blend' -> 'Mix' and 'Blend Shapes' to 'Blend'
1 parent f75ec64 commit 5f38106

File tree

11 files changed

+30
-28
lines changed

11 files changed

+30
-28
lines changed

.branding

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
https://github.com/Keavon/graphite-branded-assets/archive/169a596963b81d00f34b06340383708866b53a4c.tar.gz
2-
4f5b1fadb8e40ddf565a304a49a09724040c8221ea1ee1e6b825b43c900c05fc
1+
https://github.com/Keavon/graphite-branded-assets/archive/fc02baf37d7428e86aa0e5f772c1f6e42173d405.tar.gz
2+
061a880c753472ea0a84fbc09e54d3596bea6e299067169d34347c717de13ded

editor/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,4 @@ pub const UI_SCALE_MIN: f64 = 0.5;
188188
pub const UI_SCALE_MAX: f64 = 3.;
189189

190190
// ACTIONS
191-
pub const BLEND_SHAPE_COUNT_PER_LAYER: usize = 10;
191+
pub const BLEND_COUNT_PER_LAYER: usize = 10;

editor/src/messages/menu_bar/menu_bar_message_handler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,13 +497,13 @@ impl LayoutHolder for MenuBarMessageHandler {
497497
]]),
498498
MenuListEntry::new("Blend")
499499
.label("Blend")
500-
.icon("BlendShapes")
500+
.icon("InterpolationBlend")
501501
.tooltip_shortcut(action_shortcut!(DocumentMessageDiscriminant::BlendSelectedLayers))
502502
.on_commit(|_| DocumentMessage::BlendSelectedLayers.into())
503503
.disabled(no_active_document || !has_selected_layers),
504504
MenuListEntry::new("Morph")
505505
.label("Morph")
506-
.icon("Morph")
506+
.icon("InterpolationMorph")
507507
.tooltip_shortcut(action_shortcut!(DocumentMessageDiscriminant::MorphSelectedLayers))
508508
.on_commit(|_| DocumentMessage::MorphSelectedLayers.into())
509509
.disabled(no_active_document || !has_selected_layers),

editor/src/messages/portfolio/document/document_message_handler.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use super::utility_types::network_interface::{self, NodeNetworkInterface, Transa
55
use super::utility_types::nodes::{CollapsedLayers, LayerStructureEntry, SelectedNodes};
66
use crate::application::{GRAPHITE_GIT_COMMIT_HASH, generate_uuid};
77
use crate::consts::{
8-
ASYMPTOTIC_EFFECT, BLEND_SHAPE_COUNT_PER_LAYER, COLOR_OVERLAY_GRAY, DEFAULT_DOCUMENT_NAME, FILE_EXTENSION, LAYER_INDENT_OFFSET, NODE_CHAIN_WIDTH, SCALE_EFFECT, SCROLLBAR_SPACING,
8+
ASYMPTOTIC_EFFECT, BLEND_COUNT_PER_LAYER, COLOR_OVERLAY_GRAY, DEFAULT_DOCUMENT_NAME, FILE_EXTENSION, LAYER_INDENT_OFFSET, NODE_CHAIN_WIDTH, SCALE_EFFECT, SCROLLBAR_SPACING,
99
VIEWPORT_ROTATE_SNAP_INTERVAL,
1010
};
1111
use crate::messages::input_mapper::utility_types::macros::action_shortcut;
@@ -626,7 +626,7 @@ impl MessageHandler<DocumentMessage, DocumentMessageContext<'_>> for DocumentMes
626626
responses.add(OverlaysMessage::Draw);
627627
}
628628
DocumentMessage::BlendSelectedLayers => {
629-
self.handle_group_selected_layers(GroupFolderType::BlendShapes, responses);
629+
self.handle_group_selected_layers(GroupFolderType::Blend, responses);
630630
}
631631
DocumentMessage::MorphSelectedLayers => {
632632
self.handle_group_selected_layers(GroupFolderType::Morph, responses);
@@ -1970,10 +1970,10 @@ impl DocumentMessageHandler {
19701970
});
19711971
}
19721972
}
1973-
GroupFolderType::BlendShapes | GroupFolderType::Morph => {
1973+
GroupFolderType::Blend | GroupFolderType::Morph => {
19741974
let control_path_id = NodeId(generate_uuid());
19751975
let all_layers_to_group = network_interface.shallowest_unique_layers_sorted(&[]);
1976-
let blend_count = matches!(group_folder_type, GroupFolderType::BlendShapes).then(|| all_layers_to_group.len() * BLEND_SHAPE_COUNT_PER_LAYER);
1976+
let blend_count = matches!(group_folder_type, GroupFolderType::Blend).then(|| all_layers_to_group.len() * BLEND_COUNT_PER_LAYER);
19771977

19781978
responses.add(GraphOperationMessage::NewInterpolationLayer {
19791979
id: folder_id,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ impl MessageHandler<GraphOperationMessage, GraphOperationMessageContext<'_>> for
182182
let mut modify_inputs = ModifyInputsContext::new(network_interface, responses);
183183
let layer = modify_inputs.create_layer(id);
184184

185-
// Insert the main chain node (Blend Shapes or Morph) depending on whether a blend count is provided
185+
// Insert the main chain node (Blend or Morph) depending on whether a blend count is provided
186186
let (chain_node_id, layer_alias, path_alias) = if let Some(count) = blend_count {
187-
(modify_inputs.insert_blend_shapes_data(layer, count as f64), "Blend Shape", "Blend Path")
187+
(modify_inputs.insert_blend_data(layer, count as f64), "Blend", "Blend Path")
188188
} else {
189189
(modify_inputs.insert_morph_data(layer), "Morph", "Morph Path")
190190
};
@@ -196,7 +196,7 @@ impl MessageHandler<GraphOperationMessage, GraphOperationMessageContext<'_>> for
196196
network_interface.move_layer_to_stack(layer, parent, insert_index, &[]);
197197
network_interface.move_layer_to_stack(control_path_layer, parent, insert_index + 1, &[]);
198198

199-
// Connect the Path node's output to the chain node's path parameter input (input 4 for both Morph and Blend Shapes).
199+
// Connect the Path node's output to the chain node's path parameter input (input 4 for both Morph and Blend).
200200
// Done after move_layer_to_stack so chain nodes have correct positions when converted to absolute.
201201
network_interface.set_input(&InputConnector::node(chain_node_id, 4), NodeInput::node(path_node_id, 0), &[]);
202202

@@ -213,7 +213,7 @@ impl MessageHandler<GraphOperationMessage, GraphOperationMessageContext<'_>> for
213213
interpolation_layer_id,
214214
control_path_id,
215215
} => {
216-
// Find the chain node (Morph or Blend Shapes, first in chain of the layer)
216+
// Find the chain node (Blend or Morph, first in chain of the layer)
217217
let Some(OutputConnector::Node { node_id: chain_node, .. }) = network_interface.upstream_output_connector(&InputConnector::node(interpolation_layer_id, 1), &[]) else {
218218
log::error!("Could not find chain node for layer {interpolation_layer_id}");
219219
return;

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,17 @@ impl<'a> ModifyInputsContext<'a> {
156156
self.network_interface.move_node_to_chain_start(&boolean_id, layer, &[], self.import);
157157
}
158158

159-
pub fn insert_blend_shapes_data(&mut self, layer: LayerNodeIdentifier, count: f64) -> NodeId {
160-
let blend_shapes = resolve_network_node_type("Blend Shapes").expect("Blend Shapes node does not exist").node_template_input_override([
159+
pub fn insert_blend_data(&mut self, layer: LayerNodeIdentifier, count: f64) -> NodeId {
160+
let blend = resolve_network_node_type("Blend").expect("Blend node does not exist").node_template_input_override([
161161
Some(NodeInput::value(TaggedValue::Graphic(Default::default()), true)),
162162
Some(NodeInput::value(TaggedValue::F64(count), false)),
163163
]);
164164

165-
let blend_shapes_id = NodeId::new();
166-
self.network_interface.insert_node(blend_shapes_id, blend_shapes, &[]);
167-
self.network_interface.move_node_to_chain_start(&blend_shapes_id, layer, &[], self.import);
165+
let blend_id = NodeId::new();
166+
self.network_interface.insert_node(blend_id, blend, &[]);
167+
self.network_interface.move_node_to_chain_start(&blend_id, layer, &[], self.import);
168168

169-
blend_shapes_id
169+
blend_id
170170
}
171171

172172
pub fn insert_morph_data(&mut self, layer: LayerNodeIdentifier) -> NodeId {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
462462
properties: None,
463463
},
464464
DocumentNodeDefinition {
465-
identifier: "Blend Shapes",
465+
identifier: "Blend",
466466
category: "Vector",
467467
node_template: NodeTemplate {
468468
document_node: DocumentNode {

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::consts::COLOR_OVERLAY_GRAY;
22
use glam::DVec2;
3+
use graphene_std::vector::misc::BooleanOperation;
34
use std::fmt;
45

56
#[repr(transparent)]
@@ -710,7 +711,7 @@ impl PTZ {
710711
#[derive(Clone, Copy, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
711712
pub enum GroupFolderType {
712713
Layer,
713-
BooleanOperation(graphene_std::vector::misc::BooleanOperation),
714-
BlendShapes,
714+
BooleanOperation(BooleanOperation),
715+
Blend,
715716
Morph,
716717
}

editor/src/messages/portfolio/document_migration.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,13 +474,14 @@ const NODE_REPLACEMENTS: &[NodeReplacement<'static>] = &[
474474
],
475475
},
476476
NodeReplacement {
477-
node: graphene_std::raster_nodes::blending_nodes::blend::IDENTIFIER,
477+
node: graphene_std::raster_nodes::blending_nodes::mix::IDENTIFIER,
478478
aliases: &[
479479
"graphene_raster_nodes::adjustments::BlendNode",
480480
"raster_nodes::adjustments::BlendNode",
481481
"graphene_core::raster::adjustments::BlendNode",
482482
"graphene_core::raster::BlendNode",
483483
"graphene_raster_nodes::blending_nodes::BlendNode",
484+
"raster_nodes::blending_nodes::BlendNode",
484485
],
485486
},
486487
NodeReplacement {

frontend/src/icons.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ import AlignRight from "/../branding/assets/icon-16px-solid/align-right.svg";
110110
import AlignTop from "/../branding/assets/icon-16px-solid/align-top.svg";
111111
import AlignVerticalCenter from "/../branding/assets/icon-16px-solid/align-vertical-center.svg";
112112
import Artboard from "/../branding/assets/icon-16px-solid/artboard.svg";
113-
import BlendShapes from "/../branding/assets/icon-16px-solid/blend-shapes.svg";
114113
import BooleanDifference from "/../branding/assets/icon-16px-solid/boolean-difference.svg";
115114
import BooleanDivide from "/../branding/assets/icon-16px-solid/boolean-divide.svg";
116115
import BooleanIntersect from "/../branding/assets/icon-16px-solid/boolean-intersect.svg";
@@ -155,9 +154,10 @@ import HistoryRedo from "/../branding/assets/icon-16px-solid/history-redo.svg";
155154
import HistoryUndo from "/../branding/assets/icon-16px-solid/history-undo.svg";
156155
import IconsGrid from "/../branding/assets/icon-16px-solid/icons-grid.svg";
157156
import Image from "/../branding/assets/icon-16px-solid/image.svg";
157+
import InterpolationBlend from "/../branding/assets/icon-16px-solid/interpolation-blend.svg";
158+
import InterpolationMorph from "/../branding/assets/icon-16px-solid/interpolation-morph.svg";
158159
import Layer from "/../branding/assets/icon-16px-solid/layer.svg";
159160
import License from "/../branding/assets/icon-16px-solid/license.svg";
160-
import Morph from "/../branding/assets/icon-16px-solid/morph.svg";
161161
import NewLayer from "/../branding/assets/icon-16px-solid/new-layer.svg";
162162
import NodeBlur from "/../branding/assets/icon-16px-solid/node-blur.svg";
163163
import NodeBrushwork from "/../branding/assets/icon-16px-solid/node-brushwork.svg";
@@ -229,7 +229,6 @@ const SOLID_16PX = {
229229
AlignTop: { svg: AlignTop, size: 16 },
230230
AlignVerticalCenter: { svg: AlignVerticalCenter, size: 16 },
231231
Artboard: { svg: Artboard, size: 16 },
232-
BlendShapes: { svg: BlendShapes, size: 16 },
233232
BooleanDifference: { svg: BooleanDifference, size: 16 },
234233
BooleanDivide: { svg: BooleanDivide, size: 16 },
235234
BooleanIntersect: { svg: BooleanIntersect, size: 16 },
@@ -274,9 +273,10 @@ const SOLID_16PX = {
274273
HistoryUndo: { svg: HistoryUndo, size: 16 },
275274
IconsGrid: { svg: IconsGrid, size: 16 },
276275
Image: { svg: Image, size: 16 },
276+
InterpolationBlend: { svg: InterpolationBlend, size: 16 },
277+
InterpolationMorph: { svg: InterpolationMorph, size: 16 },
277278
Layer: { svg: Layer, size: 16 },
278279
License: { svg: License, size: 16 },
279-
Morph: { svg: Morph, size: 16 },
280280
NewLayer: { svg: NewLayer, size: 16 },
281281
Node: { svg: Node, size: 16 },
282282
NodeBlur: { svg: NodeBlur, size: 16 },

0 commit comments

Comments
 (0)