From 698e81ff3aaa9aec5fccb47ed3c88fd5e9a7831a Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Tue, 15 Sep 2026 19:07:25 +0200 Subject: [PATCH] Add the "Type Assertion" node catalog category (#4452) --- node-graph/nodes/math/src/lib.rs | 6 +++--- node-graph/nodes/text/src/lib.rs | 2 +- node-graph/nodes/vector/src/vector_nodes.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/node-graph/nodes/math/src/lib.rs b/node-graph/nodes/math/src/lib.rs index bc2a293796..18521d4c23 100644 --- a/node-graph/nodes/math/src/lib.rs +++ b/node-graph/nodes/math/src/lib.rs @@ -662,21 +662,21 @@ fn random( // TODO: Test that these are no longer needed in all circumstances, then remove them and add a migration to convert these into Passthrough nodes. Note: these act more as type annotations than as identity functions. /// Convert a number to an integer of the type u32, which may be the required type for certain node inputs. -#[node_macro::node(name("As u32"), category("Debug"))] +#[node_macro::node(name("As u32"), category("Type Assertion"))] fn as_u32(_: impl Ctx, value: u32) -> u32 { value } // TODO: Test that these are no longer needed in all circumstances, then remove them and add a migration to convert these into Passthrough nodes. Note: these act more as type annotations than as identity functions. /// Convert a number to an integer of the type u64, which may be the required type for certain node inputs. -#[node_macro::node(name("As u64"), category("Debug"))] +#[node_macro::node(name("As u64"), category("Type Assertion"))] fn as_u64(_: impl Ctx, value: u64) -> u64 { value } // TODO: Test that these are no longer needed in all circumstances, then remove them and add a migration to convert these into Passthrough nodes. Note: these act more as type annotations than as identity functions. /// Convert an integer to a decimal number of the type f64, which may be the required type for certain node inputs. -#[node_macro::node(name("As f64"), category("Debug"))] +#[node_macro::node(name("As f64"), category("Type Assertion"))] fn as_f64(_: impl Ctx, value: f64) -> f64 { value } diff --git a/node-graph/nodes/text/src/lib.rs b/node-graph/nodes/text/src/lib.rs index f6c2f587ea..65e8ca5ea3 100644 --- a/node-graph/nodes/text/src/lib.rs +++ b/node-graph/nodes/text/src/lib.rs @@ -193,7 +193,7 @@ fn string_value(_: impl Ctx, _primary: (), string: TextArea) -> String { } /// Type-asserts a value to be a string. -#[node_macro::node(category("Debug"))] +#[node_macro::node(category("Type Assertion"))] fn as_string(_: impl Ctx, value: String) -> String { value } diff --git a/node-graph/nodes/vector/src/vector_nodes.rs b/node-graph/nodes/vector/src/vector_nodes.rs index 8228ee560c..ab14b1f1ea 100644 --- a/node-graph/nodes/vector/src/vector_nodes.rs +++ b/node-graph/nodes/vector/src/vector_nodes.rs @@ -1321,7 +1321,7 @@ fn dimensions(_: impl Ctx, content: IList) -> DVec2 { } /// Type-asserts a value to be vector data. A position becomes a single-anchor vector. -#[node_macro::node(category("Vector"), name("As Vector"), path(core_types::vector))] +#[node_macro::node(category("Type Assertion"), path(core_types::vector))] fn as_vector>(_: impl Ctx, #[implementations(Vector, DVec2)] value: T) -> Vector { value.into() }