Autodesk / Autodesk/arnold-usd
Migrate off deprecated USD APIs (doc-deprecated, not caught by -Wdeprecated-declarations)
- Dominant language
- Python
- Stars
- 284
- Forks
- 68
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 14
Description
While fixing the USD 26.08 build (`HdRendererPlugin::IsSupported` signature change), a cross-reference of USD's `\deprecated` doc tags against our source found APIs we still use that USD has documented as deprecated. None break the 26.08 build today, but they're candidates for removal in a future USD release.
Note: `-Wdeprecated-declarations` does **not** catch these. USD marks them in docstrings (doxygen `\deprecated`), not with the `[[deprecated]]` C++ attribute, so the compiler stays silent. Each item below was verified against the *exact receiver type* (many USD classes share method names, which produces false positives — see the retracted list).
### Larger / non-trivial migrations
- **`HdsiPrimTypePruningSceneIndex`** → `HdsiSceneMaterialPruningSceneIndex` / `HdPrimTypeAndPathPruningSceneIndex` (with a tautological `PathPredicate`) — `libs/render_delegate/reader.{cpp,h}` (material + light pruning; scene-index class swap).
- **`SdrParserPlugin::GetSourceType()`** → `GetShadingSystem()` — `plugins/node_registry/parser.{h,cpp}` (`NdrArnoldParserPlugin` overrides this deprecated virtual via the `ShaderParserPlugin` alias; verify discovery/registry semantics).
- **`UsdLuxGeometryLight`** (whole schema deprecated) — `libs/translator/reader/read_light.cpp:685`.
- **`HdRendererCreateArgs`** (deprecated alias) → `HdRendererCreateArgsSchema` — `plugins/render_delegate/renderer_plugin.{h,cpp}` (the overload kept in the 26.08 fix uses the alias name).
### Deliberate back-compat (keep until the old form is removed, but track)
- **`HdRenderPassState::GetViewport()`** → `CameraUtilFraming` (`GetFraming`/`SetFraming`) — `libs/render_delegate/render_pass.cpp` (intentional old-viewport path; the code already reads `GetFraming()` first).
### Retracted (false positives — same method name, different, non-deprecated class)
These were flagged by a name-only match and are **not** deprecated as used:
- `UsdSkelSkeletonQuery::GetMapper()` — the deprecation is on `UsdSkelSkinningQuery::GetMapper()`, a different class we don't use here. (`GetMapper` is correct.)
- `SdfListEditorProxy::GetAddedItems()` — the deprecation is on `SdfListOp::GetAddedItems()`; the proxy method (`prim->GetReferenceList().GetAddedItems()`) is not deprecated.
- `GfRange1f::Union()` — our code uses `UnionWith()`, which is not deprecated.
- `SdrShaderProperty::GetMetadata()` — no confirmed call site; the `GetMetadata` uses in the tree are `UsdObject`/`UsdAttribute`, which are not deprecated.
Contributor guide
Research direction
Start with the listed call sites in libs/render_delegate/reader.{cpp,h}, plugins/node_registry/parser.{h,cpp}, libs/translator/reader/read_light.cpp:685, and plugins/render_delegate/renderer_plugin.{h,cpp}; verify each exact USD receiver type and its replacement API. Keep the deliberate HdRenderPassState viewport compatibility path and retracted false positives unchanged. Done means the confirmed deprecated API uses are migrated without breaking parser discovery or the 26.08 renderer fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100