MaxwellMayaExtensionInfo class

Description

This class allows you to retrieve information about a given extension. Instances of this class are obtained by calling MaxwellMayaAPI::GetExtensionInfo.

Methods

ExtensionTypeGetType() const
MStringGetName() const
unsigned intGetNumParams() const
MStringGetParamName(unsigned int index) const
ParamTypeGetParamType(unsigned int index) const
boolGetParamDefaultAndLimits(unsigned int index, void* defaultValue, void* min, void* max) const
static const char*GetExtensionTypeName(ExtensionType type)
static const char*GetParamTypeName(ParamType type)

ExtensionType GetType() const

Returns the type of the extension as one of:

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_Byte
  • ParamType_Int
  • ParamType_UInt
  • ParamType_Float
  • ParamType_Double
  • ParamType_String
  • ParamType_ByteArray
  • ParamType_IntArray
  • ParamType_FloatArray
  • ParamType_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.