OpenUSD icon indicating copy to clipboard operation
OpenUSD copied to clipboard

Update QuadSceneIndex Example

Open raph080 opened this issue 1 year ago • 3 comments

Description of Change(s)

The custom SceneIndex example from "Hydra 2.0 Getting Started Guide" (QuadSceneIndex) seems out of date. I suggest some update/fixes in this PR.

Fixes Issue(s)

  • Replace the BuildRetained calls (currently deprecated) in favour of Builder().Build().
  • Fix the signature of the GetChildPrimPaths method (missing const).
  • Fix a typo for one of the return instruction of GetChildPrimPaths (misplaced semicolon).

Suggestion(s)

  • Remove the Populate method from the QuadSceneIndex since it seems unnecessary for this simple example.
  • Create local using in order to ease the readability.
    • e.g using _BoolDataSource = HdRetainedTypedSampledDataSource<bool>; gives _BoolDataSource::New(false).
  • [x] I have verified that all unit tests pass with the proposed changes
  • [x] I have submitted a signed Contributor License Agreement

raph080 avatar Jun 22 '24 20:06 raph080

Filed as internal issue #USD-9793

✅ Signed CLA on file

jesschimein avatar Jun 24 '24 16:06 jesschimein

/AzurePipelines run

jesschimein avatar Jun 24 '24 16:06 jesschimein

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jun 24 '24 16:06 azure-pipelines[bot]