Skip to content

usda: parse typed scalar-array values inside time samples#60

Merged
mxpv merged 1 commit intomainfrom
feat/typed-scalar-array-time-samples
Apr 26, 2026
Merged

usda: parse typed scalar-array values inside time samples#60
mxpv merged 1 commit intomainfrom
feat/typed-scalar-array-time-samples

Conversation

@mxpv
Copy link
Copy Markdown
Owner

@mxpv mxpv commented Apr 26, 2026

Broadens the type-aware time-sample dispatch from PR #59 to cover scalar array types (int[], float[], token[], bool[], …) in addition to tuple types. Each per-time value whose declared type is an array and whose literal opens with [ now routes through parse_value, landing in the precise IntVec / FloatVec / TokenVec / BoolVec variant rather than the type-blind metadata path's Int64Vec / DoubleVec / StringVec fallbacks.

The lenient fallback (bare scalars and None authored against typed properties, as in the spec corpus's attributes.usda) is preserved: the dispatch only kicks in when the next token opens a literal whose shape matches the declared type.

Renames next_is_typed_tuple_value to next_is_typed_value since it now covers more than tuples, and updates docs accordingly.

cc: @bresilla

Broadens the type-aware time-sample dispatch from PR #59 to cover
scalar array types (int[], float[], token[], bool[], …) in addition
to tuple types. Each per-time value whose declared type is an array
and whose literal opens with `[` now routes through `parse_value`,
landing in the precise `IntVec` / `FloatVec` / `TokenVec` / `BoolVec`
variant rather than the type-blind metadata path's `Int64Vec` /
`DoubleVec` / `StringVec` fallbacks.

The lenient fallback (bare scalars and `None` authored against typed
properties, as in the spec corpus's `attributes.usda`) is preserved:
the dispatch only kicks in when the next token opens a literal whose
shape matches the declared type.

Renames `next_is_typed_tuple_value` to `next_is_typed_value` since
it now covers more than tuples, and updates docs accordingly.
@mxpv mxpv merged commit 77929be into main Apr 26, 2026
10 checks passed
@mxpv mxpv deleted the feat/typed-scalar-array-time-samples branch April 26, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant