mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
Add the "Type Assertion" node catalog category (#4452)
This commit is contained in:
committed by
Dennis Kobert
parent
9cca3f0e1e
commit
9dfb5bd733
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user