Skip to content

Commit 256dd26

Browse files
committed
Recognize ExtractPosition/InjectPosition in the node macro context analyzer
Also, fix migration missing alias
1 parent 06e2a04 commit 256dd26

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

node-graph/graph-craft/src/document/value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ macro_rules! tagged_value {
6464
/// Stored compactly as a `GradientStops`, materializes as a single-row `List<GradientStops>` at runtime via `to_dynany`/`to_any`. Aliases recover legacy on-disk shapes.
6565
/// (Old documents that stored a full `Gradient` struct under this same `"Gradient"` tag are routed to `FillGradient` by `deserialize_tagged_value_with_legacy_migration`.)
6666
#[serde(deserialize_with = "graphic_types::vector_types::gradient::migrate_to_gradient_stops")] // TODO: Eventually remove this migration document upgrade code
67-
#[serde(alias = "GradientTable", alias = "GradientPositions")]
67+
#[serde(alias = "GradientTable", alias = "GradientPositions", alias = "GradientStops")]
6868
Gradient(GradientStops),
6969
/// Stored compactly as a `Vec<BrushStroke>`, materializes as `List<BrushStroke>` at runtime via `to_dynany`/`to_any`. Aliases recover legacy on-disk shapes.
7070
#[serde(deserialize_with = "brush_nodes::migrations::migrate_to_brush_strokes")] // TODO: Eventually remove this migration document upgrade code

node-graph/node-macro/src/parsing.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,12 +550,14 @@ fn parse_context_feature_idents(ty: &Type) -> Vec<Ident> {
550550
| "ExtractRealTime"
551551
| "ExtractAnimationTime"
552552
| "ExtractPointerPosition"
553+
| "ExtractPosition"
553554
| "ExtractIndex"
554555
| "ExtractVarArgs"
555556
| "InjectFootprint"
556557
| "InjectRealTime"
557558
| "InjectAnimationTime"
558559
| "InjectPointerPosition"
560+
| "InjectPosition"
559561
| "InjectIndex"
560562
| "InjectVarArgs" => {
561563
features.push(segment.ident.clone());

0 commit comments

Comments
 (0)