Description
This class allows you to retrieve information about a given extension. Instances of this class are obtained by calling MaxwellMayaAPI::GetExtensionInfo.
Methods
| GetType |
| GetName |
| GetNumParams |
| GetParamName |
| GetParamType |
| GetParamDefaultAndLimits |
| GetExtensionTypeName |
| GetParamTypeName |
ExtensionType GetType() const
Returns the type of the extension as one of:
ExtensionType_Texture: procedural texture. Not supported by the rest of the API yet.ExtensionType_GeometryModifier: geometry modifier. Use MaxwellMayaMesh::AddGeometryModifier to apply modifiers to meshes.ExtensionType_GeometryLoader: geometry loader. Use MaxwellMayaAPI::CreateExtensionShape to create objects of this type and MaxwellMayaExtensionShape to manipulate them.ExtensionType_GeometryProcedural: procedural object. Use MaxwellMayaAPI::CreateExtensionShape to create objects of this type and MaxwellMayaExtensionShape to manipulate them.ExtensionType_Sky: sky extension. Use MaxwellMayaAPI::AddSkyExtension to apply a sky extension to the scene.ExtensionType_SceneModifier: scene modifier. Use MaxwellMayaAPI::AddSceneModifierExtension to add extensions of this type to the scene.
MString GetName() const
Returns the name of the extension.
unsigned int GetNumParams() const
Returns the number of parameters defined by the extension.
This method does not exist in Python. It is replaced by GetParameters, which returns a list of all the parameters defined by the extension. For each parameter, the list contains a 5-tuple with the following values: name, type, default value, minimum value, maximum value. If the default, minimum or maximum are not defined, they are None.
MString GetParamName(unsigned int index) const
Returns the name of the parameter at the given index. This method does not exist in Python, where it is replaced by GetParameters (described above).
ParamType GetParamType(unsigned int index) const
Returns the type of the parameter at the given index as one of:
ParamType_ByteParamType_IntParamType_UIntParamType_FloatParamType_DoubleParamType_StringParamType_ByteArrayParamType_IntArrayParamType_FloatArrayParamType_DoubleArray
This method does not exist in Python, where it is replaced by GetParameters (described above).
bool GetParamDefaultAndLimits(unsigned int index, void* defaultValue, void* min, void* max) const
Returns the default, minimum and maximum value for the parameter at the given index. The defaultValue, min and max arguments must point to variables of the appropriate type: unsigned char, int, unsigned int, float or double. String and array attributes do not have default and limit values; the method will return false if called for attributes of those types.
This method does not exist in Python, where it is replaced by GetParameters (described above).
static const char* GetExtensionTypeName(ExtensionType type)
Returns a human-readable name for the given extension type code.
static const char* GetParamTypeName(ParamType type)
Returns a human-readable name for the given parameter type code.