This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SdrRegistry Class Reference

The shading-specialized version of NdrRegistry. More...

#include <registry.h>

+ Inheritance diagram for SdrRegistry:

Public Member Functions

SDR_API SdrShaderNodeConstPtr GetShaderNodeByIdentifier (const NdrIdentifier &identifier, const NdrTokenVec &typePriority=NdrTokenVec())
 Exactly like NdrRegistry::GetNodeByIdentifier(), but returns a SdrShaderNode pointer instead of a NdrNode pointer.
 
SDR_API SdrShaderNodeConstPtr GetShaderNodeByIdentifierAndType (const NdrIdentifier &identifier, const TfToken &nodeType)
 Exactly like NdrRegistry::GetNodeByIdentifierAndType(), but returns a SdrShaderNode pointer instead of a NdrNode pointer.
 
SDR_API SdrShaderNodeConstPtr GetShaderNodeByName (const std::string &name, const NdrTokenVec &typePriority=NdrTokenVec(), NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
 Exactly like NdrRegistry::GetNodeByName(), but returns a SdrShaderNode pointer instead of a NdrNode pointer.
 
SDR_API SdrShaderNodeConstPtr GetShaderNodeByNameAndType (const std::string &name, const TfToken &nodeType, NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
 Exactly like NdrRegistry::GetNodeByNameAndType(), but returns a SdrShaderNode pointer instead of a NdrNode pointer.
 
SDR_API SdrShaderNodeConstPtr GetShaderNodeFromAsset (const SdfAssetPath &shaderAsset, const NdrTokenMap &metadata=NdrTokenMap(), const TfToken &subIdentifier=TfToken(), const TfToken &sourceType=TfToken())
 Wrapper method for NdrRegistry::GetNodeFromAsset().
 
SDR_API SdrShaderNodeConstPtr GetShaderNodeFromSourceCode (const std::string &sourceCode, const TfToken &sourceType, const NdrTokenMap &metadata=NdrTokenMap())
 Wrapper method for NdrRegistry::GetNodeFromSourceCode().
 
SDR_API SdrShaderNodePtrVec GetShaderNodesByIdentifier (const NdrIdentifier &identifier)
 Exactly like NdrRegistry::GetNodesByIdentifier(), but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers.
 
SDR_API SdrShaderNodePtrVec GetShaderNodesByName (const std::string &name, NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
 Exactly like NdrRegistry::GetNodesByName(), but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers.
 
SDR_API SdrShaderNodePtrVec GetShaderNodesByFamily (const TfToken &family=TfToken(), NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
 Exactly like NdrRegistry::GetNodesByFamily(), but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers.
 
- Public Member Functions inherited from NdrRegistry
NDR_API void SetExtraDiscoveryPlugins (DiscoveryPluginRefPtrVec plugins)
 Allows the client to set any additional discovery plugins that would otherwise NOT be found through the plugin system.
 
NDR_API void SetExtraDiscoveryPlugins (const std::vector< TfType > &pluginTypes)
 Allows the client to set any additional discovery plugins that would otherwise NOT be found through the plugin system.
 
NDR_API void AddDiscoveryResult (NdrNodeDiscoveryResult &&discoveryResult)
 Allows the client to explicitly set additional discovery results that would otherwise NOT be found through the plugin system.
 
NDR_API void AddDiscoveryResult (const NdrNodeDiscoveryResult &discoveryResult)
 Copy version of the method above.
 
NDR_API void SetExtraParserPlugins (const std::vector< TfType > &pluginTypes)
 Allows the client to set any additional parser plugins that would otherwise NOT be found through the plugin system.
 
NDR_API NdrNodeConstPtr GetNodeFromAsset (const SdfAssetPath &asset, const NdrTokenMap &metadata, const TfToken &subIdentifier=TfToken(), const TfToken &sourceType=TfToken())
 Parses the given asset, constructs a NdrNode from it and adds it to the registry.
 
NDR_API NdrNodeConstPtr GetNodeFromSourceCode (const std::string &sourceCode, const TfToken &sourceType, const NdrTokenMap &metadata)
 Parses the given sourceCode string, constructs a NdrNode from it and adds it to the registry.
 
NDR_API NdrStringVec GetSearchURIs () const
 Get the locations where the registry is searching for nodes.
 
NDR_API NdrIdentifierVec GetNodeIdentifiers (const TfToken &family=TfToken(), NdrVersionFilter filter=NdrVersionFilterDefaultOnly) const
 Get the identifiers of all the nodes that the registry is aware of.
 
NDR_API NdrStringVec GetNodeNames (const TfToken &family=TfToken()) const
 Get the names of all the nodes that the registry is aware of.
 
NDR_API NdrNodeConstPtr GetNodeByIdentifier (const NdrIdentifier &identifier, const NdrTokenVec &sourceTypePriority=NdrTokenVec())
 Get the node with the specified identifier, and an optional sourceTypePriority list specifying the set of node SOURCE types (see NdrNode::GetSourceType()) that should be searched.
 
NDR_API NdrNodeConstPtr GetNodeByIdentifierAndType (const NdrIdentifier &identifier, const TfToken &sourceType)
 Get the node with the specified identifier and sourceType.
 
NDR_API NdrNodeConstPtr GetNodeByName (const std::string &name, const NdrTokenVec &sourceTypePriority=NdrTokenVec(), NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
 Get the node with the specified name.
 
NDR_API NdrNodeConstPtr GetNodeByNameAndType (const std::string &name, const TfToken &sourceType, NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
 A convenience wrapper around GetNodeByName().
 
NDR_API NdrNodeConstPtrVec GetNodesByIdentifier (const NdrIdentifier &identifier)
 Get all nodes matching the specified identifier (multiple nodes of the same identifier, but different source types, may exist).
 
NDR_API NdrNodeConstPtrVec GetNodesByName (const std::string &name, NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
 Get all nodes matching the specified name.
 
NDR_API NdrNodeConstPtrVec GetNodesByFamily (const TfToken &family=TfToken(), NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
 Get all nodes from the registry, optionally restricted to the nodes that fall under a specified family and/or the default version.
 
NDR_API NdrTokenVec GetAllNodeSourceTypes () const
 Get a sorted list of all node source types that may be present on the nodes in the registry.
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Static Public Member Functions

static SDR_API SdrRegistryGetInstance ()
 Get the single SdrRegistry instance.
 

Friends

class TfSingleton< SdrRegistry >
 

Additional Inherited Members

- Public Types inherited from NdrRegistry
using DiscoveryPluginRefPtrVec = NdrDiscoveryPluginRefPtrVector
 
- Protected Member Functions inherited from NdrRegistry
 NdrRegistry (const NdrRegistry &)=delete
 
NdrRegistryoperator= (const NdrRegistry &)=delete
 
- Protected Member Functions inherited from TfWeakBase
TfRefPtr< Tf_Remnant > _Register () const
 
template<class T >
TfRefPtr< Tf_Remnant > _Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

The shading-specialized version of NdrRegistry.

Definition at line 26 of file registry.h.

Member Function Documentation

◆ GetInstance()

static SDR_API SdrRegistry & GetInstance ( )
static

Get the single SdrRegistry instance.

◆ GetShaderNodeByIdentifier()

SDR_API SdrShaderNodeConstPtr GetShaderNodeByIdentifier ( const NdrIdentifier identifier,
const NdrTokenVec &  typePriority = NdrTokenVec() 
)

Exactly like NdrRegistry::GetNodeByIdentifier(), but returns a SdrShaderNode pointer instead of a NdrNode pointer.

◆ GetShaderNodeByIdentifierAndType()

SDR_API SdrShaderNodeConstPtr GetShaderNodeByIdentifierAndType ( const NdrIdentifier identifier,
const TfToken nodeType 
)

Exactly like NdrRegistry::GetNodeByIdentifierAndType(), but returns a SdrShaderNode pointer instead of a NdrNode pointer.

◆ GetShaderNodeByName()

SDR_API SdrShaderNodeConstPtr GetShaderNodeByName ( const std::string &  name,
const NdrTokenVec &  typePriority = NdrTokenVec(),
NdrVersionFilter  filter = NdrVersionFilterDefaultOnly 
)

Exactly like NdrRegistry::GetNodeByName(), but returns a SdrShaderNode pointer instead of a NdrNode pointer.

◆ GetShaderNodeByNameAndType()

SDR_API SdrShaderNodeConstPtr GetShaderNodeByNameAndType ( const std::string &  name,
const TfToken nodeType,
NdrVersionFilter  filter = NdrVersionFilterDefaultOnly 
)

Exactly like NdrRegistry::GetNodeByNameAndType(), but returns a SdrShaderNode pointer instead of a NdrNode pointer.

◆ GetShaderNodeFromAsset()

SDR_API SdrShaderNodeConstPtr GetShaderNodeFromAsset ( const SdfAssetPath shaderAsset,
const NdrTokenMap &  metadata = NdrTokenMap(),
const TfToken subIdentifier = TfToken(),
const TfToken sourceType = TfToken() 
)

Wrapper method for NdrRegistry::GetNodeFromAsset().

Returns a valid SdrShaderNode pointer upon success.

◆ GetShaderNodeFromSourceCode()

SDR_API SdrShaderNodeConstPtr GetShaderNodeFromSourceCode ( const std::string &  sourceCode,
const TfToken sourceType,
const NdrTokenMap &  metadata = NdrTokenMap() 
)

Wrapper method for NdrRegistry::GetNodeFromSourceCode().

Returns a valid SdrShaderNode pointer upon success.

◆ GetShaderNodesByFamily()

SDR_API SdrShaderNodePtrVec GetShaderNodesByFamily ( const TfToken family = TfToken(),
NdrVersionFilter  filter = NdrVersionFilterDefaultOnly 
)

Exactly like NdrRegistry::GetNodesByFamily(), but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers.

◆ GetShaderNodesByIdentifier()

SDR_API SdrShaderNodePtrVec GetShaderNodesByIdentifier ( const NdrIdentifier identifier)

Exactly like NdrRegistry::GetNodesByIdentifier(), but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers.

◆ GetShaderNodesByName()

SDR_API SdrShaderNodePtrVec GetShaderNodesByName ( const std::string &  name,
NdrVersionFilter  filter = NdrVersionFilterDefaultOnly 
)

Exactly like NdrRegistry::GetNodesByName(), but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers.

Friends And Related Function Documentation

◆ TfSingleton< SdrRegistry >

friend class TfSingleton< SdrRegistry >
friend

Definition at line 95 of file registry.h.


The documentation for this class was generated from the following file: