3ds Max C++ API Reference
|
The NodeProperties class is a container for properties that OSL is interested in. More...
#include <MaxOSLNodeProperties.h>
Public Member Functions | |
const INodePropertyValue *const | GetValue (const char *name, bool is_ustring=false) const |
Returns a INodePropertyValue pointer for a given property name, or NULL if that property does not exist. More... | |
Tab< const char * > | GetNames () const |
Returns the list of properties attached to this INode. More... | |
Friends | |
class | NodePropertyManager |
The NodeProperties class is a container for properties that OSL is interested in.
This class is returned by the INodePropertyManager::GetProperties() for a particular INode, and allows querying which properties are available, and what values they have.
This contains both the 'standard' properties like 'nodeHandle' and 'wireColor' but also any user-properties the user has added in the Object Property dialog. The latter has names prepended by the string "usr_".
For more information and sample code, see INodePropertyManager
const INodePropertyValue* const GetValue | ( | const char * | name, |
bool | is_ustring = false |
||
) | const |
Returns a INodePropertyValue pointer for a given property name, or NULL if that property does not exist.
If you know the name is already matching a UString pointer (which you can obtain from IOSLGlobalInterface::GetUString()) you can pass is_ustring = true. This removes a string hashing step, and is a good performance optimization if you choose to do these lookups at render time.
Tab<const char *> GetNames | ( | ) | const |
Returns the list of properties attached to this INode.
These can be iterated through a GetValue() called for each. These pointers are ustrings, so is_ustring can be true in the GetValue() call, and they can be compared against previously stored ustring values.
|
friend |