class MFnMatrixAttribute

Jump to documentation

: public MFnAttribute Matrix attribute function set. (OpenMaya) (OpenMaya.py)

Inheritance:

MFnMatrixAttribute < MFnAttribute < MFnBase

public members:

MFnMatrixAttribute ()
MFnMatrixAttribute ( MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnMatrixAttribute ()
virtual MFn::Type type () const
enum Type
kFloat
matrix of float values
kDouble
matrix of double values
MObject create ( const MString & fullName, const MString & briefName, Type matrixType = kDouble , MStatus * ReturnStatus = NULL )
MStatus getDefault ( MMatrix & def )
MStatus getDefault ( MFloatMatrix & def )
MStatus setDefault ( const MMatrix & def )
MStatus setDefault ( const MFloatMatrix & def )
MFnMatrixAttribute ( 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 matrix attributes.
Description

Function object for matrix attributes. These attributes accept either a matrix of float values or double values depending on the type specified to the create method.

Functions

MFnMatrixAttribute:: MFnMatrixAttribute ()

Description

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

MFnMatrixAttribute:: MFnMatrixAttribute ( 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

MFnMatrixAttribute:: MFnMatrixAttribute ( 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

MFnMatrixAttribute:: ~MFnMatrixAttribute ()

Description

The class destructor.

MFn::Type MFnMatrixAttribute:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kMatrixAttribute

MObject MFnMatrixAttribute:: create ( const MString & fullName, const MString & briefName, Type matrixType, MStatus * ReturnStatus )

Description

Creates a matrix attribute object.

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

  • fullName The full name of the attribute
  • briefName The brief name of the attribute
  • matrixType Whether to create a matrix of floats or doubles
  • ReturnStatus Status code for the operation.

Return Value

  • The newly created Matrix attribute object.

Status Codes

  • MS::kSuccess The attribute object was successfully created.
  • MS::kInsufficientMemory There is no more memory

MStatus MFnMatrixAttribute:: getDefault ( MMatrix & def )

Description

Gets the default value for the attribute. Use this for getting the default value of a double matrix attribute.

Arguments

  • default returns the default matrix value

Return Value

  • Status flag

Status Codes

  • MS::kSuccess The defaults were successfully queried
  • MS::kFailure Function set does not have a valid object

MStatus MFnMatrixAttribute:: getDefault ( MFloatMatrix & def )

Description

Gets the default value for the attribute. Use this for getting the default value of a float matrix attribute.

Arguments

  • default returns the default matrix value

Return Value

  • Status flag

Status Codes

  • MS::kSuccess The defaults were successfully queried
  • MS::kFailure Function set does not have a valid object

MStatus MFnMatrixAttribute:: setDefault ( const MMatrix & def )

Description

Sets the default value for the attribute. Use this for setting the defaults of a double matrix attribute.

Arguments

  • default matrix value

Return Value

  • Status flag

Status Codes

  • MS::kSuccess The defaults were successfully set
  • MS::kFailure Function set does not have a valid object

MStatus MFnMatrixAttribute:: setDefault ( const MFloatMatrix & def )

Description

Sets the default value for the attribute. Use this for setting the defaults of a float matrix attribute.

Arguments

  • default matrix value

Return Value

  • Status flag

Status Codes

  • MS::kSuccess The defaults were successfully set
  • MS::kFailure Function set does not have a valid object

This class has no child classes.


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