MaxwellMayaExtensionParams class
Description
MaxwellMayaExtensionParams
 is used to pass values to Maxwell extensions. You create instances of this class by calling MaxwellMayaAPI::CreateExtensionParamBlock
and specifying the name of the extension you want to use. The extension does not have to be present when you export the scene; the name and parameters will be stored verbatim in the MXS file and Maxwell will try to match them to an existing extension at render time. As a side effect, the parameter names and types passed to the Set*
methods cannot be validated, so you cannot rely on the API to return an error if you misspell a name or get a type wrong.
No type conversions or promotions are performed for the attributes. For example, it is an error to export a float attribute where a double attribute is needed. Most likely the attribute will fail to load at render time and a default (or invalid) value will be used instead.
Methods
bool | SetByte(const MString& name, unsigned char value) |
bool | SetInt(const MString& name, int value) |
bool | SetUInt(const MString& name, unsigned int value) |
bool | SetFloat(const MString& name, float value) |
bool | SetDouble(const MString& name, double value) |
bool | SetString(const MString& name, const MString& value) |
bool | SetByteArray(const MString& name, unsigned int numValues, const unsigned char* values) |
bool | SetIntArray(const MString& name, unsigned int numValues, const int* values) |
bool | SetIntArray(const MString& name, const MIntArray& values) |
bool | SetFloatArray(const MString& name, unsigned int numValues, const float* values) |
bool | SetFloatArray(const MString& name, const MFloatArray& values) |
bool | SetDoubleArray(const MString& name, unsigned int numValues, const double* values) |
bool | SetDoubleArray(const MString& name, const MDoubleArray& values) |
bool SetByte(const MString& name, unsigned char value)
Exports a byte attribute with the given name and value.
bool SetInt(const MString& name, int value)
Exports an integer attribute with the given name and value.
bool SetUInt(const MString& name, unsigned int value)
Exports an unsigned integer attribute with the given name and value.
bool SetFloat(const MString& name, float value)
Exports a single-precision floating point attribute with the given name and value.
bool SetDouble(const MString& name, double value)
Exports a double-precision floating point attribute with the given name and value.
bool SetString(const MString& name, const MString& value)
Exports a string attribute with the given name and value.
bool SetByteArray(const MString& name, unsigned int numValues, const unsigned char* values)
Exports a byte array attribute with the given name and values. The Python version takes a list of numbers as the value argument and does not require numValues.
bool SetIntArray(const MString& name, unsigned int numValues, const int* values)
bool SetIntArray(const MString& name, const MIntArray& values)
Exports an integer array attribute with the given name and values.
In Python, the method takes a list of numbers and does not require numValues. The MIntArray
overload does not exist.
bool SetFloatArray(const MString& name, unsigned int numValues, const float* values)
bool SetFloatArray(const MString& name, const MFloatArray& values)
Exports an array of floats attribute with the given name and values.
In Python, the method takes a list of numbers and does not require numValues. The MFloatArray
 overload does not exist.
bool SetDoubleArray(const MString& name, unsigned int numValues, const double* values)
bool SetDoubleArray(const MString& name, const MDoubleArray& values)
Exports an array of doubles attribute with the given name and values.
In Python, the method takes a list of numbers and does not require numValues. The MDoubleArray
 overload does not exist.