# Deprecation of pxr/usd/ndr

**URL:** <https://forum.aousd.org/t/deprecation-of-pxr-usd-ndr/2167>\
**Category:** Announcements\
**Created:** [January 22, 2025, 5:44pm UTC](https://forum.aousd.org/t/deprecation-of-pxr-usd-ndr/2167 "2025-01-22T17:44:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anwang](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anwang](https://forum.aousd.org/u/anwang)\
**Post date:** [January 22, 2025, 5:44pm UTC](https://forum.aousd.org/t/deprecation-of-pxr-usd-ndr/2167/1 "2025-01-22T17:44:15Z")

</div>

The `pxr/usd/ndr` library will be removed on release 25.08 in favor of `pxr/usd/sdr`. The 25.05 release will deprecate Ndr code and publish all target Sdr code. A comment will be posted to this thread when the dev branch is updated to contain all target Sdr code with deprecated Ndr code still present.

## History & Intent

- Ndr - “Node Definition Registry”
- Sdr - “Shader Definition Registry”, subclasses Ndr

Ndr was conceived in 2018; its implementation targeted shaders as the primary use case and featured an abstract node definition registry as a generalizable foundation for this work.

Since then, within both Pixar-internal and external code bases, additional registry cases that considered using Ndr found a good fit directly in Sdr instead. [UsdLux is a prime example](https://openusd.org/release/wp_usdlux_for_renderers.html). More canonical use cases include codesites in usdShade itself, usdMtlx, hdSt, filters, projections, light paint shaders, and other plugins. Sdr and the concept of “Shader” as contained in Sdr has evolved to represent any concept to be executed by a non-USD subsystem.

Most use cases of Sdr today require both a mix of Ndr and Sdr symbols and a deep understanding of how the different Ndr and Sdr pipeline components work together. After comparing Sdr usage with the relative lack of usage of different Ndr specializations, we decided to consolidate the two systems into Sdr. This will clarify overall usage, and help streamline adoption for time-tested applications.

## Migration

Here are all the necessary changes to move your code over.

**Files**  
Files in `pxr/usd/ndr/*` will have direct analogues in `pxr/usd/sdr/*` with filenames exactly preserved, with a few exceptions.

| Deprecated files | Target files |
| --- | --- |
| ndr/node.h | sdr/shaderNode.h |
| ndr/property.h | sdr/shaderProperty.h |
| ndr/nodeDiscoveryResult.h | sdr/shaderNodeDiscoveryResult.h |
| ndr/\* | sdr/\* |

You may also need to add `#include "pxr/usd/sdr/shaderProperty.h` where needed.

**Symbols**  
This category includes macros, functions, and types. Where meaningful, naming conventions are transformed from “Node” and “Property” to “Shader Node” and “Shader Property”, but we opted not to transform, for example, existing Sdr types like “SdrPropertyTypes-\>Int” to “SdrShaderPropertyTypes-\>Int”.

| Deprecated symbols | Target symbols |
| --- | --- |
| NDR\_REGISTER\_DISCOVERY\_PLUGIN | SDR\_REGISTER\_DISCOVERY\_PLUGIN |
| NDR\_REGISTER\_PARSER\_PLUGIN | SDR\_REGISTER\_PARSER\_PLUGIN |
| NdrFsHelpersDiscoverNodes | SdrFsHelpersDiscoverShaderNodes |
| NdrDiscoveryPlugin::DiscoverNodes | SdrDiscoveryPlugin::DiscoverShaderNodes |
| NdrParserPlugin::Parse | SdrParserPlugin::ParseShaderNode |
| NdrParserPlugin::GetInvalidNode | SdrParserPlugin:GetInvalidShaderNode |
| NdrNode::GetVersion | SdrShaderNode::GetShaderVersion |
| NdrNode::GetInput | SdrShaderNode::GetShaderInput |
| NdrNode::GetOutput | SdrShaderNode::GetShaderOutput |
| NdrNode::GetInputNames | SdrShaderNode::GetShaderInputNames |
| NdrNode::GetOutputNames | SdrShaderNode::GetShaderOutputNames |
| NdrRegistry::GetNodeFromAsset | SdrRegistry::GetShaderNodeFromAsset |
| NdrRegistry::GetNodeFromSourceCode | SdrRegistry::GetShaderNodeFromSourceCode |
| NdrRegistry::GetNodeIdentifiers | SdrRegistry::GetShaderNodeIdentifiers |
| NdrRegistry::GetNodeNames | SdrRegistry::GetShaderNodeNodes |
| NdrRegistry::GetNodeByIdentifier | SdrRegistry::GetShaderNodeByIdentifier |
| NdrRegistry::GetNodeByIdentifierAndType | SdrRegistry::GetShaderNodeByIdentifierAndType |
| NdrRegistry::GetNodeByName | SdrRegistry::GetShaderNodeByName |
| NdrRegistry::GetNodeByNameAndType | SdrRegistry::GetShaderNodeByNameAndType |
| NdrRegistry::GetNodesByIdentifier | SdrRegistry::GetShaderNodesByIdentifier |
| NdrRegistry::GetNodesByName | SdrRegistry::GetShaderNodesByName |
| NdrRegistry::GetNodesByFamily | SdrRegistry::GetShaderNodesByFamily |
| NdrRegistry::GetAllNodeSourceTypes | SdrRegistry::GetAllShaderNodeSourceTypes |
| NdrSdfTypeIndicator::GetNdrType | SdrSdfTypeIndicator::GetSdrType |
| NdrProperty\* | SdrShaderProperty\* |
| NdrNode\* | SdrShaderNode\* |
| Ndr\* | Sdr\* |

In the above tables, \* indicates arbitrary substrings. For example, the above `Ndr* -> Sdr*` row indicates NdrVersion should be replaced with SdrVersion, NdrRegistry with SdrRegistry, and so on for other types and functions.

**Environment variables**  
Any use of “NDR” environment variables should be updated to use the renamed “SDR” equivalents. See the source code for usage and documentation of these variables.

| Deprecated env var | Target env var |
| --- | --- |
| PXR\_NDR\_FS\_PLUGIN\_SEARCH\_PATHS | PXR\_SDR\_FS\_PLUGIN\_SEARCH\_PATHS |
| PXR\_NDR\_FS\_PLUGIN\_ALLOWED\_EXTS | PXR\_SDR\_FS\_PLUGIN\_ALLOWED\_EXTS |
| PXR\_NDR\_FS\_PLUGIN\_FOLLOW\_SYMLINKS | PXR\_SDR\_FS\_PLUGIN\_FOLLOW\_SYMLINKS |
| PXR\_NDR\_SKIP\_DISCOVERY\_PLUGIN\_DISCOVERY | PXR\_SDR\_SKIP\_DISCOVERY\_PLUGIN\_DISCOVERY |
| PXR\_NDR\_SKIP\_PARSER\_PLUGIN\_DISCOVERY | PXR\_SDR\_SKIP\_PARSER\_PLUGIN\_DISCOVERY |
| PXR\_NDR\_DISABLE\_PLUGINS | PXR\_SDR\_DISABLE\_PLUGINS |

Thank you for your effort and understanding in working with our efforts to consolidate the code base and semantics. Let us know if you have any questions.

---

<div class="post-metadata">

**Author:** ![anwang](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anwang](https://forum.aousd.org/u/anwang)\
**Post date:** [February 27, 2025, 1:10am UTC](https://forum.aousd.org/t/deprecation-of-pxr-usd-ndr/2167/2 "2025-02-27T01:10:35Z")

</div>

Deprecation of Ndr in favor of Sdr has landed in dev:

- [Deprecate Ndr in favor of Sdr. · PixarAnimationStudios/OpenUSD@32b9188 · GitHub](https://github.com/PixarAnimationStudios/OpenUSD/commit/32b91885754c7c2e9338c27abdbbfe731d20e97d)
- [Deprecate additional GetInputNames and GetOutputNames methods from Nd… · PixarAnimationStudios/OpenUSD@282de35 · GitHub](https://github.com/PixarAnimationStudios/OpenUSD/commit/282de35200a5b6fa3939496fa6462ad9b76fc3e9)

USD libraries using Ndr and Sdr have all been migrated to Sdr – you can refer to [these examples](https://github.com/PixarAnimationStudios/OpenUSD/commits/dev/?author=anwang2009&since=2025-01-27&until=2025-02-21) for what this looks like.
