class MFnUnitAttribute

Jump to documentation

: public MFnAttribute Unit attribute Function set. (OpenMaya) (OpenMaya.py)

Inheritance:

MFnUnitAttribute < MFnAttribute < MFnBase

public members:

MFnUnitAttribute ()
MFnUnitAttribute ( MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnUnitAttribute ()
virtual MFn::Type type () const
enum Type
kInvalid
kAngle
Angular attribute
kDistance
Distance (linear) attribute
kTime
Time attribute
kLast
MObject create ( const MString & fullName, const MString & briefName, MFnUnitAttribute::Type unitType , double defaultValue = 0.0, MStatus * ReturnStatus = NULL )
MObject create ( const MString & fullName, const MString & briefName, const MTime & defaultValue, MStatus * ReturnStatus = NULL )
MObject create ( const MString & fullName, const MString & briefName, const MAngle & defaultValue, MStatus * ReturnStatus = NULL )
MObject create ( const MString & fullName, const MString & briefName, const MDistance & defaultValue, MStatus * ReturnStatus = NULL )
MFnUnitAttribute::Type unitType ( MStatus * ReturnStatus = NULL ) const
bool hasMin ( MStatus * ReturnStatus = NULL) const
bool hasMax ( MStatus * ReturnStatus = NULL) const
bool hasSoftMin ( MStatus * ReturnStatus = NULL) const
bool hasSoftMax ( MStatus * ReturnStatus = NULL) const
MStatus getMin ( double& minValue ) const
MStatus getMin ( MTime & minValue ) const
MStatus getMin ( MAngle & minValue ) const
MStatus getMin ( MDistance & minValue ) const
MStatus getMax ( double& maxValue ) const
MStatus getMax ( MTime & maxValue ) const
MStatus getMax ( MAngle & maxValue ) const
MStatus getMax ( MDistance & maxValue ) const
MStatus getSoftMin ( double& minValue ) const
MStatus getSoftMin ( MTime & minValue ) const
MStatus getSoftMin ( MAngle & minValue ) const
MStatus getSoftMin ( MDistance & minValue ) const
MStatus getSoftMax ( double& maxValue ) const
MStatus getSoftMax ( MTime & maxValue ) const
MStatus getSoftMax ( MAngle & maxValue ) const
MStatus getSoftMax ( MDistance & maxValue ) const
MStatus setMin ( double minValue )
MStatus setMin ( const MTime &minValue )
MStatus setMin ( const MAngle &minValue )
MStatus setMin ( const MDistance &minValue )
MStatus setMax ( double maxValue )
MStatus setMax ( const MTime &maxValue )
MStatus setMax ( const MAngle &maxValue )
MStatus setMax ( const MDistance &maxValue )
MStatus setSoftMin ( double minValue )
MStatus setSoftMin ( const MTime &minValue )
MStatus setSoftMin ( const MAngle &minValue )
MStatus setSoftMin ( const MDistance &minValue )
MStatus setSoftMax ( double maxValue )
MStatus setSoftMax ( const MTime &maxValue )
MStatus setSoftMax ( const MAngle &maxValue )
MStatus setSoftMax ( const MDistance &maxValue )
MStatus getDefault ( double & defaultValue )
MStatus getDefault ( MTime & defaultValue )
MStatus getDefault ( MAngle & defaultValue )
MStatus getDefault ( MDistance & defaultValue )
MStatus setDefault ( double defaultValue )
MStatus setDefault ( const MTime & defaultValue )
MStatus setDefault ( const MAngle & defaultValue )
MStatus setDefault ( const MDistance & defaultValue )
MFnUnitAttribute ( const MObject & object, MStatus * ReturnStatus = NULL )

Inherited from MFnAttribute:

public members:

virtual MFn::Type type () const
enum DisconnectBehavior
kDelete
delete array element on disconnect (array attributes only)
kReset
reset the attribute to its default on disconnect
kNothing
do nothing to the attribute's value on disconnect
bool isReadable ( MStatus * ReturnStatus=NULL ) const
bool isWritable ( MStatus * ReturnStatus=NULL ) const
bool isConnectable ( MStatus * ReturnStatus=NULL ) const
bool isStorable ( MStatus * ReturnStatus=NULL ) const
bool isCached ( MStatus * ReturnStatus=NULL ) const
bool isArray ( MStatus * ReturnStatus=NULL ) const
bool indexMatters ( MStatus * ReturnStatus=NULL ) const
bool isKeyable ( MStatus * ReturnStatus=NULL ) const
bool isChannelBoxFlagSet ( MStatus * ReturnStatus=NULL ) const
bool isHidden ( MStatus * ReturnStatus=NULL ) const
bool isUsedAsColor ( MStatus * ReturnStatus=NULL ) const
bool isIndeterminant ( MStatus * ReturnStatus=NULL ) const
bool isRenderSource ( MStatus * ReturnStatus=NULL ) const
bool isDynamic ( MStatus * ReturnStatus=NULL ) const
bool isWorldSpace ( MStatus * ReturnStatus=NULL ) const
bool isAffectsWorldSpace ( MStatus * ReturnStatus=NULL ) const
DisconnectBehavior disconnectBehavior ( MStatus * ReturnStatus=NULL ) const
bool usesArrayDataBuilder ( MStatus * ReturnStatus=NULL ) const
bool internal ( MStatus * ReturnStatus=NULL ) const
MStatus setReadable ( bool state )
MStatus setWritable ( bool state )
MStatus setConnectable ( bool state )
MStatus setStorable ( bool state )
MStatus setCached ( bool state )
MStatus setArray ( bool state )
MStatus setIndexMatters ( bool state )
MStatus setKeyable ( bool state )
MStatus setChannelBox ( bool state )
MStatus setHidden ( bool state )
MStatus setUsedAsColor ( bool state )
MStatus setIndeterminant ( bool state )
MStatus setRenderSource ( bool state )
MStatus setWorldSpace ( bool state )
MStatus setAffectsWorldSpace ( bool state )
MStatus setDisconnectBehavior ( DisconnectBehavior behavior )
MStatus setUsesArrayDataBuilder ( bool state )
MStatus setInternal ( bool state )
bool accepts ( MFnData::Type type , MStatus * ReturnStatus=NULL ) const
bool accepts ( const MTypeId & id, MStatus * ReturnStatus=NULL ) const
MObject parent ( MStatus * ReturnStatus=NULL) const
MStatus setParent ( const MObject & parent )
MString name ( MStatus * ReturnStatus=NULL ) const
MString shortName ( MStatus * ReturnStatus=NULL ) const
MString getAddAttrCmd ( bool useLongName = false, MStatus * status=NULL ) const
public

Inherited from MFnBase:

public members:

virtual MFn::Type type () const
bool hasObj ( MFn::Type ) const
bool hasObj ( const MObject & ) const
MObject object ( MStatus * ReturnStatus = NULL ) const
virtual MStatus setObject ( MObject & object )
virtual MStatus setObject ( const MObject & object )

Documentation

Function set for unit attributes of dependency nodes.
Description

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.

Functions

MFnUnitAttribute:: MFnUnitAttribute ()

Description

Default class constructor. The function set is not attached to an MObject.

MFnUnitAttribute:: MFnUnitAttribute ( MObject & object, MStatus * ReturnStatus )

Description

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

Arguments

  • object the MObject to attach the function set to
  • ReturnStatus the return status
    • 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:: MFnUnitAttribute ( const MObject & object, MStatus * ReturnStatus )

Description

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

Arguments

  • object the const MObject to attach the function set to
  • ReturnStatus the return status
    • 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:: ~MFnUnitAttribute ()

Description

The class destructor.

MFn::Type MFnUnitAttribute:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kUnitAttribute

MObject MFnUnitAttribute:: create ( const MString & full, const MString & brief, MFnUnitAttribute::Type unitType , double defaultValue, MStatus * ReturnStatus)

Description

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.

Arguments

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

Return Value

  • an MObject representing the new attribute

MObject MFnUnitAttribute:: create ( const MString & full, const MString & brief, const MTime & defaultValue, MStatus * ReturnStatus)

Description

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).

Arguments

  • full the full (or int) name of the attribute
  • brief the brief (or short) name of the attribute
  • defaultValue the default value for the new attribute
  • ReturnStatus
    • MS::kSuccess the new attribute was created successfully
    • MS::kFailure the new attribute was not created

Return Value

  • an MObject representing the new attribute

MObject MFnUnitAttribute:: create ( const MString & full, const MString & brief, const MAngle &defaultValue, MStatus * ReturnStatus)

Description

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

Arguments

  • full the full (or int) name of the attribute
  • brief the brief (or short) name of the attribute
  • defaultValue the default value for the new attribute
  • ReturnStatus
    • MS::kSuccess the new attribute was created successfully
    • MS::kFailure the new attribute was not created

Return Value

  • an MObject representing the new attribute

MObject MFnUnitAttribute:: create ( const MString & full, const MString & brief, const MDistance &defaultValue, MStatus * ReturnStatus)

Description

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

Arguments

  • full the full (or int) name of the attribute
  • brief the brief (or short) name of the attribute
  • defaultValue the default value for the new attribute
  • ReturnStatus
    • MS::kSuccess the new attribute was created successfully
    • MS::kFailure the new attribute was not created

Return Value

  • an MObject representing the new attribute

MFnUnitAttribute::Type MFnUnitAttribute:: unitType ( MStatus * ReturnStatus) const

Description

Return the unit type of this attribute.

Arguments

  • ReturnStatus
    • MS::kSuccess the operation succeeded
    • MS::kObjectDoesNotExist this instance is not bound to an MObject

Return Value

  • an element of the MFnUnitAttribute::Type enum

bool MFnUnitAttribute:: hasMin ( MStatus * ReturnStatus) const

Description

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

Arguments

  • ReturnStatus
    • MS::kSuccess the operation succeeded
    • MS::kObjectDoesNotExist this instance is not bound to an MObject

Return Value

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

bool MFnUnitAttribute:: hasMax ( MStatus * ReturnStatus) const

Description

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

Arguments

  • ReturnStatus
    • MS::kSuccess the operation succeeded
    • MS::kObjectDoesNotExist this instance is not bound to an MObject

Return Value

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

bool MFnUnitAttribute:: hasSoftMin ( MStatus * ReturnStatus) const

Description

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

Arguments

  • ReturnStatus
    • MS::kSuccess the operation succeeded
    • MS::kObjectDoesNotExist this instance is not bound to an MObject

Return Value

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

bool MFnUnitAttribute:: hasSoftMax ( MStatus * ReturnStatus) const

Description

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

Arguments

  • ReturnStatus
    • MS::kSuccess the operation succeeded
    • MS::kObjectDoesNotExist this instance is not bound to an MObject

Return Value

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

MStatus MFnUnitAttribute:: getMin ( double& minValue ) const

Description

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.

Arguments

  • minValue the minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getMin ( MTime & minValue ) const

Description

Return the minimum value for this attribute.

Arguments

  • minValue the minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getMin ( MAngle & minValue ) const

Description

Return the minimum value for this attribute.

Arguments

  • minValue the minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getMin ( MDistance & minValue ) const

Description

Return the minimum value for this attribute.

Arguments

  • minValue the minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getMax ( double& maxValue ) const

Description

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.

Arguments

  • maxValue the maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getMax ( MTime & maxValue ) const

Description

Return the maximum value for this attribute.

Arguments

  • maxValue the maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getMax ( MAngle & maxValue ) const

Description

Return the maximum value for this attribute.

Arguments

  • maxValue the maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getMax ( MDistance & maxValue ) const

Description

Return the maximum value for this attribute.

Arguments

  • maxValue the maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getSoftMin ( double& minValue ) const

Description

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.

Arguments

  • minValue the soft minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getSoftMin ( MTime & minValue ) const

Description

Return the soft minimum value for this attribute.

Arguments

  • minValue the soft minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getSoftMin ( MAngle & minValue ) const

Description

Return the soft minimum value for this attribute.

Arguments

  • minValue the soft minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getSoftMin ( MDistance & minValue ) const

Description

Return the soft minimum value for this attribute.

Arguments

  • minValue the soft minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getSoftMax ( double& maxValue ) const

Description

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.

Arguments

  • maxValue the soft maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getSoftMax ( MTime & maxValue ) const

Description

Return the soft maximum value for this attribute.

Arguments

  • maxValue the soft maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getSoftMax ( MAngle & maxValue ) const

Description

Return the soft maximum value for this attribute.

Arguments

  • maxValue the soft maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getSoftMax ( MDistance & maxValue ) const

Description

Return the soft maximum value for this attribute.

Arguments

  • maxValue the soft maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setMin ( double minValue )

Description

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.

Arguments

  • minValue the new minimum value for this attribute

Return Value

  • MS::kSuccess the operation succeeded
  • MS::kObjectDoesNotExist this instance is not bound to an MObject

MStatus MFnUnitAttribute:: setMin ( const MTime & minValue )

Description

Set the minimum value for this attribute.

Arguments

  • minValue the new minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setMin ( const MAngle &minValue )

Description

Set the minimum value for this attribute.

Arguments

  • minValue the new minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setMin ( const MDistance &minValue )

Description

Set the minimum value for this attribute.

Arguments

  • minValue the new minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setMax ( double maxValue)

Description

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.

Arguments

  • maxValue the new maximum value for this attribute

Return Value

  • MS::kSuccess the operation succeeded
  • MS::kObjectDoesNotExist this instance is not bound to an MObject

MStatus MFnUnitAttribute:: setMax ( const MTime &maxValue)

Description

Set the maximum value for this attribute.

Arguments

  • maxValue the new maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setMax ( const MAngle &maxValue)

Description

Set the maximum value for this attribute.

Arguments

  • maxValue the new maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setMax ( const MDistance &maxValue)

Description

Set the maximum value for this attribute.

Arguments

  • maxValue the new maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setSoftMin ( double minValue )

Description

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.

Arguments

  • minValue the new soft minimum value for this attribute

Return Value

  • MS::kSuccess the operation succeeded
  • MS::kObjectDoesNotExist this instance is not bound to an MObject

MStatus MFnUnitAttribute:: setSoftMin ( const MTime & minValue )

Description

Set the soft minimum value for this attribute.

Arguments

  • minValue the new soft minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setSoftMin ( const MAngle &minValue )

Description

Set the soft minimum value for this attribute.

Arguments

  • minValue the new soft minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setSoftMin ( const MDistance &minValue )

Description

Set the soft minimum value for this attribute.

Arguments

  • minValue the new soft minimum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setSoftMax ( double maxValue)

Description

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.

Arguments

  • maxValue the new soft maximum value for this attribute

Return Value

  • MS::kSuccess the operation succeeded
  • MS::kObjectDoesNotExist this instance is not bound to an MObject

MStatus MFnUnitAttribute:: setSoftMax ( const MTime &maxValue)

Description

Set the soft maximum value for this attribute.

Arguments

  • maxValue the new soft maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setSoftMax ( const MAngle &maxValue)

Description

Set the soft maximum value for this attribute.

Arguments

  • maxValue the new soft maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: setSoftMax ( const MDistance &maxValue)

Description

Set the soft maximum value for this attribute.

Arguments

  • maxValue the new soft maximum value for this attribute

Return Value

  • 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 MFnUnitAttribute:: getDefault ( double & defaultValue )

Description

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

Arguments

  • defaultValue returns 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.).

Return Value

  • MS::kSuccess the operation succeeded

MStatus MFnUnitAttribute:: getDefault ( MTime & defaultValue )

Description

Gets the default value for a time attribute.

Arguments

  • defaultValue returns the default value for this attribute

Return Value

  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not a time attribute

MStatus MFnUnitAttribute:: getDefault ( MAngle & defaultValue )

Description

Gets the default value for this attribute.

Arguments

  • defaultValue returns the default value for this attribute in radians

Return Value

  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not an angular attribute

MStatus MFnUnitAttribute:: getDefault ( MDistance & defaultValue )

Description

Gets the default value for this attribute.

Arguments

  • defaultValue returns the default value for this attribute in centimeters

Return Value

  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not a distance attribute

MStatus MFnUnitAttribute:: setDefault ( double defaultValue )

Description

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.

Arguments

  • defaultValue the new default value for this attribute

Return Value

  • MS::kSuccess the operation succeeded

MStatus MFnUnitAttribute:: setDefault ( const MTime & defaultValue )

Description

Set a new default value for a time attribute.

Arguments

  • defaultValue the new default value for this attribute

Return Value

  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not a time attribute

MStatus MFnUnitAttribute:: setDefault ( const MAngle &defaultValue )

Description

Set a new default value for this attribute.

Arguments

  • defaultValue the new default value for this attribute

Return Value

  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not an angular attribute

MStatus MFnUnitAttribute:: setDefault ( const MDistance &defaultValue )

Description

Set a new default value for this attribute.

Arguments

  • defaultValue the new default value for this attribute

Return Value

  • MS::kSuccess the operation succeeded
  • MS::kInvalidParameter this attribute is not a distance attribute

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright