class MFnPartition

Jump to documentation

: public MFnDependencyNode Function Partition for Partitions of Objects. (OpenMaya) (OpenMaya.py)

Inheritance:

MFnPartition < MFnDependencyNode < MFnBase

public members:

MFnPartition ()
MFnPartition ( MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnPartition ()
virtual MFn::Type type () const
enum Restriction
kNone
kVerticesOnly
kEdgesOnly
kFacetsOnly
kEditPointsOnly
kRenderableOnly
MObject create ( bool isRenderPartition = false, MStatus * ReturnStatus = NULL )
bool isRenderPartition ( MStatus * ReturnStatus = NULL ) const
MStatus addMember ( const MObject &set )
MStatus removeMember ( const MObject &set )
MFnPartition ( const MObject & object, MStatus * ReturnStatus = NULL )

Inherited from MFnDependencyNode:

public members:

virtual MFn::Type type () const
enum MAttrClass
kGlobalDynamicAttr
kLocalDynamicAttr
MObject create ( const MTypeId & typeId , MStatus * ReturnStatus = NULL )
MObject create ( const MTypeId & typeId , const MString & name , MStatus * ReturnStatus = NULL )
MObject create ( const MString & type , MStatus * ReturnStatus = NULL )
MObject create ( const MString & type , const MString & name , MStatus * ReturnStatus = NULL )
MTypeId typeId ( MStatus * ReturnStatus = NULL ) const
MString typeName ( MStatus * ReturnStatus = NULL ) const
MString name ( MStatus * ReturnStatus = NULL ) const
MString setName ( const MString & name , MStatus * ReturnStatus = NULL )
MStatus getConnections ( MPlugArray & array ) const
unsigned int attributeCount ( MStatus * ReturnStatus=NULL) const
MObject attribute ( unsigned int index, MStatus * ReturnStatus=NULL) const
MObject reorderedAttribute ( unsigned int index, MStatus * ReturnStatus=NULL) const
MObject attribute ( const MString & attrName, MStatus * ReturnStatus=NULL) const
MAttrClass attributeClass ( const MObject & attr, MStatus * ReturnStatus=NULL) const
MStatus getAffectedAttributes ( const MObject & attr, MObjectArray & affectedAttributes ) const
MStatus getAffectedByAttributes ( const MObject & attr, MObjectArray & affectedByAttributes ) const
MPlug findPlug ( const MObject & attr, bool wantNetworkedPlug, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MString & attrName, bool wantNetworkedPlug, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MObject & attr, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MString & attrName, MStatus * ReturnStatus=NULL) const
MStatus addAttribute ( const MObject & attr, MAttrClass type = kLocalDynamicAttr )
MStatus removeAttribute ( const MObject & attr, MAttrClass type = kLocalDynamicAttr )
MPxNode * userNode ( MStatus * ReturnStatus=NULL ) const
bool isFromReferencedFile ( MStatus * ReturnStatus=NULL) const
bool isShared ( MStatus * ReturnStatus=NULL) const
bool hasUniqueName ( MStatus * ReturnStatus=NULL) const
MString parentNamespace ( MStatus * ReturnStatus=NULL) const
bool isLocked ( MStatus * ReturnStatus=NULL) const
MStatus setLocked ( bool locked )
static MString classification ( const MString & nodeTypeName )
bool isNewAttribute ( const MObject & attr, MStatus * ReturnStatus=NULL) const
static unsigned int allocateFlag ( const MString pluginName, MStatus * ReturnStatus=NULL )
static MStatus deallocateFlag (const MString pluginName, unsigned int flag)
static MStatus deallocateAllFlags (const MString pluginName)
MStatus setFlag (unsigned int flag, bool state)
bool isFlagSet (unsigned int flag, MStatus * ReturnStatus=NULL) const
bool isDefaultNode ( MStatus * ReturnStatus=NULL) const
MStatus setDoNotWrite ( bool flag )
bool canBeWritten ( MStatus * ReturnStatus=NULL) const
bool hasAttribute (const MString & name , MStatus * ReturnStatus=NULL) const
MObject getAliasAttr (bool force, MStatus * ReturnStatus=NULL)
bool setAlias (const MString & alias,const MString & name , const MPlug & plug, bool add=true, MStatus * ReturnStatus=NULL)
bool findAlias (const MString & alias, MObject & attrObj, MStatus * ReturnStatus=NULL) const
bool getAliasList ( MStringArray & strArray, MStatus * ReturnStatus=NULL)
MString plugsAlias (const MPlug & plug, MStatus * ReturnStatus=NULL)
public
bool getPlugsAlias (const MPlug & plug, MString & aliasName, MStatus * ReturnStatus=NULL)

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 partition for partitions of objects
Description

MFnPartition is the function partition that is used for manipulating partitions of objects. Partitions in Maya are dependency nodes, so it is possible for one partition to contain others.

A partition is a list of dependency nodes and dag nodes. Partitions are useful for keeping track of lists of objects for many purposes such as selection or applying common rendering parameters. Partitions in Maya are also dependency nodes, so it is possible for one partition to contain others.

Functions

MFnPartition:: MFnPartition ()

Description

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

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

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

MFnPartition:: ~MFnPartition ()

Description

The class destructor.

MFn::Type MFnPartition:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kPartition

MObject MFnPartition:: create ( bool isRenderPartition , MStatus * ReturnStatus )

Description

Creates a new partition dependency node and puts it in the dependency graph.

Arguments

  • isRenderPartition determines whether this partition is a render partition
  • ReturnStatus return status

Return Value

  • a handle for the new partition object

Status Codes

  • MS::kSuccess operation successful
  • MS::kInsufficientMemory out of memory
  • MS::kLicenseFailure application not licensed for attempted operation

bool MFnPartition:: isRenderPartition ( MStatus * ReturnStatus ) const

Description

Returns true if this partition is a render partition.

Arguments

  • ReturnStatus return status

Return Value

  • a boolean value indicating whether the object is a member

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function partition does not have a valid partition object

MStatus MFnPartition:: addMember ( const MObject & set )

Description

Add a set to this partition. To be added to a partition, a set must be mutually exclusive with all of the other sets in the partition. If there are any conflicting elements, then the add will fail.

Arguments

  • set new set to be added to this partiton.

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure addition failed due to conflicting set member or that this function set does not have a valid object
  • MS::kInvalidParameter argument is not a set
  • MS::kInsufficientMemory out of memory

MStatus MFnPartition:: removeMember ( const MObject & set )

Description

Remove a set from this partition.

Arguments

  • set old set to be removed from this partiton.

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure removal failed due to set not being in the partition or because this function set does not have a valid object
  • MS::kInvalidParameter argument is not a set
  • MS::kInsufficientMemory out of memory

This class has no child classes.


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