|
HDK
|
#include <oslParser.h>
Inheritance diagram for SdrOslParserPlugin:Public Types | |
| typedef HOSL::OSLQuery::Parameter | OslParameter |
Public Member Functions | |
| SDROSL_API | SdrOslParserPlugin () |
| SDROSL_API | ~SdrOslParserPlugin () |
| SDROSL_API SdrShaderNodeUniquePtr | ParseShaderNode (const SdrShaderNodeDiscoveryResult &discoveryResult) override |
| SDROSL_API const SdrTokenVec & | GetDiscoveryTypes () const override |
| SDROSL_API const TfToken & | GetShadingSystem () const override |
| Returns the shading system that this parser operates in. More... | |
Public Member Functions inherited from SdrParserPlugin | |
| SDR_API | SdrParserPlugin () |
| virtual SDR_API | ~SdrParserPlugin () |
| virtual SDR_API const TfToken & | GetSourceType () const |
Public Member Functions inherited from TfWeakBase | |
| TfWeakBase () | |
| TfWeakBase (const TfWeakBase &) | |
| const TfWeakBase & | __GetTfWeakBase__ () const |
| const TfWeakBase & | operator= (const TfWeakBase &) |
| void | EnableNotification2 () const |
| TF_API void const * | GetUniqueIdentifier () const |
Additional Inherited Members | |
Static Public Member Functions inherited from SdrParserPlugin | |
| static SDR_API SdrShaderNodeUniquePtr | GetInvalidShaderNode (const SdrShaderNodeDiscoveryResult &dr) |
Protected Member Functions inherited from TfWeakBase | |
| ~TfWeakBase () | |
| TfRefPtr< Tf_Remnant > | _Register () const |
| template<class T > | |
| TfRefPtr< Tf_Remnant > | _Register (T *tempRmnt) const |
| bool | _HasRemnant () const |
Parses OSL nodes. For more information on parser plugins, see the documentation for SdrParserPlugin.
The following metadata is pulled out of the shader and available on the destination as outlined below.
| OSL Metadata Key | Destination |
|---|---|
| category | GetCategory() |
| departments | GetDepartments() |
| help | GetHelp() |
| label | GetLabel() |
| primvars | GetPrimvars(), GetAdditionalPrimvarProperties() |
| _everything else_ | GetMetadata() |
| OSL Metadata Key | Destination |
|---|---|
| connectable | IsConnectable() |
| sdrDefinitionName | renames parameter, sends original osl param name to |
| SdrShaderProperty::GetImplementationName() page | GetPage() help | GetHelp() label | GetLabel() isDynamicArray | IsDynamicArray() options | GetOptions() vstructMemberName | GetVStructMemberName() vstructMemberOf | GetVStructMemberOf() everything else | GetMetadata()
Multiple options are separated with the pipe '|' character; options can be specified in one of two ways:
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.
Multiple primvars are separated with the pipe '|' character; primvars can be specified in one of two ways:
Definition at line 94 of file oslParser.h.
| typedef HOSL::OSLQuery::Parameter SdrOslParserPlugin::OslParameter |
Definition at line 97 of file oslParser.h.
| SDROSL_API SdrOslParserPlugin::SdrOslParserPlugin | ( | ) |
| SDROSL_API SdrOslParserPlugin::~SdrOslParserPlugin | ( | ) |
|
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 SdrShaderNodeDiscoveryResult to its parser plugin; this value is not exposed in the node's API.
Implements SdrParserPlugin.
|
overridevirtual |
Returns the shading system that this parser operates in.
Reimplemented from SdrParserPlugin.
|
overridevirtual |
Takes the specified SdrShaderNodeDiscoveryResult instance, which was a result of the discovery process, and generates a new SdrShaderNode. The node's name, shading system, and function must match.
Implements SdrParserPlugin.