All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RmanOslParserPlugin Class Reference

Parses OSL nodes. More...

+ Inheritance diagram for RmanOslParserPlugin:

Public Member Functions

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

For more information on parser plugins, see the documentation for NdrParserPlugin.

Metadata Schema

The following metadata is pulled out of the shader and available on the destination as outlined below.

Node Metadata

OSL Metadata Key Destination
category GetCategory()
departments GetDepartments()
help GetHelp()
label GetLabel()
primvars GetPrimvars(), GetAdditionalPrimvarProperties()
_everything else_ GetMetadata()

Property Metadata

OSL Metadata Key Destination
connectable IsConnectable()
page GetPage()
help GetHelp()
label GetLabel()
isDynamicArray IsDynamicArray()
options GetOptions()
vstructMemberName GetVStructMemberName()
vstructMemberOf GetVStructMemberOf()
_everything else_ GetMetadata()

Options Format

Multiple options are separated with the pipe '|' character; options can be specified in one of two ways:

  • key1|key2|key3|...
  • key1:value1|key2:value2|...

In the first case, where the values are not specified, the value of the option will be available on the node as an empty string.

Primvar Format

Multiple primvars are separated with the pipe '|' character; primvars can be specified in one of two ways:

  • A string not prefixed with a '$'; this indicates a normal primvar
  • A string prefixed with '$'; the part after the '$' indicates the name of a string-typed input on the node whose value contains additional primvars

Definition at line 108 of file rmanOslParser.h.

Member Function Documentation

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.

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.

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.

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.

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.

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 files: