Loading...
Searching...
No Matches
SdrShaderNodeDiscoveryResult Struct Reference

Represents the raw data of a node, and some other bits of metadata, that were determined via a SdrDiscoveryPlugin. More...

#include <shaderNodeDiscoveryResult.h>

Public Member Functions

 SdrShaderNodeDiscoveryResult (const SdrIdentifier &identifier, const SdrVersion &version, const std::string &name, const TfToken &function, const TfToken &discoveryType, const TfToken &shadingSystem, const std::string &uri, const std::string &resolvedUri, const std::string &sourceCode=std::string(), const SdrTokenMap &metadata=SdrTokenMap(), const std::string &blindData=std::string(), const TfToken &subIdentifier=TfToken())
 Constructor.
 
 SdrShaderNodeDiscoveryResult (SdrShaderNodeDiscoveryResult &&other)
 The following methods will removed in favor of implicitly defined methods once sourceType is fully removed from Sdr.
 
 SdrShaderNodeDiscoveryResult (const SdrShaderNodeDiscoveryResult &other)
 
SdrShaderNodeDiscoveryResultoperator= (SdrShaderNodeDiscoveryResult &&other)
 
SdrShaderNodeDiscoveryResultoperator= (const SdrShaderNodeDiscoveryResult &other)
 

Public Attributes

SdrIdentifier identifier
 The node's identifier.
 
SdrVersion version
 The node's version.
 
std::string name
 The node's name.
 
TfToken function
 The node's function.
 
TfTokenfamily
 The node's family.
 
TfToken discoveryType
 The node's discovery type.
 
TfToken shadingSystem
 The node's shading system.
 
TfTokensourceType
 The node's source type.
 
std::string uri
 The node's origin.
 
std::string resolvedUri
 The node's fully-resolved URI.
 
std::string sourceCode
 The node's entire source code.
 
SdrTokenMap metadata
 The node's metadata collected during the discovery process.
 
std::string blindData
 An optional detail for the parser plugin.
 
TfToken subIdentifier
 The subIdentifier is associated with a particular asset and refers to a specific definition within the asset.
 

Detailed Description

Represents the raw data of a node, and some other bits of metadata, that were determined via a SdrDiscoveryPlugin.

Definition at line 19 of file shaderNodeDiscoveryResult.h.

Constructor & Destructor Documentation

◆ SdrShaderNodeDiscoveryResult() [1/3]

SdrShaderNodeDiscoveryResult ( const SdrIdentifier identifier,
const SdrVersion version,
const std::string &  name,
const TfToken function,
const TfToken discoveryType,
const TfToken shadingSystem,
const std::string &  uri,
const std::string &  resolvedUri,
const std::string &  sourceCode = std::string(),
const SdrTokenMap &  metadata = SdrTokenMap(),
const std::string &  blindData = std::string(),
const TfToken subIdentifier = TfToken() 
)
inline

Constructor.

Definition at line 21 of file shaderNodeDiscoveryResult.h.

◆ SdrShaderNodeDiscoveryResult() [2/3]

The following methods will removed in favor of implicitly defined methods once sourceType is fully removed from Sdr.

The sourceType reference to shadingSystem in this class causes this group of formerly implicit methods to be deleted. {@

Definition at line 55 of file shaderNodeDiscoveryResult.h.

◆ SdrShaderNodeDiscoveryResult() [3/3]

Definition at line 72 of file shaderNodeDiscoveryResult.h.

Member Function Documentation

◆ operator=() [1/2]

SdrShaderNodeDiscoveryResult & operator= ( const SdrShaderNodeDiscoveryResult other)
inline

Definition at line 109 of file shaderNodeDiscoveryResult.h.

◆ operator=() [2/2]

Definition at line 89 of file shaderNodeDiscoveryResult.h.

Member Data Documentation

◆ blindData

std::string blindData

An optional detail for the parser plugin.

The parser plugin defines the meaning of this data so the discovery plugin must be written to match.

Definition at line 204 of file shaderNodeDiscoveryResult.h.

◆ discoveryType

TfToken discoveryType

The node's discovery type.

The type could be the file extension, or some other type of metadata that can signify a type prior to parsing. See the documentation for SdrParserPlugin and SdrParserPlugin::DiscoveryTypes for more information on how this value is used.

Definition at line 157 of file shaderNodeDiscoveryResult.h.

◆ family

TfToken& family

The node's family.

Deprecated:
Deprecated in favor of function.

Definition at line 149 of file shaderNodeDiscoveryResult.h.

◆ function

TfToken function

The node's function.

A node's function specifies a generic grouping of nodes. E.g a node with identifier "mix_float_2_1" might have function "mix".

Definition at line 143 of file shaderNodeDiscoveryResult.h.

◆ identifier

SdrIdentifier identifier

The node's identifier.

How the node is identified. In many cases this will be the name of the file or resource that this node originated from. E.g. "mix_float_2_1". The identifier must be unique for a given sourceType.

Definition at line 124 of file shaderNodeDiscoveryResult.h.

◆ metadata

SdrTokenMap metadata

The node's metadata collected during the discovery process.

Additional metadata may be present in the node's source, in the asset pointed to by resolvedUri or in sourceCode (if resolvedUri is empty). In general, parsers should override this data with metadata from the shader source.

Definition at line 199 of file shaderNodeDiscoveryResult.h.

◆ name

std::string name

The node's name.

A version independent identifier for the node type. This will often embed type parameterization but should not embed the version. E.g a node with identifier "mix_float_2_1" might have name "mix_float".

Definition at line 137 of file shaderNodeDiscoveryResult.h.

◆ resolvedUri

std::string resolvedUri

The node's fully-resolved URI.

For example, this might be an absolute path when the original URI was a relative path. In most cases, this is the path that Ar's Resolve() returns. In any case, this path should be locally accessible.

Definition at line 185 of file shaderNodeDiscoveryResult.h.

◆ shadingSystem

TfToken shadingSystem

The node's shading system.

This type is unique to the parsing plugin and indicates what shading language and standard should be used to interpret this discovery result.

See also
SdrShaderNode::GetShadingSystem

Definition at line 165 of file shaderNodeDiscoveryResult.h.

◆ sourceCode

std::string sourceCode

The node's entire source code.

The source code is parsed (if non-empty) by parser plugins when the resolvedUri value is empty.

Definition at line 191 of file shaderNodeDiscoveryResult.h.

◆ sourceType

TfToken& sourceType

The node's source type.

Deprecated:
Deprecated in favor of shadingSystem

Definition at line 171 of file shaderNodeDiscoveryResult.h.

◆ subIdentifier

TfToken subIdentifier

The subIdentifier is associated with a particular asset and refers to a specific definition within the asset.

The asset is the one referred to by SdrRegistry::GetNodeFromAsset(). The subIdentifier is not needed for all cases where the node definition is not associated with an asset. Even if the node definition is associated with an asset, the subIdentifier is only needed if the asset specifies multiple definitions rather than a single definition.

Definition at line 213 of file shaderNodeDiscoveryResult.h.

◆ uri

std::string uri

The node's origin.

This may be a filesystem path, a URL pointing to a resource in the cloud, or some other type of resource identifier.

Definition at line 177 of file shaderNodeDiscoveryResult.h.

◆ version

SdrVersion version

The node's version.

This may or may not be embedded in the identifier, it's up to implementations. E.g a node with identifier "mix_float_2_1" might have version 2.1.

Definition at line 129 of file shaderNodeDiscoveryResult.h.


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