Skip to content

Migrate off deprecated USD APIs (doc-deprecated, not caught by -Wdeprecated-declarations) #2713

Description

@cpichard

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

  • HdsiPrimTypePruningSceneIndexHdsiSceneMaterialPruningSceneIndex / 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) → HdRendererCreateArgsSchemaplugins/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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions