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
UsdShadeShaderDefParserPlugin Class Reference

Parses shader definitions represented using USD scene description using the schemas provided by UsdShade. More...

#include <shaderDefParser.h>

+ Inheritance diagram for UsdShadeShaderDefParserPlugin:

Public Member Functions

USDSHADE_API NdrNodeUniquePtr Parse (const NdrNodeDiscoveryResult &discoveryResult) override
 Takes the specified NdrNodeDiscoveryResult instance, which was a result of the discovery process, and generates a new NdrNode.
 
USDSHADE_API const NdrTokenVec & GetDiscoveryTypes () const override
 Returns the types of nodes that this plugin can parse.
 
USDSHADE_API const TfTokenGetSourceType () const override
 Returns the source type that this parser operates on.
 
virtual NDR_API NdrNodeUniquePtr Parse (const NdrNodeDiscoveryResult &discoveryResult)=0
 Takes the specified NdrNodeDiscoveryResult instance, which was a result of the discovery process, and generates a new NdrNode.
 
virtual NDR_API const NdrTokenVec & GetDiscoveryTypes () const =0
 Returns the types of nodes that this plugin can parse.
 
virtual NDR_API const TfTokenGetSourceType () const =0
 Returns the source type that this parser operates on.
 
- 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
 

Additional Inherited Members

- Static Public Member Functions inherited from NdrParserPlugin
static NDR_API NdrNodeUniquePtr GetInvalidNode (const NdrNodeDiscoveryResult &dr)
 Gets an invalid node based on the discovery result provided.
 
- 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

Parses shader definitions represented using USD scene description using the schemas provided by UsdShade.

Definition at line 25 of file shaderDefParser.h.

Member Function Documentation

◆ GetDiscoveryTypes()

USDSHADE_API const NdrTokenVec & GetDiscoveryTypes ( ) const
overridevirtual

Returns the types of nodes that this plugin can parse.

"Type" here is the discovery type (in the case of files, this will probably be the file extension, but in other systems will be data that can be determined during discovery). This type should only be used to match up a NdrNodeDiscoveryResult to its parser plugin; this value is not exposed in the node's API.

Implements NdrParserPlugin.

◆ GetSourceType()

USDSHADE_API const TfToken & GetSourceType ( ) const
overridevirtual

Returns the source type that this parser operates on.

A source type is the most general type for a node. The parser plugin is responsible for parsing all discovery results that have the types declared under GetDiscoveryTypes(), and those types are collectively identified as one "source type".

Implements NdrParserPlugin.

◆ Parse()

USDSHADE_API NdrNodeUniquePtr Parse ( const NdrNodeDiscoveryResult discoveryResult)
overridevirtual

Takes the specified NdrNodeDiscoveryResult instance, which was a result of the discovery process, and generates a new NdrNode.

The node's name, source type, and family must match.

Implements NdrParserPlugin.


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