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
a1b8bff6cd
commit
698e81ff3a
@@ -1321,7 +1321,7 @@ fn dimensions(_: impl Ctx, content: IList<Vector>) -> 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<T: Into<Vector>>(_: impl Ctx, #[implementations(Vector, DVec2)] value: T) -> Vector {
|
||||
value.into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user