|
MaterialX 1.38.2
|
A registry for metadata that will be exported to the generated shader if found on nodes and inputs during shader generation. More...
#include <ShaderNode.h>
Public Member Functions | |
| void | addMetadata (const string &name, const TypeDesc *type, ValuePtr value=nullptr) |
| Add a new metadata entry to the registry. More... | |
| const ShaderMetadata * | findMetadata (const string &name) const |
| Return the metadata registered for the given name, or nullptr if no such entry is found. | |
| ShaderMetadata * | findMetadata (const string &name) |
| Return the metadata registered for the given name, or nullptr if no such entry is found. | |
| const ShaderMetadataVec & | getAllMetadata () const |
| Return all entries in the registry. | |
| void | clear () |
| Clear all entries in the registry. | |
Public Member Functions inherited from GenUserData | |
| GenUserDataPtr | getSelf () |
| Return a shared pointer for this object. | |
| ConstGenUserDataPtr | getSelf () const |
| Return a shared pointer for this object. | |
| template<class T > | |
| shared_ptr< T > | asA () |
| Return this object cast to a templated type. | |
| template<class T > | |
| shared_ptr< const T > | asA () const |
| Return this object cast to a templated type. | |
Static Public Attributes | |
| static const string | USER_DATA_NAME = "ShaderMetadataRegistry" |
Protected Attributes | |
| vector< ShaderMetadata > | _entries |
| std::unordered_map< string, size_t > | _entryIndex |
A registry for metadata that will be exported to the generated shader if found on nodes and inputs during shader generation.
Add a new metadata entry to the registry.
The entry contains the name and data type for the metadata.