Improve node creation menu and categorization (#2719)

* Change node categories

Signed-off-by: ezbaze <[email protected]>

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

---------

Signed-off-by: ezbaze <[email protected]>
Co-authored-by: Keavon Chambers <[email protected]>
This commit is contained in:
EzbazeandKeavon Chambers authored and GitHub committed 2025-06-23 18:51:16 -07:00
1 parent 59bb3194ca
commit 2ec0ff38f3
5 files changed
+11 -10

No files matched your search

@@ -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
}
@@ -164,6 +164,7 @@
.text-label {
padding-left: 16px;
position: relative;
pointer-events: none;
&::before {
content: "";
+1 -1
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,
@@ -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();
+3 -3
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,