#include <MFnSet.h>
MFnSet is the function set that is used for manipulating sets of objects. Sets in Maya are dependency nodes, so it is possible for one set to contain others.
A set is a list of dependency nodes and dag nodes. Sets are useful for keeping track of lists of objects for many purposes such as selection or applying common rendering parameters. Sets in Maya are also dependency nodes, so it is possible for one set to contain others.
Public Types | |
enum | Restriction { kNone, kVerticesOnly, kEdgesOnly, kFacetsOnly, kEditPointsOnly, kRenderableOnly } |
Set membership restrictions. More... | |
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. | |
virtual | ~MFnSet () |
Destructor. | |
MFnSet () | |
Default constructor. | |
MFnSet (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
MObject | create (const MSelectionList &members, Restriction restriction=kNone, MStatus *ReturnStatus=NULL) |
MStatus | getUnion (const MObject &withSet, MSelectionList &result) |
MStatus | getUnion (const MObjectArray &setList, MSelectionList &result) |
MStatus | getIntersection (const MObject &withSet, MSelectionList &result) |
MStatus | getIntersection (const MObjectArray &setList, MSelectionList &result) |
MStatus | clear () |
MStatus | getMembers (MSelectionList &members, bool flatten) const |
MStatus | addMember (const MObject &obj) |
MStatus | addMember (const MDagPath &obj, const MObject &component=MObject::kNullObj) |
MStatus | addMember (const MPlug &plug) |
MStatus | addMembers (const MSelectionList &list) |
MStatus | removeMember (const MObject &obj) |
MStatus | removeMember (const MDagPath &obj, const MObject &component) |
MStatus | removeMember (const MPlug &plug) |
MStatus | removeMembers (const MSelectionList &list) |
bool | isMember (const MObject &object, MStatus *ReturnStatus=NULL) const |
bool | isMember (const MDagPath &object, const MObject &component=MObject::kNullObj, MStatus *ReturnStatus=NULL) const |
bool | isMember (const MPlug &plug, MStatus *ReturnStatus=NULL) const |
bool | intersectsWith (const MObject &otherSet, MStatus *ReturnStatus=NULL) const |
bool | hasRestrictions (MStatus *ReturnStatus=NULL) const |
Restriction | restriction (MStatus *ReturnStatus=NULL) const |
MString | annotation (MStatus *ReturnStatus=NULL) const |
MStatus | setAnnotation (const MString &annotation) |
MFnSet (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
Protected Member Functions | |
virtual const char * | className () const |
Class name. |
enum MFnSet::Restriction |
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 MFnSet::type | ( | ) | const [virtual] |
Function set type.
Return the class type : MFn::kSet
Reimplemented from MFnDependencyNode.
Reimplemented in MFnCharacter.
const char * MFnSet::className | ( | ) | const [protected, virtual] |
Class name.
Return the class name : "MFnSet"
Reimplemented from MFnDependencyNode.
Reimplemented in MFnCharacter.
MObject MFnSet::create | ( | const MSelectionList & | members, | |
Restriction | restriction = kNone , |
|||
MStatus * | ReturnStatus = NULL | |||
) |
Creates a new set dependency node and puts it in the dependency graph.
[in] | members | list of members for new set |
[in] | restriction | restriction applied to members |
[out] | ReturnStatus | return status |
MStatus MFnSet::getUnion | ( | const MObject & | withSet, | |
MSelectionList & | result | |||
) |
This method calculates the union of two sets. The result will be the union of this set and the set passed into the method.
[in] | withSet | set to find union of with this set |
[out] | result | storage for the result of the union operation |
MStatus MFnSet::getUnion | ( | const MObjectArray & | setList, | |
MSelectionList & | result | |||
) |
This method calculates the union of a list of sets. The result will be the union of this set and the sets passed into the method.
[in] | setList | sets to find union of with this set |
[out] | result | storage for the result of the union operation |
MStatus MFnSet::getIntersection | ( | const MObject & | withSet, | |
MSelectionList & | result | |||
) |
This method calculates the intersection of two sets. The result will be the intersection of this set and the set passed into the method.
[in] | withSet | set to find intersection of with this set |
[out] | result | storage for the result of the intersection operation |
MStatus MFnSet::getIntersection | ( | const MObjectArray & | setList, | |
MSelectionList & | result | |||
) |
This method calculates the intersection of a list of sets. The result will be the intersection of this set and the sets passed into the method.
[in] | setList | sets to find intersection of with this set |
[out] | result | storage for the result of the intersection operation |
MStatus MFnSet::clear | ( | ) |
Removes all elements from this set
MStatus MFnSet::getMembers | ( | MSelectionList & | members, | |
bool | flatten | |||
) | const |
Get the members of this set as a selection list. This information is provided as a selection list so that all of the path information is retained for DAG nodes.
It is possible to ask for the returned list to be flattened. This means that all sets that exist inside this set will be expanded into a list of their contents.
[out] | members | storage for the returned list of members |
[in] | flatten | whether to flatten the returned list. |
Add a new object (dependency node) to the set.
[in] | obj | the object to add |
MStatus MFnSet::addMember | ( | const MDagPath & | obj, | |
const MObject & | component = MObject::kNullObj | |||
) |
Add a new object (DAG node) to the set.
[in] | obj | the object to add |
[in] | component | the selection component |
Add a new plug to the set.
[in] | plug | the plug to add |
MStatus MFnSet::addMembers | ( | const MSelectionList & | list | ) |
Add a list of new objects to the set.
[in] | list | the list of objects as a selection list |
Remove an object (dependency node) from the set.
[in] | obj | the object to remove |
Remove an object (DAG node) from the set.
[in] | obj | the object to remove |
[in] | component | the selection component |
Remove an plug from the set.
[in] | plug | the plug to remove |
MStatus MFnSet::removeMembers | ( | const MSelectionList & | list | ) |
Remove items of the selection list from the set.
[in] | list | the selection list of items to remove |
Returns true if the given object (dependency node) is a member of this set
[in] | object | object to test for membership |
[out] | ReturnStatus | return status |
bool MFnSet::isMember | ( | const MDagPath & | object, | |
const MObject & | component = MObject::kNullObj , |
|||
MStatus * | ReturnStatus = NULL | |||
) | const |
Returns true if the given object (DAG node) is a member of this set
[in] | object | object to test for membership |
[in] | component | selection component (optional) |
[out] | ReturnStatus | return status |
Returns true if the given plug is a member of this set
[in] | plug | plug to test for membership |
[out] | ReturnStatus | return status |
Returns true if this set intersects with the given set. An intersection occurs if there are any common members between the two sets.
[in] | otherSet | set to test for intersection with |
[out] | ReturnStatus | return status |
bool MFnSet::hasRestrictions | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns true if this function set has restrictions on the type of objects that it may contain.
[out] | ReturnStatus | return status |
MFnSet::Restriction MFnSet::restriction | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the type of membership restriction that this set has.
[out] | ReturnStatus | return status |
Returns the annotation string for this set. This allows a description of the set to be stored with it.
[out] | ReturnStatus | return status |
Sets the annotation string for this set. This allows a description of the set to be stored with it.
[in] | annotation | new annotation string |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |