C++ API Reference

Unit attribute Function set. More...

#include <MFnUnitAttribute.h>

+ Inheritance diagram for MFnUnitAttribute:

Public Types

enum  Type {
  kInvalid, kAngle, kDistance, kTime,
  kLast
}
 Type of unit represented by attribute values. More...
 
- Public Types inherited from MFnAttribute
enum  DisconnectBehavior { kDelete, kReset, kNothing }
 Attribute behaviour on disconnect. More...
 

Public Member Functions

virtual MFn::Type type () const
 Function set type. More...
 
virtual ~MFnUnitAttribute ()
 Destructor.
 
 MFnUnitAttribute ()
 Default constructor.
 
 MFnUnitAttribute (MObject &object, MStatus *ReturnStatus=NULL)
 Constructor. More...
 
MObject create (const MString &fullName, const MString &briefName, MFnUnitAttribute::Type unitType, double defaultValue=0.0, MStatus *ReturnStatus=NULL)
 Create a new unit attribute and return it as an MObject. More...
 
MObject create (const MString &fullName, const MString &briefName, const MTime &defaultValue, MStatus *ReturnStatus=NULL)
 Create a new unit attribute of type time and return it as an MObject. More...
 
MObject create (const MString &fullName, const MString &briefName, const MAngle &defaultValue, MStatus *ReturnStatus=NULL)
 Create a new unit attribute of type angle and return it as an MObject. More...
 
MObject create (const MString &fullName, const MString &briefName, const MDistance &defaultValue, MStatus *ReturnStatus=NULL)
 Create a new unit attribute of type distance and return it as an MObject. More...
 
MFnUnitAttribute::Type unitType (MStatus *ReturnStatus=NULL) const
 Return the unit type of this attribute. More...
 
bool hasMin (MStatus *ReturnStatus=NULL) const
 Determine whether or not this attribute has a minimum value set. More...
 
bool hasMax (MStatus *ReturnStatus=NULL) const
 Determine whether or not this attribute has a maximum value set. More...
 
bool hasSoftMin (MStatus *ReturnStatus=NULL) const
 Determine whether or not this attribute has a soft minimum value set. More...
 
bool hasSoftMax (MStatus *ReturnStatus=NULL) const
 Determine whether or not this attribute has a soft maximum value set. More...
 
MStatus getMin (double &minValue) const
 Return the minimum value for this attribute. More...
 
MStatus getMin (MTime &minValue) const
 Return the minimum value for this attribute. More...
 
MStatus getMin (MAngle &minValue) const
 Return the minimum value for this attribute. More...
 
MStatus getMin (MDistance &minValue) const
 Return the minimum value for this attribute. More...
 
MStatus getMax (double &maxValue) const
 Return the maximum value for this attribute. More...
 
MStatus getMax (MTime &maxValue) const
 Return the maximum value for this attribute. More...
 
MStatus getMax (MAngle &maxValue) const
 Return the maximum value for this attribute. More...
 
MStatus getMax (MDistance &maxValue) const
 Return the maximum value for this attribute. More...
 
MStatus getSoftMin (double &minValue) const
 Return the soft minimum value for this attribute. More...
 
MStatus getSoftMin (MTime &minValue) const
 Return the soft minimum value for this attribute. More...
 
MStatus getSoftMin (MAngle &minValue) const
 Return the soft minimum value for this attribute. More...
 
MStatus getSoftMin (MDistance &minValue) const
 Return the soft minimum value for this attribute. More...
 
MStatus getSoftMax (double &maxValue) const
 Return the soft maximum value for this attribute. More...
 
MStatus getSoftMax (MTime &maxValue) const
 Return the soft maximum value for this attribute. More...
 
MStatus getSoftMax (MAngle &maxValue) const
 Return the soft maximum value for this attribute. More...
 
MStatus getSoftMax (MDistance &maxValue) const
 Return the soft maximum value for this attribute. More...
 
MStatus setMin (double minValue)
 Set the minimum value for this attribute. More...
 
MStatus setMin (const MTime &minValue)
 Set the minimum value for this attribute. More...
 
MStatus setMin (const MAngle &minValue)
 Set the minimum value for this attribute. More...
 
MStatus setMin (const MDistance &minValue)
 Set the minimum value for this attribute. More...
 
MStatus setMax (double maxValue)
 Set the maximum value for this attribute. More...
 
MStatus setMax (const MTime &maxValue)
 Set the maximum value for this attribute. More...
 
MStatus setMax (const MAngle &maxValue)
 Set the maximum value for this attribute. More...
 
MStatus setMax (const MDistance &maxValue)
 Set the maximum value for this attribute. More...
 
MStatus setSoftMin (double minValue)
 Set the soft minimum value for this attribute. More...
 
MStatus setSoftMin (const MTime &minValue)
 Set the soft minimum value for this attribute. More...
 
MStatus setSoftMin (const MAngle &minValue)
 Set the soft minimum value for this attribute. More...
 
MStatus setSoftMin (const MDistance &minValue)
 Set the soft minimum value for this attribute. More...
 
MStatus setSoftMax (double maxValue)
 Set the soft maximum value for this attribute. More...
 
MStatus setSoftMax (const MTime &maxValue)
 Set the soft maximum value for this attribute. More...
 
MStatus setSoftMax (const MAngle &maxValue)
 Set the soft maximum value for this attribute. More...
 
MStatus setSoftMax (const MDistance &maxValue)
 Set the soft maximum value for this attribute. More...
 
MStatus getDefault (double &defaultValue)
 Gets the default value for this attribute. More...
 
MStatus getDefault (MTime &defaultValue)
 Gets the default value for a time attribute. More...
 
MStatus getDefault (MAngle &defaultValue)
 Gets the default value for this attribute. More...
 
MStatus getDefault (MDistance &defaultValue)
 Gets the default value for this attribute. More...
 
MStatus setDefault (double defaultValue)
 Set a new default value for this attribute. More...
 
MStatus setDefault (const MTime &defaultValue)
 Set a new default value for a time attribute. More...
 
MStatus setDefault (const MAngle &defaultValue)
 Set a new default value for this attribute. More...
 
MStatus setDefault (const MDistance &defaultValue)
 Set a new default value for this attribute. More...
 
 MFnUnitAttribute (const MObject &object, MStatus *ReturnStatus=NULL)
 Constructor. More...
 
- Public Member Functions inherited from MFnAttribute
virtual ~MFnAttribute ()
 Destructor.
 
 MFnAttribute ()
 Default constructor.
 
 MFnAttribute (MObject &object, MStatus *ReturnStatus=NULL)
 Constructor. More...
 
bool isReadable (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is readable. More...
 
bool isWritable (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is writable. More...
 
bool isConnectable (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute accepts dependency graph connections. More...
 
bool isStorable (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is to be stored when the node is saved to a file. More...
 
bool isCached (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is cached locally in the node's data block. More...
 
bool isArray (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute supports an array of data. More...
 
bool indexMatters (MStatus *ReturnStatus=NULL) const
 Determines whether the user must specify an index when connecting to this attribute, or whether the next available index can be used. More...
 
bool isKeyable (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is keyable. More...
 
bool isChannelBoxFlagSet (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute has its channel box flag set. More...
 
bool isHidden (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is to hidden from the UI. More...
 
bool isUsedAsColor (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is to be presented as a color in the UI. More...
 
bool isIndeterminant (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is indeterminant. More...
 
bool isRenderSource (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is a render source. More...
 
bool isDynamic (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is a dynamic attribute. More...
 
bool isExtension (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is an extension attribute. More...
 
bool isWorldSpace (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is worldspace. More...
 
bool isAffectsWorldSpace (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute affects worldspace. More...
 
bool isUsedAsFilename (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is to be used as a filename. More...
 
bool affectsAppearance (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute affects the appearance of the object when rendering in the viewport. More...
 
bool isProxyAttribute (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute is a proxy attribute. More...
 
DisconnectBehavior disconnectBehavior (MStatus *ReturnStatus=NULL) const
 Returns the behavior of this attribute when it is disconnected. More...
 
bool usesArrayDataBuilder (MStatus *ReturnStatus=NULL) const
 Returns true if this attribute uses an array data builder. More...
 
bool internal (MStatus *ReturnStatus=NULL) const
 Returns true if a node has internal member data representing this attribute. More...
 
MStatus setReadable (bool state)
 Sets whether this attribute should be readable. More...
 
MStatus setWritable (bool state)
 Sets whether this attribute should be writable. More...
 
MStatus setConnectable (bool state)
 Sets whether this attribute should allow dependency graph connections. More...
 
MStatus setStorable (bool state)
 Sets whether this attribute should be storable. More...
 
MStatus setCached (bool state)
 Sets whether the data for this attribute is cached locally in the node's data block. More...
 
MStatus setArray (bool state)
 Sets whether this attribute should have an array of data. More...
 
MStatus setIndexMatters (bool state)
 If the attribute is an array, then this method specifies whether to force the user to specify an index when connecting to this attribute, or to use the next available index. More...
 
MStatus setKeyable (bool state)
 Sets whether this attribute should accept keyframe data. More...
 
MStatus setChannelBox (bool state)
 Sets whether this attribute should appear in the channel box when the node is selected. More...
 
MStatus setHidden (bool state)
 Sets whether this attribute should be hidden from the UI. More...
 
MStatus setUsedAsColor (bool state)
 Sets whether this attribute should be presented as a color in the UI. More...
 
MStatus setIndeterminant (bool state)
 Sets whether this attribute is indeterminant. More...
 
MStatus setRenderSource (bool state)
 Sets whether this attribute should be used as a render source attribute. More...
 
MStatus setWorldSpace (bool state)
 Sets whether this attribute should be treated as worldspace. More...
 
MStatus setAffectsWorldSpace (bool state)
 Sets whether this attribute should affect worldspace. More...
 
MStatus setUsedAsFilename (bool state)
 Sets whether this attribute should be presented as a filename in the UI. More...
 
MStatus setAffectsAppearance (bool state)
 Sets whether this attribute affects the appearance of the object when rendering in the viewport. More...
 
MStatus setProxyAttribute (bool state)
 Sets whether this attribute is a proxy attribute. More...
 
MStatus setDisconnectBehavior (DisconnectBehavior behavior)
 Sets the disconnection behavior for this attribute. More...
 
MStatus setUsesArrayDataBuilder (bool state)
 Sets whether this attribute uses an array data builder. More...
 
MStatus setInternal (bool state)
 The function controls an attribute's data storage. More...
 
MStatus setNiceNameOverride (const MString &localizedName)
 Sets the localized string which should be used for this attribute in the UI. More...
 
bool acceptsAttribute (const MFnAttribute &attr, MStatus *ReturnStatus=NULL) const
 Returns true if this attribute can accept a connection with the given attribute. More...
 
bool accepts (MFnData::Type type, MStatus *ReturnStatus=NULL) const
 Returns true if this attribute can accept a connection of the given type. More...
 
bool accepts (const MTypeId &id, MStatus *ReturnStatus=NULL) const
 Returns true if this attribute can accept a connection of the given type. More...
 
MObject parent (MStatus *ReturnStatus=NULL) const
 Get the parent of this attribute, if it has one. More...
 
MString name (MStatus *ReturnStatus=NULL) const
 Returns the long name of the attribute. More...
 
MString shortName (MStatus *ReturnStatus=NULL) const
 Returns the short name of the attribute. More...
 
MString getAddAttrCmd (bool useLongName=false, MStatus *status=NULL) const
 Returns a string containing the addAttr command which would be required to recreate the attribute on a node. More...
 
MStatus addToCategory (const MString &category)
 Add the attribute to the named category. More...
 
MStatus removeFromCategory (const MString &category)
 Remove the attribute from the named category. More...
 
bool hasCategory (const MString &category) const
 Check to see if the attribute belongs to the named category. More...
 
MStatus getCategories (MStringArray &ReturnStatus) const
 Get all of the categories to which this attribute belongs. More...
 
 MFnAttribute (const MObject &object, MStatus *ReturnStatus=NULL)
 NO SCRIPT SUPPORT. More...
 
- Public Member Functions inherited from MFnBase
virtual ~MFnBase ()
 Class Destructor. More...
 
bool hasObj (MFn::Type) const
 Determines whether or not the Function Set is compatible with the specified Maya Object within the API RTTI system. More...
 
bool hasObj (const MObject &) const
 Determines whether or not the Function Set is compatible with the specified Maya Object within the API RTTI system. More...
 
MObject object (MStatus *ReturnStatus=nullptr) const
 Returns the MObject that is attached to the Function Set. More...
 
virtual MStatus setObject (MObject &object)
 Attaches the Function Set to the specified Maya Object. More...
 
virtual MStatus setObject (const MObject &object)
 NO SCRIPT SUPPORT. More...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 
- Static Public Member Functions inherited from MFnAttribute
static const char * className ()
 Returns the name of this class. More...
 
- Static Public Member Functions inherited from MFnBase
static const char * className ()
 Returns the name of this class. More...
 
static const char * typeString (MFn::Type)
 Returns the type string for a given type. More...
 
static bool isValid (MFn::Type)
 Returns true if type is in the range of valid types. More...
 

Detailed Description

Unit attribute Function set.

MFnUnitAttribute is the function set for dependency nodes attributes that store one of the fundamental types of Maya data. The currently supported types are MAngle, MDistance, and MTime.

It is possible to set the defaults using a double. This is valid for angles and distances. In the case of angles, the value is assumed to be in radians, and in the case of distances, it is assumed to be in centimeters. Time values should not be set using a double.

It is possible to use unit attributes in place of double attributes when creating numeric compounds (see MFnNumericAttrbute). To create a numeric compound of three distance values, create the three child attributes using MFnUnitAttribute and then pass the children into the create method of MFnNumericAttribute.

Examples:
AbcImport/AlembicNode.cpp, animCubeNode/animCubeNode.cpp, atomImportExport/atomCachedPlugs.cpp, atomImportExport/atomFileUtils.cpp, buildRotationNode/buildRotationNode.cpp, dx11Shader/dx11ConeAngleToHotspotConverter.cpp, footPrintManip/footPrintManip.cpp, footPrintNode/footPrintNode.cpp, footPrintNode_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, footPrintNode_GeometryOverride/footPrintNode_GeometryOverride.cpp, footPrintNode_SubSceneOverride/footPrintNode_SubSceneOverride.cpp, latticeNoise/latticeNoiseNode.cpp, MayaPluginForSpreticle/spReticleLoc.cpp, rawfootPrintNode/rawfootPrintNode.cpp, shellNode/shellNode.cpp, simpleEvaluationDraw/simpleEvaluationDraw.cpp, simpleEvaluationNode/simpleEvaluationNode.cpp, simplePhysicsEngine/simplePhysicsEngine.cpp, simpleSimulationNode/simpleSimulationNode.cpp, squaresNode_noDepthTest/squaresNode_noDepthTest.cpp, swissArmyManip/swissArmyManip.cpp, testNobjectNode/testNobjectNode.cpp, testNpassiveNode/testNpassiveNode.cpp, testNsolverNode/testNsolverNode.cpp, and testNucleusNode/testNucleusNode.cpp.

Member Enumeration Documentation

enum Type

Type of unit represented by attribute values.

Enumerator
kInvalid 

Invalid unit type.

kAngle 

Angular attribute.

kDistance 

Distance (linear) attribute.

kTime 

Time attribute.

kLast 

Last value, for counting.

Constructor & Destructor Documentation

MFnUnitAttribute ( MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

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

Parameters
[in]objectThe MObject to attach the function set to
[out]ReturnStatusthe 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
MFnUnitAttribute ( const MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

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

Parameters
[in]objectThe MObject to attach the function set to
[out]ReturnStatusthe 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

Function set type.

Return the class type : MFn::kUnitAttribute.

Returns
the class type.

Reimplemented from MFnAttribute.

OPENMAYA_MAJOR_NAMESPACE_OPEN const char * className ( )
static

Returns the name of this class.

Return the class name : "MFnUnitAttribute".

Returns
Name of this class.
MObject create ( const MString full,
const MString brief,
MFnUnitAttribute::Type  unitType,
double  defaultValue = 0.0,
MStatus ReturnStatus = NULL 
)

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

For both angle and distance attributes, the attribute is type independent. For example, you define an angular attribute as containing an angle in radians. The defaultValue passed to the create method must be in these units, and the value in those units will be returned by the get and set methods. If this method is used to instantiate a time attribute, the units stored in the attribute will be those of the current default time unit (see MTime).

A unit attribute supports both a hard maximum/minimum and a soft maximum/minimum. The soft maximum/minimum are used by the user interface for limits on sliders, but values within the hard range are still valid.

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]fullthe full (or int) name of the attribute
[in]briefthe brief (or short) name of the attribute
[in]unitTypean element of the MFnUnitAttribute::Type enum
[in]defaultValuethe 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:
AbcImport/AlembicNode.cpp, animCubeNode/animCubeNode.cpp, buildRotationNode/buildRotationNode.cpp, dx11Shader/dx11ConeAngleToHotspotConverter.cpp, footPrintManip/footPrintManip.cpp, footPrintNode/footPrintNode.cpp, footPrintNode_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, footPrintNode_GeometryOverride/footPrintNode_GeometryOverride.cpp, footPrintNode_SubSceneOverride/footPrintNode_SubSceneOverride.cpp, latticeNoise/latticeNoiseNode.cpp, MayaPluginForSpreticle/spReticleLoc.cpp, rawfootPrintNode/rawfootPrintNode.cpp, shellNode/shellNode.cpp, simpleEvaluationDraw/simpleEvaluationDraw.cpp, simpleEvaluationNode/simpleEvaluationNode.cpp, simplePhysicsEngine/simplePhysicsEngine.cpp, simpleSimulationNode/simpleSimulationNode.cpp, squaresNode_noDepthTest/squaresNode_noDepthTest.cpp, swissArmyManip/swissArmyManip.cpp, testNobjectNode/testNobjectNode.cpp, testNpassiveNode/testNpassiveNode.cpp, testNsolverNode/testNsolverNode.cpp, and testNucleusNode/testNucleusNode.cpp.
MObject create ( const MString full,
const MString brief,
const MTime defaultValue,
MStatus ReturnStatus = NULL 
)

Create a new unit attribute of type time and return it as an MObject.

The units of the time value stored in the attribute will be those of the current default time units in effect (see MTime).

Parameters
[in]fullthe full (or int) name of the attribute
[in]briefthe brief (or short) name of the attribute
[in]defaultValuethe default value for the new attribute
[out]ReturnStatus
  • MS::kSuccess the new attribute was created successfully
  • MS::kFailure the new attribute was not created
Returns
An MObject representing the new attribute
MObject create ( const MString full,
const MString brief,
const MAngle defaultValue,
MStatus ReturnStatus = NULL 
)

Create a new unit attribute of type angle and return it as an MObject.

Parameters
[in]fullthe full (or int) name of the attribute
[in]briefthe brief (or short) name of the attribute
[in]defaultValuethe default value for the new attribute
[out]ReturnStatus
  • MS::kSuccess the new attribute was created successfully
  • MS::kFailure the new attribute was not created
Returns
An MObject representing the new attribute
MObject create ( const MString full,
const MString brief,
const MDistance defaultValue,
MStatus ReturnStatus = NULL 
)

Create a new unit attribute of type distance and return it as an MObject.

Parameters
[in]fullthe full (or int) name of the attribute
[in]briefthe brief (or short) name of the attribute
[in]defaultValuethe default value for the new attribute
[out]ReturnStatus
  • MS::kSuccess the new attribute was created successfully
  • MS::kFailure the new attribute was not created
Returns
An MObject representing the new attribute
MFnUnitAttribute::Type unitType ( MStatus ReturnStatus = NULL) const

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 MFnUnitAttribute::Type enum
bool hasMin ( MStatus ReturnStatus = NULL) const

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
bool hasMax ( MStatus ReturnStatus = NULL) const

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
bool hasSoftMin ( MStatus ReturnStatus = NULL) const

Determine whether or not this 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 minimum value, and false otherwise
bool hasSoftMax ( MStatus ReturnStatus = NULL) const

Determine whether or not this 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 maximum value, and false otherwise
MStatus getMin ( double &  minValue) const

Return the minimum value for this attribute.

This routine simply returns the numerical value of the attribute. It is up to the programmer to know the units used by this attribute (eg. radians for angular data, centimeters for distance data, etc.) and interpret the response appropriately.

Parameters
[out]minValuethe 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
MStatus getMin ( MTime minValue) const

Return the minimum value for this attribute.

Parameters
[out]minValuethe minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a minimum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getMin ( MAngle minValue) const

Return the minimum value for this attribute.

Parameters
[out]minValuethe minimum value for this attribute. The returned angle is always in radians
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a minimum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getMin ( MDistance minValue) const

Return the minimum value for this attribute.

Parameters
[out]minValuethe minimum value for this attribute. The returned distance is always in centimeters
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a minimum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getMax ( double &  maxValue) const

Return the maximum value for this attribute.

This routine simply returns the numerical value of the attribute. It is up to the programmer to know the units used by this attribute (eg. radians for angular data, centimeters for distance data, etc.) and interpret the response appropriately.

Parameters
[out]maxValuethe 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
MStatus getMax ( MTime maxValue) const

Return the maximum value for this attribute.

Parameters
[out]maxValuethe maximum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a maximum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getMax ( MAngle maxValue) const

Return the maximum value for this attribute.

Parameters
[out]maxValuethe maximum value for this attribute. The returned angle is always in radians
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a maximum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getMax ( MDistance maxValue) const

Return the maximum value for this attribute.

Parameters
[out]maxValuethe maximum value for this attribute. The returned distance is always in centimeters
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a maximum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getSoftMin ( double &  minValue) const

Return the soft minimum value for this attribute.

This routine simply returns the numerical value of the attribute. It is up to the programmer to know the units used by this attribute (eg. radians for angular data, centimeters for distance data, etc.) and interpret the response appropriately.

Parameters
[out]minValuethe soft 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
MStatus getSoftMin ( MTime minValue) const

Return the soft minimum value for this attribute.

Parameters
[out]minValuethe soft minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a minimum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getSoftMin ( MAngle minValue) const

Return the soft minimum value for this attribute.

The returned angle is always in radians

Parameters
[out]minValuethe soft minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a minimum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getSoftMin ( MDistance minValue) const

Return the soft minimum value for this attribute.

Parameters
[out]minValuethe soft minimum value for this attribute. The returned distance is always in centimeters
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a minimum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getSoftMax ( double &  maxValue) const

Return the soft maximum value for this attribute.

This routine simply returns the numerical value of the attribute. It is up to the programmer to know the units used by this attribute (eg. radians for angular data, centimeters for distance data, etc.) and interpret the response appropriately.

Parameters
[out]maxValuethe 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
MStatus getSoftMax ( MTime maxValue) const

Return the soft maximum value for this attribute.

Parameters
[out]maxValuethe soft maximum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a maximum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getSoftMax ( MAngle maxValue) const

Return the soft maximum value for this attribute.

Parameters
[out]maxValuethe soft maximum value for this attribute. The returned angle is always in radians
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a maximum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getSoftMax ( MDistance maxValue) const

Return the soft maximum value for this attribute.

Parameters
[out]maxValuethe soft maximum value for this attribute. The returned distance is always in centimeters
Returns
  • MS::kSuccess the operation succeeded
  • MS::kFailure the attribute does not have a maximum
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setMin ( double  minValue)

Set the minimum value for this attribute.

This routine simply stores the given double as the numerical value of the attribute. It is up to the programmer to know the units used by this attribute (eg. radians for angular data, centimeters for distance data, etc.) and provide the appropriate value.

Parameters
[in]minValuethe new minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setMin ( const MTime minValue)

Set the minimum value for this attribute.

Parameters
[in]minValuethe new minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setMin ( const MAngle minValue)

Set the minimum value for this attribute.

Parameters
[in]minValuethe new minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setMin ( const MDistance minValue)

Set the minimum value for this attribute.

Parameters
[in]minValuethe new minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setMax ( double  maxValue)

Set the maximum value for this attribute.

This routine simply stores the given double as the numerical value of the attribute. It is up to the programmer to know the units used by this attribute (eg. radians for angular data, centimeters for distance data, etc.) and provide the appropriate value.

Parameters
[in]maxValuethe new maximum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setMax ( const MTime maxValue)

Set the maximum value for this attribute.

Parameters
[in]maxValuethe new maximum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setMax ( const MAngle maxValue)

Set the maximum value for this attribute.

Parameters
[in]maxValuethe new maximum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setMax ( const MDistance maxValue)

Set the maximum value for this attribute.

Parameters
[in]maxValuethe new maximum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setSoftMin ( double  minValue)

Set the soft minimum value for this attribute.

This routine simply stores the given double as the numerical value of the attribute. It is up to the programmer to know the units used by this attribute (eg. radians for angular data, centimeters for distance data, etc.) and provide the appropriate value.

Parameters
[in]minValuethe new soft minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setSoftMin ( const MTime minValue)

Set the soft minimum value for this attribute.

Parameters
[in]minValuethe new soft minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setSoftMin ( const MAngle minValue)

Set the soft minimum value for this attribute.

Parameters
[in]minValuethe new soft minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setSoftMin ( const MDistance minValue)

Set the soft minimum value for this attribute.

Parameters
[in]minValuethe new soft minimum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setSoftMax ( double  maxValue)

Set the soft maximum value for this attribute.

This routine simply stores the given double as the numerical value of the attribute. It is up to the programmer to know the units used by this attribute (eg. radians for angular data, centimeters for distance data, etc.) and provide the appropriate value.

Parameters
[in]maxValuethe new soft maximum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setSoftMax ( const MTime maxValue)

Set the soft maximum value for this attribute.

Parameters
[in]maxValuethe new soft maximum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setSoftMax ( const MAngle maxValue)

Set the soft maximum value for this attribute.

Parameters
[in]maxValuethe new soft maximum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus setSoftMax ( const MDistance maxValue)

Set the soft maximum value for this attribute.

Parameters
[in]maxValuethe new soft maximum value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not of the specified type
  • MS::kObjectDoesNotExist this instance is not bound to an MObject
MStatus getDefault ( double &  defaultValue)

Gets the default value for this attribute.

This routine simply returns the given double which represents the default value for the attribute.

Parameters
[out]defaultValuereturns the default value for this attribute. This method simply returns the given default value of the attribute as a double. It is up to the programmer to know the units used by this attribute (eg. radians for angular data, centimeters for distance data, etc.).
Returns
  • MS::kSuccess the operation succeeded
MStatus getDefault ( MTime defaultValue)

Gets the default value for a time attribute.

Parameters
[out]defaultValuereturns the default value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not a time attribute
MStatus getDefault ( MAngle defaultValue)

Gets the default value for this attribute.

Parameters
[out]defaultValuereturns the default value for this attribute in radians
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not an angular attribute
MStatus getDefault ( MDistance defaultValue)

Gets the default value for this attribute.

Parameters
[out]defaultValuereturns the default value for this attribute in centimeters
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not a distance attribute
MStatus setDefault ( double  defaultValue)

Set a new default value for this attribute.

This routine simply stores the given double as the new default value of the attribute. It is up to the programmer to know the units used by this attribute (eg. radians for angular data, centimeters for distance data, etc.) and provide the appropriate value.

Parameters
[in]defaultValuethe new default value for this attribute
Returns
MS::kSuccess the operation succeeded
Examples:
footPrintManip/footPrintManip.cpp, footPrintNode/footPrintNode.cpp, footPrintNode_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, footPrintNode_GeometryOverride/footPrintNode_GeometryOverride.cpp, footPrintNode_SubSceneOverride/footPrintNode_SubSceneOverride.cpp, rawfootPrintNode/rawfootPrintNode.cpp, simplePhysicsEngine/simplePhysicsEngine.cpp, squaresNode_noDepthTest/squaresNode_noDepthTest.cpp, and swissArmyManip/swissArmyManip.cpp.
MStatus setDefault ( const MTime defaultValue)

Set a new default value for a time attribute.

Parameters
[in]defaultValuethe new default value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not a time attribute
MStatus setDefault ( const MAngle defaultValue)

Set a new default value for this attribute.

Parameters
[in]defaultValuethe new default value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not an angular attribute
MStatus setDefault ( const MDistance defaultValue)

Set a new default value for this attribute.

Parameters
[in]defaultValuethe new default value for this attribute
Returns
  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not a distance attribute

The documentation for this class was generated from the following files: