- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# MFnNumericAttribute Class Reference
OpenMaya - API module for common classes | FunctionSet classes

Search for all occurrences

## Detailed Description

Numeric attribute function set.

MFnNumericAttribute is the function set for dependency node attributes that store one, two or three untyped numeric values. A numeric attribute supports both a "hard" maximum/minimum and a soft maximum/minimum. The soft maximum/minimum are used by the Attribute Editor as the limits on its slider, but values within the hard range can be typed in the input box.

As a convenience, MFnNumericAttribute will set the flags of child attributes as well when the flags of the parent attribute are set. This is important when creating a numeric pair or triplet. For example, if MFnNumericAttribute is used to create a 3 double attribute and the attribute is set to be keyable, then the three child attributes will also be marked as keyable.

Examples:

  anisotropicShader.cpp, arcLenNode.cpp, backfillShader.cpp, blindDataMesh.cpp, blindShortDataCmd.cpp, brickShader.cpp, buildRotationNode.cpp, cellShader.cpp, cgfxAttrDef.cpp, cgfxShaderNode.cpp, cgfxVector.cpp, checkerShader.cpp, circleNode.cpp, clearcoat.cpp, closestPointOnCurveNode.cpp, compositingShader.cpp, contrastShader.cpp, curvedArrowsNode.cpp, customImagePlane.cpp, cvColorNode.cpp, cvColorShader.cpp, depthShader.cpp, displacementShader.cpp, dynExprField.cpp, flameShader.cpp, gammaShader.cpp, genericAttributeNode.cpp, geometrySurfaceConstraint.cpp, geomShader.cpp, GLSLShaderNode.cpp, hwAnisotropicShader_NV20.cpp, hwColorPerVertexShader.cpp, hwDecalBumpShader_NV20.cpp, hwPhongShader.cpp, hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, hwUnlitShader.cpp, interpShader.cpp, jitterNode.cpp, lambertShader.cpp, latticeNoiseNode.cpp, lavaShader.cpp, lightShader.cpp, mixtureShader.cpp, multiCurveNode.cpp, noiseShader.cpp, particleAttrNode.cpp, phongShader.cpp, pnTrianglesNode.cpp, pointOnMeshInfoNode.cpp, pointOnSubdNode.cpp, quadricShape.cpp, renderAccessNode.cpp, rockingTransform.cpp, shadowMatteShader.cpp, shellNode.cpp, shiftNode.cpp, simpleSpring.cpp, sineNode.cpp, slopeShaderNode.cpp, solidCheckerShader.cpp, stringFormatNode.cpp, surfaceBumpManip.cpp, swissArmyManip.cpp, torusField.cpp, transCircleNode.cpp, volumeShader.cpp, weightListNode.cpp, and yTwistNode.cpp.

`#include <MFnNumericAttribute.h>`

Inheritance diagram for MFnNumericAttribute:
[legend]

List of all members.

## Public Member Functions
virtual MFn::Type | type () const
| Function set type.
virtual | ~MFnNumericAttribute ()
| Destructor.
| MFnNumericAttribute ()
| Default constructor.
| MFnNumericAttribute (MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
MObject | create (const MString &fullName, const MString &briefName, MFnNumericData::Type unitType, double defaultValue=0, MStatus *ReturnStatus=NULL)
| Create a new numeric attribute and return it as an MObject.
MObject | createColor (const MString &fullName, const MString &briefName, MStatus *ReturnStatus=NULL)
| Create a new color attribute and return it as an MObject.
MObject | createPoint (const MString &fullName, const MString &briefName, MStatus *ReturnStatus=NULL)
| Create a new point attribute and return it as an MObject.
MObject | createAddr (const MString &fullName, const MString &briefName, void *defaultValue=NULL, MStatus *ReturnStatus=NULL)
| Create a new address attribute and return it as an MObject.
MObject | create (const MString &fullName, const MString &briefName, const MObject &child1, const MObject &child2, const MObject &child3=MObject::kNullObj, MStatus *ReturnStatus=NULL)
| Create a new numeric attribute and return it as an MObject.
MFnNumericData::Type | unitType (MStatus *ReturnStatus=NULL) const
| Return the unit type of this attribute.
MObject | child (unsigned int index, MStatus *ReturnStatus=NULL) const
| Return the indicated child attribute as an MObject.
bool | hasMin (MStatus *ReturnStatus=NULL) const
| Determine whether or not this attribute has a minimum value set.
bool | hasMax (MStatus *ReturnStatus=NULL) const
| Determine whether or not this attribute has a maximum value set.
bool | hasSoftMin (MStatus *ReturnStatus=NULL) const
| Determine whether or not this double attribute has a soft minimum value set.
bool | hasSoftMax (MStatus *ReturnStatus=NULL) const
| Determine whether or not this double attribute has a soft maximum value set.
MStatus | getMin (double &min1) const
| Return the minimum value for this double attribute.
MStatus | getMin (double &min1, double &min2) const
| Return the minimum values for the two children (both double attributes) of this compound attribute.
MStatus | getMin (double &min1, double &min2, double &min3) const
| Return the minimum values for the three children (all double attributes) of this compound attribute.
MStatus | getMax (double &max1) const
| Return the maximum value for this double attribute.
MStatus | getMax (double &max1, double &max2) const
| Return the maximum values for the two children (both double attributes) of this compound attribute.
MStatus | getMax (double &max1, double &max2, double &max3) const
| Return the maximum values for the three children (all double attributes) of this compound attribute.
MStatus | getSoftMin (double &min1) const
| Return the minimum value for this double attribute.
MStatus | getSoftMax (double &max1) const
| Return the maximum value for this double attribute.
MStatus | setMin (double min1)
| Set the minimum value for this double attribute.
MStatus | setMin (double min1, double min2)
| Set the minimum values for the two children (both double attributes) of this compound attribute.
MStatus | setMin (double min1, double min2, double min3)
| Set the minimum values for the three children (all double attributes) of this compound attribute.
MStatus | setMax (double max1)
| Set the maximum value for this double attribute.
MStatus | setMax (double max1, double max2)
| Set the maximum values for the two children (both double attributes) of this compound attribute.
MStatus | setMax (double max1, double max2, double max3)
| Set the maximum values for the three children (all double attributes) of this compound attribute.
MStatus | setSoftMin (double min1)
| Set the soft minimum value for this double attribute.
MStatus | setSoftMax (double max1)
| Set the soft maximum value for this double attribute.
MStatus | getDefault (bool &def1)
| Get the default value for this boolean attribute.
MStatus | getDefault (char &def1)
| Get the default value for this character attribute.
MStatus | getDefault (int &def1)
| Gets the default value for this integral attribute.
MStatus | getDefault (int &def1, int &def2)
| Gets the default value for the integral attributes of the two children of this attribute.
MStatus | getDefault (int &def1, int &def2, int &def3)
| Gets the default value for the integral attributes of the three children of this attribute.
MStatus | getDefault (float &def1)
| Gets the default value for this float attribute.
MStatus | getDefault (float &def1, float &def2)
| Gets the default value for the float attributes of the two children of this attribute.
MStatus | getDefault (float &def1, float &def2, float &def3)
| Gets the default value for the float attributes of the three children of this attribute.
MStatus | getDefault (double &def1)
| Get the default value for this double attribute.
MStatus | getDefault (double &def1, double &def2)
| Gets the default value for the double attributes of the two children of this attribute.
MStatus | getDefault (double &def1, double &def2, double &def3)
| Gets the default value for the double attributes of the three children of this attribute.
MStatus | getDefault (double &def1, double &def2, double &def3, double &def4)
| Gets the default value for the double attributes of the four children of this attribute.
MStatus | getDefault (void *&def1)
| Get the default value for this address attribute.
MStatus | setDefault (bool def1)
| Set a new default value for this boolean attribute.
MStatus | setDefault (char def1)
| Set a new default value for this character attribute.
MStatus | setDefault (int def1)
| Set a new default value for this integral attribute.
MStatus | setDefault (int def1, int def2)
| Set a new default value for the integral attributes of the two children of this attribute.
MStatus | setDefault (int def1, int def2, int def3)
| Set a new default value for the integral attributes of the three children of this attribute.
MStatus | setDefault (float def1)
| Set a new default value for this float attribute.
MStatus | setDefault (float def1, float def2)
| Set a new default value for the float attributes of the two children of this attribute.
MStatus | setDefault (float def1, float def2, float def3)
| Set a new default value for the float attributes of the three children of this attribute.
MStatus | setDefault (double def1)
| Set a new default value for this double attribute.
MStatus | setDefault (double def1, double def2)
| Set a new default value for the double attributes of the two children of this attribute.
MStatus | setDefault (double def1, double def2, double def3)
| Set a new default value for the double attributes of the three children of this attribute.
MStatus | setDefault (double def1, double def2, double def3, double def4)
| Set a new default value for the double attributes of the four children of this attribute.
MStatus | setDefault (void *def1)
| Set a new default value for this address attribute.
| MFnNumericAttribute (const MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
## Protected Member Functions
virtual const char * | className () const
| Class name.

## Constructor & Destructor Documentation

MFnNumericAttribute | ( | MObject & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:

  [in] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the return status

Status Codes:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnNumericAttribute | ( | const MObject & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:

  [in] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the return status

Status Codes:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

## Member Function Documentation

MFn::Type type | ( |  | ) | const`[virtual]`

Search for all occurrences

Function set type.

Return the class type : MFn::kNumericAttribute.

Reimplemented from MFnAttribute.

const char * className | ( |  | ) | const`[protected, virtual]`

Search for all occurrences

Class name.

Return the class name : "MFnNumericAttribute".

Reimplemented from MFnAttribute.

MObject create | ( | const MString & | full,
|  | const MString & | brief,
|  | MFnNumericData::Type | unitType,
|  | double | defaultValue = `0`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Create a new numeric attribute and return it as an MObject.

If the attribute create is of a type that stores two or more values, then a compound attribute will be created. The names of child attributes will have "0", "1" and "2" appended to both the full and brief names. As well, each child will use the defaultValue parameter as its default.

The create method needs to be called on a per node basis. That means if you want to create and add the same attribute to multiple nodes, you need to call the create method for each node to get a unique MObject back. If you call create just once and add the attribute to multiple nodes, Maya will encounter a fatal error.

Parameters:

  [in] | full | the full (or long) name of the attribute
  [in] | brief | the brief (or short) name of the attribute
  [in] | unitType | an element of the MFnUnitAttribute::Type enum
  [in] | defaultValue | the default value for the new attribute
  [out] | ReturnStatus | MS::kSuccess the new attribute was created successfully MS::kFailure the new attribute was not created MS::kInvalidParameter the type parameter was invalid

Returns:
  An MObject representing the new attribute

Examples:
  anisotropicShader.cpp, arcLenNode.cpp, backfillShader.cpp, blindDataMesh.cpp, blindShortDataCmd.cpp, brickShader.cpp, buildRotationNode.cpp, cellShader.cpp, cgfxAttrDef.cpp, cgfxShaderNode.cpp, cgfxVector.cpp, checkerShader.cpp, circleNode.cpp, clearcoat.cpp, closestPointOnCurveNode.cpp, compositingShader.cpp, curvedArrowsNode.cpp, customImagePlane.cpp, cvColorNode.cpp, cvColorShader.cpp, depthShader.cpp, displacementShader.cpp, flameShader.cpp, genericAttributeNode.cpp, geometrySurfaceConstraint.cpp, GLSLShaderNode.cpp, hwAnisotropicShader_NV20.cpp, hwColorPerVertexShader.cpp, hwDecalBumpShader_NV20.cpp, hwPhongShader.cpp, hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, hwUnlitShader.cpp, interpShader.cpp, jitterNode.cpp, lambertShader.cpp, latticeNoiseNode.cpp, lavaShader.cpp, lightShader.cpp, multiCurveNode.cpp, noiseShader.cpp, particleAttrNode.cpp, phongShader.cpp, pnTrianglesNode.cpp, pointOnMeshInfoNode.cpp, pointOnSubdNode.cpp, renderAccessNode.cpp, rockingTransform.cpp, shadowMatteShader.cpp, shellNode.cpp, shiftNode.cpp, simpleSpring.cpp, sineNode.cpp, slopeShaderNode.cpp, solidCheckerShader.cpp, stringFormatNode.cpp, surfaceBumpManip.cpp, swissArmyManip.cpp, torusField.cpp, transCircleNode.cpp, volumeShader.cpp, weightListNode.cpp, and yTwistNode.cpp.

MObject createColor | ( | const MString & | full,
|  | const MString & | brief,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Create a new color attribute and return it as an MObject.

The names of child attributes will have "r", "g" and "b" appended to both the full and brief names.

The create method needs to be called on a per node basis. That means if you want to create and add the same attribute to multiple nodes, you need to call the create method for each node to get a unique MObject back. If you call create just once and add the attribute to multiple nodes, Maya will encounter a fatal error.

Parameters:

  [in] | full | the full (or long) name of the attribute
  [in] | brief | the brief (or short) name of the attribute
  [out] | ReturnStatus | MS::kSuccess the new attribute was created successfully MS::kFailure the new attribute was not created MS::kInvalidParameter the type parameter was invalid

Returns:
  An MObject representing the new attribute

Examples:
  anisotropicShader.cpp, backfillShader.cpp, brickShader.cpp, cellShader.cpp, checkerShader.cpp, compositingShader.cpp, contrastShader.cpp, curvedArrowsNode.cpp, cvColorShader.cpp, depthShader.cpp, displacementShader.cpp, flameShader.cpp, gammaShader.cpp, geomShader.cpp, GLSLShaderNode.cpp, hwColorPerVertexShader.cpp, hwPhongShader.cpp, interpShader.cpp, lavaShader.cpp, lightShader.cpp, mixtureShader.cpp, noiseShader.cpp, phongShader.cpp, renderAccessNode.cpp, shadowMatteShader.cpp, shiftNode.cpp, slopeShaderNode.cpp, solidCheckerShader.cpp, and volumeShader.cpp.

MObject createPoint | ( | const MString & | full,
|  | const MString & | brief,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Create a new point attribute and return it as an MObject.

The names of child attributes will have "x", "y" and "z" appended to both the full and brief names.

The create method needs to be called on a per node basis. That means if you want to create and add the same attribute to multiple nodes, you need to call the create method for each node to get a unique MObject back. If you call create just once and add the attribute to multiple nodes, Maya will encounter a fatal error.

Parameters:

  [in] | full | the full (or long) name of the attribute
  [in] | brief | the brief (or short) name of the attribute
  [out] | ReturnStatus | MS::kSuccess the new attribute was created successfully MS::kFailure the new attribute was not created MS::kInvalidParameter the type parameter was invalid

Returns:
  An MObject representing the new attribute

Examples:
  anisotropicShader.cpp, backfillShader.cpp, cellShader.cpp, cvColorShader.cpp, depthShader.cpp, dynExprField.cpp, flameShader.cpp, gammaShader.cpp, geomShader.cpp, hwPhongShader.cpp, interpShader.cpp, lavaShader.cpp, lightShader.cpp, noiseShader.cpp, phongShader.cpp, renderAccessNode.cpp, shadowMatteShader.cpp, shiftNode.cpp, slopeShaderNode.cpp, solidCheckerShader.cpp, and volumeShader.cpp.

MObject createAddr | ( | const MString & | full,
|  | const MString & | brief,
|  | void * | defaultValue = `NULL`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Create a new address attribute and return it as an MObject.

The create method needs to be called on a per node basis. That means if you want to create and add the same attribute to multiple nodes, you need to call the create method for each node to get a unique MObject back. If you call create just once and add the attribute to multiple nodes, Maya will encounter a fatal error.

Parameters:

  [in] | full | the full (or long) name of the attribute
  [in] | brief | the brief (or short) name of the attribute
  [in] | defaultValue | the default value for the new attribute
  [out] | ReturnStatus | MS::kSuccess the new attribute was created successfully MS::kFailure the new attribute was not created MS::kInvalidParameter the type parameter was invalid

Returns:
  An MObject representing the new attribute

Examples:
  anisotropicShader.cpp, backfillShader.cpp, cvColorShader.cpp, lambertShader.cpp, lightShader.cpp, phongShader.cpp, and shadowMatteShader.cpp.

MObject create | ( | const MString & | full,
|  | const MString & | brief,
|  | const MObject & | child1,
|  | const MObject & | child2,
|  | const MObject & | child3 = `MObject::kNullObj`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Create a new numeric attribute and return it as an MObject.

This form of the create method allows the creation of a compound attribute having two or three numeric child attributes. All of the child attributes must be of the same type (eg all of type kDouble) and must already have been created but not yet added to the node.

It is also possible to use angle and distance attributes created with MFnUnitAttribute. These attributes will act the same as a double attribute.

Parameters:

  [in] | full | the full (or long) name of the attribute
  [in] | brief | the brief (or short) name of the attribute
  [in] | child1 | a numeric attribute
  [in] | child2 | a numeric attribute
  [in] | child3 | a numeric attribute (optional)
  [out] | ReturnStatus | MS::kSuccess the new attribute was created successfully MS::kFailure the new attribute was not created MS::kInvalidParameter the given child objects were not all numeric attributes or one or more of them has already been added to the node

Returns:
  An MObject representing the new attribute

MFnNumericData::Type unitType | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the unit type of this attribute.

Parameters:

  [out] | ReturnStatus | MS::kSuccess the operation succeeded MS::kObjectDoesNotExist this instance is not bound to an MObject

Returns:
  An element of the MFnNumericData::Type enum

Examples:
  cgfxAttrDef.cpp.

MObject child | ( | unsigned int | index,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Return the indicated child attribute as an MObject.

No index checking is done by this routine, so you must ensure that the index provided is valid.

Parameters:

  [in] | index | the full (or long) name of the attribute
  [out] | ReturnStatus | MS::kSuccess the operation was successful MS::kFailure the attribute is not a compound attribute MS::kObjectDoesNotExist the attribute is not bound to an MObject

Returns:
  An MObject representing the child attribute

bool hasMin | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determine whether or not this attribute has a minimum value set.

Parameters:

  [out] | ReturnStatus | MS::kSuccess the operation succeeded MS::kObjectDoesNotExist this instance is not bound to an MObject

Returns:
  true if the attribute has a minimum value, and false otherwise

Examples:
  cgfxAttrDef.cpp.

bool hasMax | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determine whether or not this attribute has a maximum value set.

Parameters:

  [out] | ReturnStatus | MS::kSuccess the operation succeeded MS::kObjectDoesNotExist this instance is not bound to an MObject

Returns:
  true if the attribute has a maximum value, and false otherwise

Examples:
  cgfxAttrDef.cpp.

bool hasSoftMin | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determine whether or not this double attribute has a soft minimum value set.

Parameters:

  [out] | ReturnStatus | MS::kSuccess the operation succeeded MS::kObjectDoesNotExist this instance is not bound to an MObject

Returns:
  true if the attribute has a soft minimum value, and false otherwise

Examples:
  cgfxAttrDef.cpp.

bool hasSoftMax | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determine whether or not this double attribute has a soft maximum value set.

Parameters:

  [out] | ReturnStatus | MS::kSuccess the operation succeeded MS::kObjectDoesNotExist this instance is not bound to an MObject

Returns:
  true if the attribute has a soft maximum value, and false otherwise

Examples:
  cgfxAttrDef.cpp.

MStatus getMin | ( | double & | min | ) | const

Search for all occurrences

Return the minimum value for this double attribute.

Parameters:

  [out] | min | the minimum value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kFailure the attribute does not have a minimum
  - MS::kObjectDoesNotExist this instance is not bound to an MObject

Examples:
  cgfxAttrDef.cpp.

MStatus getMin | ( | double & | min1,
|  | double & | min2
| ) |  | const

Search for all occurrences

Return the minimum values for the two children (both double attributes) of this compound attribute.

Parameters:

  [out] | min1 | the minimum value for the first child attribute
  [out] | min2 | the minimum value for the second child attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kFailure the attribute does not have a minimum
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or the attribute is not a compound attribute.

MStatus getMin | ( | double & | min1,
|  | double & | min2,
|  | double & | min3
| ) |  | const

Search for all occurrences

Return the minimum values for the three children (all double attributes) of this compound attribute.

Parameters:

  [out] | min1 | the minimum value for the first child attribute
  [out] | min2 | the minimum value for the second child attribute
  [out] | min3 | the minimum value for the third child attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kFailure the attribute does not have a minimum
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or the attribute is not a compound attribute.

MStatus getMax | ( | double & | max | ) | const

Search for all occurrences

Return the maximum value for this double attribute.

Parameters:

  [out] | max | the maximum value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kFailure the attribute does not have a maximum
  - MS::kObjectDoesNotExist this instance is not bound to an MObject

Examples:
  cgfxAttrDef.cpp.

MStatus getMax | ( | double & | max1,
|  | double & | max2
| ) |  | const

Search for all occurrences

Return the maximum values for the two children (both double attributes) of this compound attribute.

Parameters:

  [out] | max1 | the maximum value for the first child attribute
  [out] | max2 | the maximum value for the second child attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kFailure the attribute does not have a maximum
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or the attribute is not a compound attribute.

MStatus getMax | ( | double & | max1,
|  | double & | max2,
|  | double & | max3
| ) |  | const

Search for all occurrences

Return the maximum values for the three children (all double attributes) of this compound attribute.

Parameters:

  [out] | max1 | the maximum value for the first child attribute
  [out] | max2 | the maximum value for the second child attribute
  [out] | max3 | the maximum value for the third child attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kFailure the attribute does not have a maximum
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or the attribute is not a compound attribute.

MStatus getSoftMin | ( | double & | min | ) | const

Search for all occurrences

Return the minimum value for this double attribute.

Parameters:

  [out] | min | the minimum value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kFailure the attribute does not have a minimum
  - MS::kObjectDoesNotExist this instance is not bound to an MObject

Examples:
  cgfxAttrDef.cpp.

MStatus getSoftMax | ( | double & | max | ) | const

Search for all occurrences

Return the maximum value for this double attribute.

Parameters:

  [out] | max | the soft maximum value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kFailure the attribute does not have a maximum
  - MS::kObjectDoesNotExist this instance is not bound to an MObject

Examples:
  cgfxAttrDef.cpp.

MStatus setMin | ( | double | min | ) |

Search for all occurrences

Set the minimum value for this double attribute.

Parameters:

  [in] | min | the minimum value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or this instance is not a numeric attribute

Examples:
  anisotropicShader.cpp, backfillShader.cpp, cgfxAttrDef.cpp, checkerShader.cpp, compositingShader.cpp, customImagePlane.cpp, depthShader.cpp, flameShader.cpp, geometrySurfaceConstraint.cpp, GLSLShaderNode.cpp, hwAnisotropicShader_NV20.cpp, hwDecalBumpShader_NV20.cpp, hwPhongShader.cpp, hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, interpShader.cpp, lavaShader.cpp, phongShader.cpp, pnTrianglesNode.cpp, pointOnMeshInfoNode.cpp, renderAccessNode.cpp, slopeShaderNode.cpp, solidCheckerShader.cpp, and volumeShader.cpp.

MStatus setMin | ( | double | min1,
|  | double | min2
| ) |  |

Search for all occurrences

Set the minimum values for the two children (both double attributes) of this compound attribute.

Parameters:

  [in] | min1 | the minimum value for the first child attribute
  [in] | min2 | the minimum value for the second child attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or the attribute is not a compound attribute.

MStatus setMin | ( | double | min1,
|  | double | min2,
|  | double | min3
| ) |  |

Search for all occurrences

Set the minimum values for the three children (all double attributes) of this compound attribute.

Parameters:

  [in] | min1 | the minimum value for the first child attribute
  [in] | min2 | the minimum value for the second child attribute
  [in] | min3 | the minimum value for the third child attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or the attribute is not a compound attribute.

MStatus setMax | ( | double | max | ) |

Search for all occurrences

Set the maximum value for this double attribute.

Parameters:

  [in] | max | the maximum value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or this instance is not a numeric attribute

Examples:
  anisotropicShader.cpp, backfillShader.cpp, cgfxAttrDef.cpp, checkerShader.cpp, compositingShader.cpp, customImagePlane.cpp, flameShader.cpp, GLSLShaderNode.cpp, hwAnisotropicShader_NV20.cpp, hwDecalBumpShader_NV20.cpp, hwPhongShader.cpp, hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, interpShader.cpp, lavaShader.cpp, phongShader.cpp, pnTrianglesNode.cpp, slopeShaderNode.cpp, solidCheckerShader.cpp, and volumeShader.cpp.

MStatus setMax | ( | double | max1,
|  | double | max2
| ) |  |

Search for all occurrences

Set the maximum values for the two children (both double attributes) of this compound attribute.

Parameters:

  [in] | max1 | the maximum value for the first child attribute
  [in] | max2 | the maximum value for the second child attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or the attribute is not a compound attribute.

MStatus setMax | ( | double | max1,
|  | double | max2,
|  | double | max3
| ) |  |

Search for all occurrences

Set the maximum values for the three children (all double attributes) of this compound attribute.

Parameters:

  [in] | max1 | the maximum value for the first child attribute
  [in] | max2 | the maximum value for the second child attribute
  [in] | max3 | the maximum value for the third child attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or the attribute is not a compound attribute.

MStatus setSoftMin | ( | double | min | ) |

Search for all occurrences

Set the soft minimum value for this double attribute.

Parameters:

  [in] | min | the minimum value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or this instance is not a numeric attribute

Examples:
  cgfxAttrDef.cpp, clearcoat.cpp, hwColorPerVertexShader.cpp, and pointOnSubdNode.cpp.

MStatus setSoftMax | ( | double | max | ) |

Search for all occurrences

Set the soft maximum value for this double attribute.

Parameters:

  [in] | max | the soft maximum value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this instance is not bound to an MObject, or this instance is not a numeric attribute

Examples:
  cgfxAttrDef.cpp, clearcoat.cpp, depthShader.cpp, hwColorPerVertexShader.cpp, pointOnSubdNode.cpp, and volumeShader.cpp.

MStatus getDefault | ( | bool & | def1 | ) |

Search for all occurrences

Get the default value for this boolean attribute.

Parameters:

  [out] | def1 | returns the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a boolean attribute

MStatus getDefault | ( | char & | def1 | ) |

Search for all occurrences

Get the default value for this character attribute.

Parameters:

  [out] | def1 | returns the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a char attribute

MStatus getDefault | ( | int & | def1 | ) |

Search for all occurrences

Gets the default value for this integral attribute.

This method is used to get default values for attributes of type byte, short or int.

Parameters:

  [out] | def1 | returns the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a byte, short or int attribute

MStatus getDefault | ( | int & | def1,
|  | int & | def2
| ) |  |

Search for all occurrences

Gets the default value for the integral attributes of the two children of this attribute.

This method is used to query the default values for attributes of type byte, short or int.

Parameters:

  [out] | def1 | returns the default value for first child of this attribute
  [out] | def2 | returns the default value for second child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a short or int attribute
  - MS::kNotFound the attribute did not have exactly two children

MStatus getDefault | ( | int & | def1,
|  | int & | def2,
|  | int & | def3
| ) |  |

Search for all occurrences

Gets the default value for the integral attributes of the three children of this attribute.

This method is used to get the default values for attributes of type byte, short or int.

Parameters:

  [out] | def1 | returns the default value for first child of this attribute
  [out] | def2 | returns the default value for second child of this attribute
  [out] | def3 | returns the default value for third child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a short or int attribute

MStatus getDefault | ( | float & | def1 | ) |

Search for all occurrences

Gets the default value for this float attribute.

Parameters:

  [out] | def1 | returns the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a float attribute

MStatus getDefault | ( | float & | def1,
|  | float & | def2
| ) |  |

Search for all occurrences

Gets the default value for the float attributes of the two children of this attribute.

Parameters:

  [out] | def1 | returns the default value for first child of this attribute
  [out] | def2 | returns the default value for second child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a float attribute

MStatus getDefault | ( | float & | def1,
|  | float & | def2,
|  | float & | def3
| ) |  |

Search for all occurrences

Gets the default value for the float attributes of the three children of this attribute.

Parameters:

  [out] | def1 | returns the default value for first child of this attribute
  [out] | def2 | returns the default value for second child of this attribute
  [out] | def3 | returns the default value for third child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a float attribute

MStatus getDefault | ( | double & | def1 | ) |

Search for all occurrences

Get the default value for this double attribute.

Parameters:

  [out] | def1 | returns the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a double attribute

MStatus getDefault | ( | double & | def1,
|  | double & | def2
| ) |  |

Search for all occurrences

Gets the default value for the double attributes of the two children of this attribute.

Parameters:

  [out] | def1 | returns the default value for first child of this attribute
  [out] | def2 | returns the default value for second child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a double attribute

MStatus getDefault | ( | double & | def1,
|  | double & | def2,
|  | double & | def3
| ) |  |

Search for all occurrences

Gets the default value for the double attributes of the three children of this attribute.

Parameters:

  [out] | def1 | returns the default value for first child of this attribute
  [out] | def2 | returns the default value for second child of this attribute
  [out] | def3 | returns the default value for third child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a double attribute

MStatus getDefault | ( | double & | def1,
|  | double & | def2,
|  | double & | def3,
|  | double & | def4
| ) |  |

Search for all occurrences

Gets the default value for the double attributes of the four children of this attribute.

Parameters:

  [out] | def1 | returns the default value for first child of this attribute
  [out] | def2 | returns the default value for second child of this attribute
  [out] | def3 | returns the default value for third child of this attribute
  [out] | def4 | returns the default value for fourth child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a double attribute

MStatus getDefault | ( | void *& | def1 | ) |

Search for all occurrences

Get the default value for this address attribute.

Parameters:

  [out] | def1 | returns the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a boolean attribute

MStatus setDefault | ( | bool | def1 | ) |

Search for all occurrences

Set a new default value for this boolean attribute.

Parameters:

  [in] | def1 | new the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a boolean attribute

Examples:
  anisotropicShader.cpp, backfillShader.cpp, brickShader.cpp, buildRotationNode.cpp, cellShader.cpp, cgfxVector.cpp, checkerShader.cpp, clearcoat.cpp, compositingShader.cpp, contrastShader.cpp, curvedArrowsNode.cpp, customImagePlane.cpp, cvColorShader.cpp, depthShader.cpp, displacementShader.cpp, dynExprField.cpp, flameShader.cpp, gammaShader.cpp, geomShader.cpp, GLSLShaderNode.cpp, hwAnisotropicShader_NV20.cpp, hwColorPerVertexShader.cpp, hwDecalBumpShader_NV20.cpp, hwPhongShader.cpp, hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, hwUnlitShader.cpp, interpShader.cpp, lambertShader.cpp, lavaShader.cpp, lightShader.cpp, mixtureShader.cpp, noiseShader.cpp, phongShader.cpp, pnTrianglesNode.cpp, shadowMatteShader.cpp, shellNode.cpp, simpleSpring.cpp, slopeShaderNode.cpp, solidCheckerShader.cpp, torusField.cpp, transCircleNode.cpp, volumeShader.cpp, and yTwistNode.cpp.

MStatus setDefault | ( | char | def1 | ) |

Search for all occurrences

Set a new default value for this character attribute.

Parameters:

  [in] | def1 | new the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a char attribute

MStatus setDefault | ( | int | def1 | ) |

Search for all occurrences

Set a new default value for this integral attribute.

This method is used to set default values for byte, short or int attributes.

Parameters:

  [in] | def1 | new the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a byte, short or int attribute

MStatus setDefault | ( | int | def1,
|  | int | def2
| ) |  |

Search for all occurrences

Set a new default value for the integral attributes of the two children of this attribute.

This method is used to set default values for byte, short or int attributes.

Parameters:

  [in] | def1 | new the default value for first child of this attribute
  [in] | def2 | new the default value for second child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a short or int attribute

MStatus setDefault | ( | int | def1,
|  | int | def2,
|  | int | def3
| ) |  |

Search for all occurrences

Set a new default value for the integral attributes of the three children of this attribute.

This method is used to set default values for byte, short or int attributes.

Parameters:

  [in] | def1 | new the default value for first child of this attribute
  [in] | def2 | new the default value for second child of this attribute
  [in] | def3 | new the default value for third child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a short or int attribute

MStatus setDefault | ( | float | def1 | ) |

Search for all occurrences

Set a new default value for this float attribute.

Parameters:

  [in] | def1 | new the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a float attribute

MStatus setDefault | ( | float | def1,
|  | float | def2
| ) |  |

Search for all occurrences

Set a new default value for the float attributes of the two children of this attribute.

Parameters:

  [in] | def1 | new the default value for first child of this attribute
  [in] | def2 | new the default value for second child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a float attribute

MStatus setDefault | ( | float | def1,
|  | float | def2,
|  | float | def3
| ) |  |

Search for all occurrences

Set a new default value for the float attributes of the three children of this attribute.

Parameters:

  [in] | def1 | new the default value for first child of this attribute
  [in] | def2 | new the default value for second child of this attribute
  [in] | def3 | new the default value for third child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a float attribute

MStatus setDefault | ( | double | def1 | ) |

Search for all occurrences

Set a new default value for this double attribute.

Parameters:

  [in] | def1 | new the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a double attribute

MStatus setDefault | ( | double | def1,
|  | double | def2
| ) |  |

Search for all occurrences

Set a new default value for the double attributes of the two children of this attribute.

Parameters:

  [in] | def1 | new the default value for first child of this attribute
  [in] | def2 | new the default value for second child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a double attribute

MStatus setDefault | ( | double | def1,
|  | double | def2,
|  | double | def3
| ) |  |

Search for all occurrences

Set a new default value for the double attributes of the three children of this attribute.

Parameters:

  [in] | def1 | new the default value for first child of this attribute
  [in] | def2 | new the default value for second child of this attribute
  [in] | def3 | new the default value for third child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a double attribute

MStatus setDefault | ( | double | def1,
|  | double | def2,
|  | double | def3,
|  | double | def4
| ) |  |

Search for all occurrences

Set a new default value for the double attributes of the four children of this attribute.

Parameters:

  [in] | def1 | new the default value for first child of this attribute
  [in] | def2 | new the default value for second child of this attribute
  [in] | def3 | new the default value for third child of this attribute
  [in] | def4 | new the default value for fourth child of this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a double attribute

MStatus setDefault | ( | void * | def1 | ) |

Search for all occurrences

Set a new default value for this address attribute.

Parameters:

  [in] | def1 | new the default value for this attribute

Returns:
  - MS::kSuccess the operation succeeded
  - MS::kObjectDoesNotExist this attribute is not bound to an MObject
  - MS::kInvalidParameter this attribute is not a boolean attribute

MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute
MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute MFnNumericAttribute