feat(proc): UsdProc GenerativeProcedural#97
Open
bresilla wants to merge 1 commit into
Open
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 initial UsdProc schema support (reader + authoring) behind a new proc feature, plus tests and a fixture to validate GenerativeProcedural parsing/roundtripping.
Changes:
- Introduce
schemas::procmodule with tokens, reader, types, and authoring helper forGenerativeProcedural(proceduralSystem). - Add unit + integration tests plus a USDA fixture scene.
- Wire up the
procCargo feature and test gating; update schema docs/roadmap.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/proc_reader.rs | Adds an integration test that opens a USDA fixture and validates GenerativeProcedural reading. |
| src/schemas/proc/types.rs | Defines the read-model struct for decoded GenerativeProcedural attributes. |
| src/schemas/proc/tokens.rs | Adds schema token constants for prim/attribute names. |
| src/schemas/proc/read.rs | Implements the GenerativeProcedural reader and token-value extraction. |
| src/schemas/proc/mod.rs | Exposes the proc module API and adds unit tests for roundtrip and type gating. |
| src/schemas/proc/author.rs | Implements authoring helpers for defining prims and setting proceduralSystem. |
| src/schemas/mod.rs | Registers the proc module behind a new feature flag and documents it. |
| fixtures/usdProc_scene.usda | Adds a real fixture used by integration tests. |
| ROADMAP.md | Marks UsdProc as implemented and documents scope. |
| Cargo.toml | Adds proc feature and a feature-gated integration test target. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| use openusd::sdf; | ||
| use openusd::usd::Stage; | ||
|
|
||
| const FIXTURE: &str = "fixtures/usdProc_scene.usda"; |
|
|
||
| #[test] | ||
| fn reads_generative_procedural_from_fixture() -> Result<()> { | ||
| let stage = Stage::open(FIXTURE)?; |
| #[test] | ||
| fn reads_generative_procedural_from_fixture() -> Result<()> { | ||
| let stage = Stage::open(FIXTURE)?; | ||
| let p = read_generative_procedural(&stage, &sdf::path("/World/Scatter")?)?.expect("GenerativeProcedural"); |
| let stage = Stage::builder().in_memory("anon.usda")?; | ||
| define_generative_procedural(&stage, sdf::path("/World/Proc")?)?.set_procedural_system("Houdini")?; | ||
|
|
||
| let p = read_generative_procedural(&stage, &sdf::path("/World/Proc")?)?.expect("GenerativeProcedural"); |
| let stage = Stage::builder().in_memory("anon.usda")?; | ||
| define_generative_procedural(&stage, sdf::path("/Proc")?)?; | ||
|
|
||
| let p = read_generative_procedural(&stage, &sdf::path("/Proc")?)?.expect("GenerativeProcedural"); |
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 UsdProc behind a
procfeature -GenerativeProceduralreader + authoring (proceduralSystem). It inherits Boundable, so transform/extent/visibility come from the UsdGeom layer, and its input parameters live in theprimvars:namespace.Hand-authored fixture + in-memory roundtrip.