C++ API Reference

Numeric attribute function set. More...

#include <MFnNumericAttribute.h>

+ Inheritance diagram for MFnNumericAttribute:

Public Member Functions

virtual MFn::Type type () const
 Function set type. More...
 
virtual ~MFnNumericAttribute ()
 Destructor.
 
 MFnNumericAttribute ()
 Default constructor.
 
 MFnNumericAttribute (MObject &object, MStatus *ReturnStatus=NULL)
 Constructor. More...
 
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. More...
 
MObject createColor (const MString &fullName, const MString &briefName, MStatus *ReturnStatus=NULL)
 Create a new color attribute and return it as an MObject. More...
 
MObject createPoint (const MString &fullName, const MString &briefName, MStatus *ReturnStatus=NULL)
 Create a new point attribute and return it as an MObject. More...
 
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. More...
 
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. More...
 
MObject create (const MString &fullName, const MString &briefName, const MObject &child1, const MObject &child2, const MObject &child3, const MObject &child4, MStatus *ReturnStatus=NULL)
 Create a new numeric attribute and return it as an MObject. More...
 
MFnNumericData::Type unitType (MStatus *ReturnStatus=NULL) const
 Return the unit type of this attribute. More...
 
MObject child (unsigned int index, MStatus *ReturnStatus=NULL) const
 Return the indicated child attribute as an MObject. 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 double attribute has a soft minimum value set. More...
 
bool hasSoftMax (MStatus *ReturnStatus=NULL) const
 Determine whether or not this double attribute has a soft maximum value set. More...
 
MStatus getMin (double &min1) const
 Return the minimum value for this double attribute. More...
 
MStatus getMin (double &min1, double &min2) const
 Return the minimum values for the two children (both double attributes) of this compound attribute. More...
 
MStatus getMin (double &min1, double &min2, double &min3) const
 Return the minimum values for the three children (all double attributes) of this compound attribute. More...
 
MStatus getMin (double &min1, double &min2, double &min3, double &min4) const
 Return the minimum values for the four children (all double attributes) of this compound attribute. More...
 
MStatus getMax (double &max1) const
 Return the maximum value for this double attribute. More...
 
MStatus getMax (double &max1, double &max2) const
 Return the maximum values for the two children (both double attributes) of this compound attribute. More...
 
MStatus getMax (double &max1, double &max2, double &max3) const
 Return the maximum values for the three children (all double attributes) of this compound attribute. More...
 
MStatus getMax (double &max1, double &max2, double &max3, double &max4) const
 Return the maximum values for the four children (all double attributes) of this compound attribute. More...
 
MStatus getSoftMin (double &min1) const
 Return the minimum value for this double attribute. More...
 
MStatus getSoftMax (double &max1) const
 Return the maximum value for this double attribute. More...
 
MStatus setMin (double min1)
 Set the minimum value for this double attribute. More...
 
MStatus setMin (double min1, double min2)
 Set the minimum values for the two children (both double attributes) of this compound attribute. More...
 
MStatus setMin (double min1, double min2, double min3)
 Set the minimum values for the three children (all double attributes) of this compound attribute. More...
 
MStatus setMin (double min1, double min2, double min3, double min4)
 Set the minimum values for the four children (all double attributes) of this compound attribute. More...
 
MStatus setMax (double max1)
 Set the maximum value for this double attribute. More...
 
MStatus setMax (double max1, double max2)
 Set the maximum values for the two children (both double attributes) of this compound attribute. More...
 
MStatus setMax (double max1, double max2, double max3)
 Set the maximum values for the three children (all double attributes) of this compound attribute. More...
 
MStatus setMax (double max1, double max2, double max3, double max4)
 Set the maximum values for the four children (all double attributes) of this compound attribute. More...
 
MStatus setSoftMin (double min1)
 Set the soft minimum value for this double attribute. More...
 
MStatus setSoftMax (double max1)
 Set the soft maximum value for this double attribute. More...
 
MStatus getDefault (bool &def1)
 Get the default value for this boolean attribute. More...
 
MStatus getDefault (char &def1)
 Get the default value for this character attribute. More...
 
MStatus getDefault (int &def1)
 Gets the default value for this integral attribute. More...
 
MStatus getDefault (int &def1, int &def2)
 Gets the default value for the integral attributes of the two children of this attribute. More...
 
MStatus getDefault (int &def1, int &def2, int &def3)
 Gets the default value for the integral attributes of the three children of this attribute. More...
 
MStatus getDefault (MInt64 &def1)
 Gets the default value for this integral attribute and returns it as a 64-bit int. More...
 
MStatus getDefault (float &def1)
 Gets the default value for this float attribute. More...
 
MStatus getDefault (float &def1, float &def2)
 Gets the default value for the float attributes of the two children of this attribute. More...
 
MStatus getDefault (float &def1, float &def2, float &def3)
 Gets the default value for the float attributes of the three children of this attribute. More...
 
MStatus getDefault (double &def1)
 Get the default value for this double attribute. More...
 
MStatus getDefault (double &def1, double &def2)
 Gets the default value for the double attributes of the two children of this attribute. More...
 
MStatus getDefault (double &def1, double &def2, double &def3)
 Gets the default value for the double attributes of the three children of this attribute. More...
 
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. More...
 
MStatus getDefault (void *&def1)
 Get the default value for this address attribute. More...
 
MStatus setDefault (bool def1)
 Set a new default value for this boolean attribute. More...
 
MStatus setDefault (char def1)
 Set a new default value for this character attribute. More...
 
MStatus setDefault (int def1)
 Set a new default value for this integral attribute. More...
 
MStatus setDefault (int def1, int def2)
 Set a new default value for the integral attributes of the two children of this attribute. More...
 
MStatus setDefault (int def1, int def2, int def3)
 Set a new default value for the integral attributes of the three children of this attribute. More...
 
MStatus setDefault (MInt64 def1)
 Set a new default value for this integral attribute. More...
 
MStatus setDefault (float def1)
 Set a new default value for this float attribute. More...
 
MStatus setDefault (float def1, float def2)
 Set a new default value for the float attributes of the two children of this attribute. More...
 
MStatus setDefault (float def1, float def2, float def3)
 Set a new default value for the float attributes of the three children of this attribute. More...
 
MStatus setDefault (double def1)
 Set a new default value for this double attribute. More...
 
MStatus setDefault (double def1, double def2)
 Set a new default value for the double attributes of the two children of this attribute. More...
 
MStatus setDefault (double def1, double def2, double def3)
 Set a new default value for the double attributes of the three children of this attribute. More...
 
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. More...
 
MStatus setDefault (void *def1)
 Set a new default value for this address attribute. More...
 
 MFnNumericAttribute (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=NULL) 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...
 

Additional Inherited Members

- Public Types inherited from MFnAttribute
enum  DisconnectBehavior { kDelete, kReset, kNothing }
 Attribute behaviour on disconnect. More...
 

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:
AbcBullet/AttributesWriter.cpp, AbcExport/AttributesWriter.cpp, AbcImport/AlembicNode.cpp, AbcImport/CreateSceneHelper.cpp, AbcImport/MeshHelper.cpp, AbcImport/NodeIteratorVisitorHelper.cpp, AbcImport/NodeIteratorVisitorHelper.h, AbcImport/NurbsCurveHelper.cpp, anisotropicShader/anisotropicShader.cpp, apiDirectionalLightShape/apiDirectionalLightShape.cpp, apiMeshShape/apiMeshShape.cpp, arcLenNode/arcLenNode.cpp, atomImportExport/atomCachedPlugs.cpp, atomImportExport/atomFileUtils.cpp, backfillShader/backfillShader.cpp, blindDataShader/blindDataMesh.cpp, blindShortDataCmd/blindShortDataCmd.cpp, brickShader/brickShader.cpp, buildRotationNode/buildRotationNode.cpp, cellShader/cellShader.cpp, cgFx/cgfxAttrDef.cpp, cgFx/cgfxShaderNode.cpp, cgFx/cgfxVector.cpp, checkerShader/checkerShader.cpp, circleNode/circleNode.cpp, clearcoat.cpp, closestPointOnCurve/closestPointOnCurveNode.cpp, compositingShader/compositingShader.cpp, contrastShader/contrastShader.cpp, customImagePlane/customImagePlane.cpp, cvColorNode/cvColorNode.cpp, cvColorShader/cvColorShader.cpp, depthShader/depthShader.cpp, displacementShader/displacementShader.cpp, dx11Shader/dx11ConeAngleToHotspotConverter.cpp, dx11Shader/dx11Shader.cpp, dynExprField/dynExprField.cpp, fileTexture/fileTexture.cpp, flameShader/flameShader.cpp, footPrintNode_GeometryOverride/footPrintNode_GeometryOverride.cpp, footPrintNode_GeometryOverride_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, gameInputDevice/gameInputDevice.cpp, gammaShader/gammaShader.cpp, genericAttributeNode/genericAttributeNode.cpp, geometryReplicator/geometryReplicator.cpp, geometrySurfaceConstraint/geometrySurfaceConstraint.cpp, geomShader/geomShader.cpp, glslShader/GLSLShader.cpp, hwPhongShader/hwPhongShader.cpp, interpShader/interpShader.cpp, jitterNode/jitterNode.cpp, lambertShader/lambertShader.cpp, latticeNoise/latticeNoiseNode.cpp, lavaShader/lavaShader.cpp, lightShader/lightShader.cpp, manipOverride/rockingTransform2.cpp, MayaPluginForSpreticle/spReticleLoc.cpp, mixtureShader/mixtureShader.cpp, motionPathNode/motionPathNode.cpp, multiCurveNode/multiCurveNode.cpp, noiseShader/noiseShader.cpp, onbShader/onbShader.cpp, particleAttrNode/particleAttrNode.cpp, phongShader/phongShader.cpp, pointOnMeshInfo/pointOnMeshInfoNode.cpp, pointOnSubdNode/pointOnSubdNode.cpp, randomizerDevice/randomizerDevice.cpp, rawfootPrintNode/rawfootPrintNode.cpp, renderAccessNode/renderAccessNode.cpp, rockingTransform/rockingTransform.cpp, rockingTransformCheck/rockingTransform.cpp, sceneAssembly/adskPrepareRenderGlobals.cpp, shadowMatteShader/shadowMatteShader.cpp, shellNode/shellNode.cpp, shiftNode/shiftNode.cpp, simpleEvaluationDraw/simpleEvaluationDraw.cpp, simpleEvaluationNode/simpleEvaluationNode.cpp, simpleNoiseShader/simpleNoiseShader.cpp, simpleSpring/simpleSpring.cpp, sineNode/sineNode.cpp, slopeShader/slopeShaderNode.cpp, solidCheckerShader/solidCheckerShader.cpp, splatDeformer/splatDeformer.cpp, sseDeformer/sseDeformer.cpp, stringFormatNode/stringFormatNode.cpp, surfaceBumpManip/surfaceBumpManip.cpp, swissArmyManip/swissArmyManip.cpp, testMTopologyEvaluator/testMTopologyEvaluator.cpp, topologyTrackingNode/topologyTrackingNode.cpp, torusField/torusField.cpp, transCircleNode/transCircleNode.cpp, transformDrawNode/transformDrawNode.cpp, udpDevice/udpDevice.cpp, uiDrawManager/uiDrawManager.cpp, volumeShader/volumeShader.cpp, vp2BlinnShader/vp2BlinnShader.cpp, weightListNode/weightListNode.cpp, and yTwistNode/yTwistNode.cpp.

Constructor & Destructor Documentation

MFnNumericAttribute ( 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
MFnNumericAttribute ( 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::kNumericAttribute.

Returns
the class type.

Reimplemented from MFnAttribute.

const char * className ( )
static

Returns the name of this class.

Return the class name : "MFnNumericAttribute".

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

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]fullthe full (or long) 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, AbcImport/CreateSceneHelper.cpp, AbcImport/MeshHelper.cpp, AbcImport/NodeIteratorVisitorHelper.cpp, AbcImport/NurbsCurveHelper.cpp, anisotropicShader/anisotropicShader.cpp, apiDirectionalLightShape/apiDirectionalLightShape.cpp, arcLenNode/arcLenNode.cpp, atomImportExport/atomFileUtils.cpp, backfillShader/backfillShader.cpp, blindDataShader/blindDataMesh.cpp, blindShortDataCmd/blindShortDataCmd.cpp, brickShader/brickShader.cpp, buildRotationNode/buildRotationNode.cpp, cellShader/cellShader.cpp, cgFx/cgfxAttrDef.cpp, cgFx/cgfxShaderNode.cpp, cgFx/cgfxVector.cpp, checkerShader/checkerShader.cpp, circleNode/circleNode.cpp, clearcoat.cpp, closestPointOnCurve/closestPointOnCurveNode.cpp, compositingShader/compositingShader.cpp, customImagePlane/customImagePlane.cpp, cvColorNode/cvColorNode.cpp, cvColorShader/cvColorShader.cpp, depthShader/depthShader.cpp, displacementShader/displacementShader.cpp, dx11Shader/dx11ConeAngleToHotspotConverter.cpp, dx11Shader/dx11Shader.cpp, fileTexture/fileTexture.cpp, flameShader/flameShader.cpp, footPrintNode_GeometryOverride/footPrintNode_GeometryOverride.cpp, footPrintNode_GeometryOverride_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, gameInputDevice/gameInputDevice.cpp, genericAttributeNode/genericAttributeNode.cpp, geometryReplicator/geometryReplicator.cpp, geometrySurfaceConstraint/geometrySurfaceConstraint.cpp, glslShader/GLSLShader.cpp, hwPhongShader/hwPhongShader.cpp, interpShader/interpShader.cpp, jitterNode/jitterNode.cpp, lambertShader/lambertShader.cpp, latticeNoise/latticeNoiseNode.cpp, lavaShader/lavaShader.cpp, lightShader/lightShader.cpp, manipOverride/rockingTransform2.cpp, MayaPluginForSpreticle/spReticleLoc.cpp, motionPathNode/motionPathNode.cpp, multiCurveNode/multiCurveNode.cpp, noiseShader/noiseShader.cpp, onbShader/onbShader.cpp, particleAttrNode/particleAttrNode.cpp, phongShader/phongShader.cpp, pointOnMeshInfo/pointOnMeshInfoNode.cpp, pointOnSubdNode/pointOnSubdNode.cpp, randomizerDevice/randomizerDevice.cpp, rawfootPrintNode/rawfootPrintNode.cpp, renderAccessNode/renderAccessNode.cpp, rockingTransform/rockingTransform.cpp, rockingTransformCheck/rockingTransform.cpp, sceneAssembly/adskPrepareRenderGlobals.cpp, shadowMatteShader/shadowMatteShader.cpp, shellNode/shellNode.cpp, shiftNode/shiftNode.cpp, simpleEvaluationDraw/simpleEvaluationDraw.cpp, simpleEvaluationNode/simpleEvaluationNode.cpp, simpleNoiseShader/simpleNoiseShader.cpp, simpleSpring/simpleSpring.cpp, sineNode/sineNode.cpp, slopeShader/slopeShaderNode.cpp, solidCheckerShader/solidCheckerShader.cpp, splatDeformer/splatDeformer.cpp, sseDeformer/sseDeformer.cpp, stringFormatNode/stringFormatNode.cpp, surfaceBumpManip/surfaceBumpManip.cpp, swissArmyManip/swissArmyManip.cpp, testMTopologyEvaluator/testMTopologyEvaluator.cpp, topologyTrackingNode/topologyTrackingNode.cpp, torusField/torusField.cpp, transCircleNode/transCircleNode.cpp, transformDrawNode/transformDrawNode.cpp, udpDevice/udpDevice.cpp, uiDrawManager/uiDrawManager.cpp, volumeShader/volumeShader.cpp, vp2BlinnShader/vp2BlinnShader.cpp, weightListNode/weightListNode.cpp, and yTwistNode/yTwistNode.cpp.
MObject createColor ( const MString full,
const MString brief,
MStatus ReturnStatus = NULL 
)

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.

They type of the created attribute will be MFnNumericData::k3Float.

Parameters
[in]fullthe full (or long) name of the attribute
[in]briefthe 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:
AbcImport/NodeIteratorVisitorHelper.cpp, anisotropicShader/anisotropicShader.cpp, apiDirectionalLightShape/apiDirectionalLightShape.cpp, backfillShader/backfillShader.cpp, brickShader/brickShader.cpp, cellShader/cellShader.cpp, checkerShader/checkerShader.cpp, compositingShader/compositingShader.cpp, contrastShader/contrastShader.cpp, cvColorShader/cvColorShader.cpp, depthShader/depthShader.cpp, displacementShader/displacementShader.cpp, fileTexture/fileTexture.cpp, flameShader/flameShader.cpp, footPrintNode_GeometryOverride_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, gammaShader/gammaShader.cpp, geomShader/geomShader.cpp, hwPhongShader/hwPhongShader.cpp, interpShader/interpShader.cpp, lavaShader/lavaShader.cpp, lightShader/lightShader.cpp, MayaPluginForSpreticle/spReticleLoc.cpp, mixtureShader/mixtureShader.cpp, noiseShader/noiseShader.cpp, onbShader/onbShader.cpp, phongShader/phongShader.cpp, renderAccessNode/renderAccessNode.cpp, shadowMatteShader/shadowMatteShader.cpp, shiftNode/shiftNode.cpp, slopeShader/slopeShaderNode.cpp, solidCheckerShader/solidCheckerShader.cpp, volumeShader/volumeShader.cpp, and vp2BlinnShader/vp2BlinnShader.cpp.
MObject createPoint ( const MString full,
const MString brief,
MStatus ReturnStatus = NULL 
)

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.

They type of the created attribute will be MFnNumericData::k3Float.

Parameters
[in]fullthe full (or long) name of the attribute
[in]briefthe 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:
AbcImport/NodeIteratorVisitorHelper.cpp, anisotropicShader/anisotropicShader.cpp, backfillShader/backfillShader.cpp, cellShader/cellShader.cpp, cvColorShader/cvColorShader.cpp, depthShader/depthShader.cpp, dynExprField/dynExprField.cpp, flameShader/flameShader.cpp, gammaShader/gammaShader.cpp, geomShader/geomShader.cpp, interpShader/interpShader.cpp, lavaShader/lavaShader.cpp, lightShader/lightShader.cpp, noiseShader/noiseShader.cpp, onbShader/onbShader.cpp, phongShader/phongShader.cpp, renderAccessNode/renderAccessNode.cpp, shadowMatteShader/shadowMatteShader.cpp, shiftNode/shiftNode.cpp, slopeShader/slopeShaderNode.cpp, solidCheckerShader/solidCheckerShader.cpp, and volumeShader/volumeShader.cpp.
MObject createAddr ( const MString full,
const MString brief,
void *  defaultValue = NULL,
MStatus ReturnStatus = NULL 
)

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]fullthe full (or long) 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
  • MS::kInvalidParameter the type parameter was invalid
Returns
An MObject representing the new attribute
Examples:
anisotropicShader/anisotropicShader.cpp, backfillShader/backfillShader.cpp, cvColorShader/cvColorShader.cpp, lambertShader/lambertShader.cpp, lightShader/lightShader.cpp, onbShader/onbShader.cpp, phongShader/phongShader.cpp, and shadowMatteShader/shadowMatteShader.cpp.
MObject create ( const MString full,
const MString brief,
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.

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]fullthe full (or long) name of the attribute
[in]briefthe brief (or short) name of the attribute
[in]child1a numeric attribute
[in]child2a numeric attribute
[in]child3a 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
MObject create ( const MString full,
const MString brief,
const MObject child1,
const MObject child2,
const MObject child3,
const MObject child4,
MStatus ReturnStatus = NULL 
)

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 four 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]fullthe full (or long) name of the attribute
[in]briefthe brief (or short) name of the attribute
[in]child1the first of the four numeric attributes
[in]child2the second of the four numeric attributes
[in]child3the third of the four numeric attributes
[in]child4the fourth of the four numeric attributes
[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

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:
AbcBullet/AttributesWriter.cpp, AbcExport/AttributesWriter.cpp, and cgFx/cgfxAttrDef.cpp.
MObject child ( unsigned int  index,
MStatus ReturnStatus = NULL 
) const

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]indexthe 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

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:
cgFx/cgfxAttrDef.cpp.
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
Examples:
cgFx/cgfxAttrDef.cpp.
bool hasSoftMin ( MStatus ReturnStatus = NULL) const

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:
cgFx/cgfxAttrDef.cpp.
bool hasSoftMax ( MStatus ReturnStatus = NULL) const

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:
cgFx/cgfxAttrDef.cpp.
MStatus getMin ( double &  min) const

Return the minimum value for this double attribute.

Parameters
[out]minthe 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:
cgFx/cgfxAttrDef.cpp.
MStatus getMin ( double &  min1,
double &  min2 
) const

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

Parameters
[out]min1the minimum value for the first child attribute
[out]min2the 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

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

Parameters
[out]min1the minimum value for the first child attribute
[out]min2the minimum value for the second child attribute
[out]min3the 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 getMin ( double &  min1,
double &  min2,
double &  min3,
double &  min4 
) const

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

Parameters
[out]min1the minimum value for the first child attribute
[out]min2the minimum value for the second child attribute
[out]min3the minimum value for the third child attribute
[out]min4the minimum value for the fourth 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

Return the maximum value for this double attribute.

Parameters
[out]maxthe 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:
cgFx/cgfxAttrDef.cpp.
MStatus getMax ( double &  max1,
double &  max2 
) const

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

Parameters
[out]max1the maximum value for the first child attribute
[out]max2the 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

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

Parameters
[out]max1the maximum value for the first child attribute
[out]max2the maximum value for the second child attribute
[out]max3the 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 getMax ( double &  max1,
double &  max2,
double &  max3,
double &  max4 
) const

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

Parameters
[out]max1the maximum value for the first child attribute
[out]max2the maximum value for the second child attribute
[out]max3the maximum value for the third child attribute
[out]max4the maximum value for the fourth 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

Return the minimum value for this double attribute.

Parameters
[out]minthe 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:
cgFx/cgfxAttrDef.cpp.
MStatus getSoftMax ( double &  max) const

Return the maximum value for this double attribute.

Parameters
[out]maxthe 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:
cgFx/cgfxAttrDef.cpp.
MStatus setMin ( double  min1,
double  min2 
)

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

Parameters
[in]min1the minimum value for the first child attribute
[in]min2the 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 
)

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

Parameters
[in]min1the minimum value for the first child attribute
[in]min2the minimum value for the second child attribute
[in]min3the 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 setMin ( double  min1,
double  min2,
double  min3,
double  min4 
)

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

Parameters
[in]min1the minimum value for the first child attribute
[in]min2the minimum value for the second child attribute
[in]min3the minimum value for the third child attribute
[in]min4the minimum value for the fourth 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 
)

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

Parameters
[in]max1the maximum value for the first child attribute
[in]max2the 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 
)

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

Parameters
[in]max1the maximum value for the first child attribute
[in]max2the maximum value for the second child attribute
[in]max3the 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 setMax ( double  max1,
double  max2,
double  max3,
double  max4 
)

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

Parameters
[in]max1the maximum value for the first child attribute
[in]max2the maximum value for the second child attribute
[in]max3the maximum value for the third child attribute
[in]max4the maximum value for the fourth 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)

Set the soft minimum value for this double attribute.

Parameters
[in]minthe 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:
cgFx/cgfxAttrDef.cpp, clearcoat.cpp, pointOnSubdNode/pointOnSubdNode.cpp, and uiDrawManager/uiDrawManager.cpp.
MStatus setSoftMax ( double  max)

Set the soft maximum value for this double attribute.

Parameters
[in]maxthe 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:
cgFx/cgfxAttrDef.cpp, clearcoat.cpp, depthShader/depthShader.cpp, pointOnSubdNode/pointOnSubdNode.cpp, uiDrawManager/uiDrawManager.cpp, and volumeShader/volumeShader.cpp.
MStatus getDefault ( bool &  def1)

Get the default value for this boolean attribute.

Parameters
[out]def1returns 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)

Get the default value for this character attribute.

Parameters
[out]def1returns 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)

Gets the default value for this integral attribute.

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

Parameters
[out]def1returns 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 
)

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]def1returns the default value for first child of this attribute
[out]def2returns 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 
)

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]def1returns the default value for first child of this attribute
[out]def2returns the default value for second child of this attribute
[out]def3returns 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 ( MInt64 &  def1)

Gets the default value for this integral attribute and returns it as a 64-bit int.

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

Parameters
[out]def1returns 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, int or int64 attribute
MStatus getDefault ( float &  def1)

Gets the default value for this float attribute.

Parameters
[out]def1returns 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 
)

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

Parameters
[out]def1returns the default value for first child of this attribute
[out]def2returns 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 
)

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

Parameters
[out]def1returns the default value for first child of this attribute
[out]def2returns the default value for second child of this attribute
[out]def3returns 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)

Get the default value for this double attribute.

Parameters
[out]def1returns 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 
)

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

Parameters
[out]def1returns the default value for first child of this attribute
[out]def2returns 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 
)

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

Parameters
[out]def1returns the default value for first child of this attribute
[out]def2returns the default value for second child of this attribute
[out]def3returns 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 
)

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

Parameters
[out]def1returns the default value for first child of this attribute
[out]def2returns the default value for second child of this attribute
[out]def3returns the default value for third child of this attribute
[out]def4returns 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)

Get the default value for this address attribute.

Parameters
[out]def1returns 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)

Set a new default value for this boolean attribute.

Parameters
[in]def1new 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:
AbcImport/NodeIteratorVisitorHelper.cpp, anisotropicShader/anisotropicShader.cpp, apiDirectionalLightShape/apiDirectionalLightShape.cpp, backfillShader/backfillShader.cpp, brickShader/brickShader.cpp, buildRotationNode/buildRotationNode.cpp, cellShader/cellShader.cpp, cgFx/cgfxVector.cpp, checkerShader/checkerShader.cpp, clearcoat.cpp, compositingShader/compositingShader.cpp, contrastShader/contrastShader.cpp, customImagePlane/customImagePlane.cpp, cvColorShader/cvColorShader.cpp, depthShader/depthShader.cpp, displacementShader/displacementShader.cpp, dx11Shader/dx11Shader.cpp, dynExprField/dynExprField.cpp, flameShader/flameShader.cpp, footPrintNode_GeometryOverride_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, gameInputDevice/gameInputDevice.cpp, gammaShader/gammaShader.cpp, geomShader/geomShader.cpp, glslShader/GLSLShader.cpp, hwPhongShader/hwPhongShader.cpp, interpShader/interpShader.cpp, lambertShader/lambertShader.cpp, lavaShader/lavaShader.cpp, lightShader/lightShader.cpp, MayaPluginForSpreticle/spReticleLoc.cpp, mixtureShader/mixtureShader.cpp, noiseShader/noiseShader.cpp, onbShader/onbShader.cpp, phongShader/phongShader.cpp, rawfootPrintNode/rawfootPrintNode.cpp, shadowMatteShader/shadowMatteShader.cpp, shellNode/shellNode.cpp, simpleNoiseShader/simpleNoiseShader.cpp, simpleSpring/simpleSpring.cpp, slopeShader/slopeShaderNode.cpp, solidCheckerShader/solidCheckerShader.cpp, torusField/torusField.cpp, transCircleNode/transCircleNode.cpp, transformDrawNode/transformDrawNode.cpp, uiDrawManager/uiDrawManager.cpp, volumeShader/volumeShader.cpp, vp2BlinnShader/vp2BlinnShader.cpp, and yTwistNode/yTwistNode.cpp.
MStatus setDefault ( char  def1)

Set a new default value for this character attribute.

Parameters
[in]def1new 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)

Set a new default value for this integral attribute.

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

Parameters
[in]def1new 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 
)

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]def1new the default value for first child of this attribute
[in]def2new 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 
)

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]def1new the default value for first child of this attribute
[in]def2new the default value for second child of this attribute
[in]def3new 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 ( MInt64  def1)

Set a new default value for this integral attribute.

This method can be used to set default values for byte, short, int or MInt64 attributes.

Parameters
[in]def1new 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, int or int64 attribute
MStatus setDefault ( float  def1)

Set a new default value for this float attribute.

Parameters
[in]def1new 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 
)

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

Parameters
[in]def1new the default value for first child of this attribute
[in]def2new 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 
)

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

Parameters
[in]def1new the default value for first child of this attribute
[in]def2new the default value for second child of this attribute
[in]def3new 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)

Set a new default value for this double attribute.

Parameters
[in]def1new 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 
)

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

Parameters
[in]def1new the default value for first child of this attribute
[in]def2new 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 
)

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

Parameters
[in]def1new the default value for first child of this attribute
[in]def2new the default value for second child of this attribute
[in]def3new 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 
)

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

Parameters
[in]def1new the default value for first child of this attribute
[in]def2new the default value for second child of this attribute
[in]def3new the default value for third child of this attribute
[in]def4new 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)

Set a new default value for this address attribute.

Parameters
[in]def1new 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

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