feat(ui): UsdUI (SceneGraphPrimAPI / NodeGraphNodeAPI / Backdrop)#98
Open
bresilla wants to merge 2 commits into
Open
feat(ui): UsdUI (SceneGraphPrimAPI / NodeGraphNodeAPI / Backdrop)#98bresilla wants to merge 2 commits into
bresilla wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for the UsdUI schema family (reader + authoring) behind a new ui feature flag, along with fixture-based coverage.
Changes:
- Introduces
schemas::uimodule with tokens, decoded types, read helpers, and authoring helpers. - Adds unit + integration tests plus a USDA fixture file to validate roundtrips and fixture decoding.
- Wires the new
uifeature intoCargo.tomland the schema module registry, and documents it in the roadmap.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/ui_reader.rs | New integration test that reads UsdUI values from a fixture stage |
| src/schemas/ui/types.rs | Adds decoded read structs and ExpansionState enum |
| src/schemas/ui/tokens.rs | Defines UsdUI token constants for schema/property names and enum values |
| src/schemas/ui/read.rs | Implements read functions for SceneGraphPrimAPI, NodeGraphNodeAPI, and Backdrop |
| src/schemas/ui/mod.rs | Public module surface + unit tests for author/read roundtrips |
| src/schemas/ui/author.rs | Authoring helpers to apply APIs, define Backdrop, and author attributes |
| src/schemas/mod.rs | Registers the ui schema module behind the ui feature |
| fixtures/usdUI_scene.usda | Adds fixture used by integration test |
| ROADMAP.md | Updates roadmap to mark UsdUI as implemented |
| Cargo.toml | Adds ui feature and a feature-gated integration test target |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+77
to
+83
| fn read_int(stage: &Stage, prim: &Path, name: &str) -> Result<Option<i32>> { | ||
| Ok(match attr_value(stage, prim, name)? { | ||
| Some(Value::Int(i)) => Some(i), | ||
| Some(Value::Int64(i)) => Some(i as i32), | ||
| _ => None, | ||
| }) | ||
| } |
Comment on lines
+56
to
+68
| fn read_token(stage: &Stage, prim: &Path, name: &str) -> Result<Option<String>> { | ||
| Ok(match attr_value(stage, prim, name)? { | ||
| Some(Value::Token(s) | Value::String(s)) => Some(s), | ||
| _ => None, | ||
| }) | ||
| } | ||
|
|
||
| fn read_string(stage: &Stage, prim: &Path, name: &str) -> Result<Option<String>> { | ||
| Ok(match attr_value(stage, prim, name)? { | ||
| Some(Value::String(s) | Value::Token(s)) => Some(s), | ||
| _ => None, | ||
| }) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds UsdUI behind a
uifeature, read + author - the cosmetic metadata authoring tools use for outliners and node-graph editors (all under theui:namespace):ui:displayName/ui:displayGroup.ui:description; also carries the NodeGraphNode layout attributes.UsdUI attributes have no spec defaults, so unauthored fields read as
None. Hand-authored fixture + in-memory roundtrips.