Skip to content

Commit b65a931

Browse files
authored
Merge branch 'master' into gizmos-refactor
2 parents d651ec3 + fdb09e3 commit b65a931

22 files changed

Lines changed: 117 additions & 83 deletions

File tree

Cargo.lock

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/node_graph/document_node_definitions.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
467467
},
468468
DocumentNodeDefinition {
469469
identifier: "Load Image",
470-
category: "Network",
470+
category: "Web Request",
471471
node_template: NodeTemplate {
472472
document_node: DocumentNode {
473473
implementation: DocumentNodeImplementation::Network(NodeNetwork {
@@ -784,7 +784,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
784784
},
785785
DocumentNodeDefinition {
786786
identifier: "Noise Pattern",
787-
category: "Raster",
787+
category: "Raster: Pattern",
788788
node_template: NodeTemplate {
789789
document_node: DocumentNode {
790790
manual_composition: Some(concrete!(Context)),
@@ -837,7 +837,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
837837
},
838838
DocumentNodeDefinition {
839839
identifier: "Split Channels",
840-
category: "Raster",
840+
category: "Raster: Channels",
841841
node_template: NodeTemplate {
842842
document_node: DocumentNode {
843843
implementation: DocumentNodeImplementation::Network(NodeNetwork {
@@ -1823,7 +1823,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
18231823
},
18241824
DocumentNodeDefinition {
18251825
identifier: "Sample Points",
1826-
category: "Vector",
1826+
category: "Vector: Modifier",
18271827
node_template: NodeTemplate {
18281828
document_node: DocumentNode {
18291829
implementation: DocumentNodeImplementation::Network(NodeNetwork {
@@ -1975,7 +1975,7 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
19751975
},
19761976
DocumentNodeDefinition {
19771977
identifier: "Scatter Points",
1978-
category: "Vector",
1978+
category: "Vector: Modifier",
19791979
node_template: NodeTemplate {
19801980
document_node: DocumentNode {
19811981
implementation: DocumentNodeImplementation::Network(NodeNetwork {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,16 +1211,16 @@ pub(crate) fn grid_properties(node_id: NodeId, context: &mut NodePropertiesConte
12111211
}
12121212
}
12131213

1214-
let rows = number_widget(
1215-
ParameterWidgetsInfo::from_index(document_node, node_id, RowsInput::INDEX, true, context),
1216-
NumberInput::default().min(1.),
1217-
);
12181214
let columns = number_widget(
12191215
ParameterWidgetsInfo::from_index(document_node, node_id, ColumnsInput::INDEX, true, context),
12201216
NumberInput::default().min(1.),
12211217
);
1218+
let rows = number_widget(
1219+
ParameterWidgetsInfo::from_index(document_node, node_id, RowsInput::INDEX, true, context),
1220+
NumberInput::default().min(1.),
1221+
);
12221222

1223-
widgets.extend([LayoutGroup::Row { widgets: rows }, LayoutGroup::Row { widgets: columns }]);
1223+
widgets.extend([LayoutGroup::Row { widgets: columns }, LayoutGroup::Row { widgets: rows }]);
12241224

12251225
widgets
12261226
}

frontend/src/components/floating-menus/NodeCatalog.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@
164164
.text-label {
165165
padding-left: 16px;
166166
position: relative;
167+
pointer-events: none;
167168
168169
&::before {
169170
content: "";

frontend/wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ editor = { path = "../../editor", package = "graphite-editor", features = [
2525
"resvg",
2626
"vello",
2727
] }
28+
graphene-std = { workspace = true }
2829

2930
# Workspace dependencies
3031
graph-craft = { workspace = true }
3132
log = { workspace = true }
32-
graphene-core = { workspace = true }
3333
serde = { workspace = true }
3434
wasm-bindgen = { workspace = true }
3535
serde-wasm-bindgen = { workspace = true }

frontend/wasm/src/editor_api.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use editor::messages::portfolio::utility_types::Platform;
1616
use editor::messages::prelude::*;
1717
use editor::messages::tool::tool_messages::tool_prelude::WidgetId;
1818
use graph_craft::document::NodeId;
19-
use graphene_core::raster::color::Color;
19+
use graphene_std::raster::color::Color;
2020
use serde::Serialize;
2121
use serde_wasm_bindgen::{self, from_value};
2222
use std::cell::RefCell;
@@ -627,7 +627,7 @@ impl EditorHandle {
627627
insert_index: Option<usize>,
628628
) {
629629
let mouse = mouse_x.and_then(|x| mouse_y.map(|y| (x, y)));
630-
let image = graphene_core::raster::Image::from_image_data(&image_data, width, height);
630+
let image = graphene_std::raster::Image::from_image_data(&image_data, width, height);
631631

632632
let parent_and_insert_index = if let (Some(insert_parent_id), Some(insert_index)) = (insert_parent_id, insert_index) {
633633
let insert_parent_id = NodeId(insert_parent_id);
@@ -758,7 +758,7 @@ impl EditorHandle {
758758
use graph_craft::document::DocumentNodeImplementation;
759759
use graph_craft::document::NodeInput;
760760
use graph_craft::document::value::TaggedValue;
761-
use graphene_core::vector::*;
761+
use graphene_std::vector::*;
762762

763763
let (_, request_receiver) = std::sync::mpsc::channel();
764764
let (response_sender, _) = std::sync::mpsc::channel();

node-graph/gcore/src/graphic_element.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ async fn flatten_group(_: impl Ctx, group: GraphicGroupTable, fully_flatten: boo
421421
output
422422
}
423423

424-
#[node_macro::node(category("General"))]
424+
#[node_macro::node(category("Vector"))]
425425
async fn flatten_vector(_: impl Ctx, group: GraphicGroupTable) -> VectorDataTable {
426426
// TODO: Avoid mutable reference, instead return a new GraphicGroupTable?
427427
fn flatten_group(output_group_table: &mut VectorDataTable, current_group_table: GraphicGroupTable) {

node-graph/gcore/src/logic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn string_length(_: impl Ctx, #[implementations(String)] string: String) -> usiz
3737
string.len()
3838
}
3939

40-
#[node_macro::node(category("Text"))]
40+
#[node_macro::node(category("Math: Logic"))]
4141
async fn switch<T, C: Send + 'n + Clone>(
4242
#[implementations(Context)] ctx: C,
4343
condition: bool,

node-graph/gcore/src/ops.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use crate::Ctx;
2-
use crate::raster::BlendMode;
32
use crate::raster_types::{CPU, RasterDataTable};
43
use crate::registry::types::{Fraction, Percentage};
54
use crate::vector::style::GradientStops;
@@ -34,7 +33,7 @@ impl ValueProvider for MathNodeContext {
3433
}
3534

3635
/// Calculates a mathematical expression with input values "A" and "B"
37-
#[node_macro::node(category("General"), properties("math_properties"))]
36+
#[node_macro::node(category("Math: Arithmetic"), properties("math_properties"))]
3837
fn math<U: num_traits::float::Float>(
3938
_: impl Ctx,
4039
/// The value of "A" when calculating the expression
@@ -467,7 +466,7 @@ fn color_value(_: impl Ctx, _primary: (), #[default(Color::BLACK)] color: Option
467466
// }
468467

469468
/// Gets the color at the specified position along the gradient, given a position from 0 (left) to 1 (right).
470-
#[node_macro::node(category("General"))]
469+
#[node_macro::node(category("Color"))]
471470
fn sample_gradient(_: impl Ctx, _primary: (), gradient: GradientStops, position: Fraction) -> Color {
472471
let position = position.clamp(0., 1.);
473472
gradient.evaluate(position)
@@ -479,12 +478,6 @@ fn gradient_value(_: impl Ctx, _primary: (), gradient: GradientStops) -> Gradien
479478
gradient
480479
}
481480

482-
/// Constructs a blend mode choice value which may be set to any of the available blend modes in order to tell another node which blending operation to use.
483-
#[node_macro::node(category("Value"))]
484-
fn blend_mode_value(_: impl Ctx, _primary: (), blend_mode: BlendMode) -> BlendMode {
485-
blend_mode
486-
}
487-
488481
/// Constructs a string value which may be set to any plain text.
489482
#[node_macro::node(category("Value"))]
490483
fn string_value(_: impl Ctx, _primary: (), string: String) -> String {

node-graph/gcore/src/raster/adjustments.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ fn luminance<T: Adjust<Color>>(
276276
input
277277
}
278278

279-
#[node_macro::node(category("Raster"))]
279+
#[node_macro::node(category("Raster: Channels"))]
280280
fn extract_channel<T: Adjust<Color>>(
281281
_: impl Ctx,
282282
#[implementations(
@@ -299,7 +299,7 @@ fn extract_channel<T: Adjust<Color>>(
299299
input
300300
}
301301

302-
#[node_macro::node(category("Raster"))]
302+
#[node_macro::node(category("Raster: Channels"))]
303303
fn make_opaque<T: Adjust<Color>>(
304304
_: impl Ctx,
305305
#[implementations(

0 commit comments

Comments
 (0)