#include <MFnTypedAttribute.h>
MFnTypedAttribute is the function set for typed dependency node attributes. A typed attribute accepts exactly one type of data. The type that it accepts is set when the attribute is created.
Once a typed attribute had been created, the data for it can be accessed using an MDataHandle while in your node's compute method.
animCubeNode.cpp, apiMeshCreator.cpp, apiMeshShape.cpp, arcLenNode.cpp, blindComplexDataCmd.cpp, blindDataMesh.cpp, blindDoubleDataCmd.cpp, cgfxAttrDef.cpp, cgfxShaderNode.cpp, closestPointOnCurveNode.cpp, cvColorNode.cpp, fullLoftNode.cpp, geometrySurfaceConstraint.cpp, GLSLShaderNode.cpp, hlslShader.cpp, hwAnisotropicShader_NV20.cpp, hwColorPerVertexShader.cpp, hwDecalBumpShader_NV20.cpp, hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, hwUnlitShader.cpp, latticeNoiseNode.cpp, meshOpNode.cpp, multiCurveNode.cpp, particleAttrNode.cpp, pointOnMeshInfoNode.cpp, pointOnSubdNode.cpp, shellNode.cpp, simpleLoftNode.cpp, slopeShaderNode.cpp, splitUVNode.cpp, stringFormatNode.cpp, testNobjectNode.cpp, and testNucleusNode.cpp.
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. | |
virtual | ~MFnTypedAttribute () |
Destructor. | |
MFnTypedAttribute () | |
Default constructor. | |
MFnTypedAttribute (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
MObject | create (const MString &fullName, const MString &briefName, const MTypeId &id, MObject defaultData=MObject::kNullObj, MStatus *ReturnStatus=NULL) |
MObject | create (const MString &fullName, const MString &briefName, MFnData::Type type, MObject defaultData=MObject::kNullObj, MStatus *ReturnStatus=NULL) |
MFnData::Type | attrType (MStatus *ReturnStatus=NULL) const |
MStatus | getDefault (MObject &defaultCustomData) |
MStatus | setDefault (const MObject &defaultCustomData) |
MObject | create (const MString &fullName, const MString &briefName, MFnData::Type type, MStatus *ReturnStatus) |
This method is obsolete. This method is not available in Python. | |
MFnTypedAttribute (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
Protected Member Functions | |
virtual const char * | className () const |
Class name. |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFn::Type MFnTypedAttribute::type | ( | ) | const [virtual] |
const char * MFnTypedAttribute::className | ( | ) | const [protected, virtual] |
MObject MFnTypedAttribute::create | ( | const MString & | full, | |
const MString & | brief, | |||
const MTypeId & | id, | |||
MObject | defaultData = MObject::kNullObj , |
|||
MStatus * | ReturnStatus = NULL | |||
) |
Create a new typed attribute with the given type.
[in] | full | Full name for the new attribute. |
[in] | brief | Short name for the attribute. |
[in] | id | Type id of the attribute's data. |
[in] | defaultData | Default data for the attribute. |
[out] | ReturnStatus | Return status. |
MObject MFnTypedAttribute::create | ( | const MString & | full, | |
const MString & | brief, | |||
MFnData::Type | type, | |||
MObject | defaultData = MObject::kNullObj , |
|||
MStatus * | ReturnStatus = NULL | |||
) |
Create a new typed attribute with the given type.
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.
[in] | full | Full name for the new attribute. |
[in] | brief | Short name for the attribute. |
[in] | type | Type of the attribute's data. |
[in] | defaultData | Default data for the attribute. |
[out] | ReturnStatus | Return status. |
MFnData::Type MFnTypedAttribute::attrType | ( | MStatus * | ReturnStatus = NULL |
) | const |
Return the type of this attribute.
[out] | ReturnStatus |
Gets the default data for this attribute.
[out] | defaultCustomData | returns the default data for the attribute |
Set the default data for this attribute. The data can be created using the appropriate data function set.
[in] | defaultCustomData | default data for the attribute |
MObject MFnTypedAttribute::create | ( | const MString & | full, | |
const MString & | brief, | |||
MFnData::Type | type, | |||
MStatus * | ReturnStatus | |||
) |
This method is obsolete. This method is not available in Python.
[in] | full | Full name for the new attribute. |
[in] | brief | Short name for the attribute. |
[in] | type | Type of the attribute's data. |
[out] | ReturnStatus | Return status. |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |