Improve node creation menu and categorization (#2719)

* Change node categories

Signed-off-by: ezbaze <rybitwamateusz3@gmail.com>

* Restore Ezbaze's other work that was lost in the rebase

---------

Signed-off-by: ezbaze <rybitwamateusz3@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Ezbaze 2025-06-24 02:51:16 +01:00 committed by GitHub
parent 59bb3194ca
commit 2ec0ff38f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 10 deletions

View file

@ -1211,16 +1211,16 @@ pub(crate) fn grid_properties(node_id: NodeId, context: &mut NodePropertiesConte
}
}
let rows = number_widget(
ParameterWidgetsInfo::from_index(document_node, node_id, RowsInput::INDEX, true, context),
NumberInput::default().min(1.),
);
let columns = number_widget(
ParameterWidgetsInfo::from_index(document_node, node_id, ColumnsInput::INDEX, true, context),
NumberInput::default().min(1.),
);
let rows = number_widget(
ParameterWidgetsInfo::from_index(document_node, node_id, RowsInput::INDEX, true, context),
NumberInput::default().min(1.),
);
widgets.extend([LayoutGroup::Row { widgets: rows }, LayoutGroup::Row { widgets: columns }]);
widgets.extend([LayoutGroup::Row { widgets: columns }, LayoutGroup::Row { widgets: rows }]);
widgets
}

View file

@ -164,6 +164,7 @@
.text-label {
padding-left: 16px;
position: relative;
pointer-events: none;
&::before {
content: "";

View file

@ -37,7 +37,7 @@ fn string_length(_: impl Ctx, #[implementations(String)] string: String) -> usiz
string.len()
}
#[node_macro::node(category("Text"))]
#[node_macro::node(category("Math: Logic"))]
async fn switch<T, C: Send + 'n + Clone>(
#[implementations(Context)] ctx: C,
condition: bool,

View file

@ -158,8 +158,8 @@ fn grid<T: GridSpacing>(
#[implementations(f64, DVec2)]
spacing: T,
#[default(30., 30.)] angles: DVec2,
#[default(10)] rows: u32,
#[default(10)] columns: u32,
#[default(10)] rows: u32,
) -> VectorDataTable {
let (x_spacing, y_spacing) = spacing.as_dvec2().into();
let (angle_a, angle_b) = angles.into();

View file

@ -210,7 +210,7 @@ where
vector_data
}
#[node_macro::node(category("Vector"), path(graphene_core::vector))]
#[node_macro::node(category("Instancing"), path(graphene_core::vector))]
async fn repeat<I: 'n + Send + Clone>(
_: impl Ctx,
// TODO: Implement other GraphicElementRendered types.
@ -249,7 +249,7 @@ where
result_table
}
#[node_macro::node(category("Vector"), path(graphene_core::vector))]
#[node_macro::node(category("Instancing"), path(graphene_core::vector))]
async fn circular_repeat<I: 'n + Send + Clone>(
_: impl Ctx,
// TODO: Implement other GraphicElementRendered types.
@ -284,7 +284,7 @@ where
result_table
}
#[node_macro::node(name("Copy to Points"), category("Vector"), path(graphene_core::vector))]
#[node_macro::node(name("Copy to Points"), category("Instancing"), path(graphene_core::vector))]
async fn copy_to_points<I: 'n + Send + Clone>(
_: impl Ctx,
points: VectorDataTable,