MSelection 与 MItSelection
In Maya, we are dealing with a bunch of objects, then, the most basic method is to use the ls command
So in the API, we can use MSelectionList, MSelectionList can store objects or nodes bunch of us, we can be processed by accessing content inside it, we can use MSelectionList to store the elements we need,
MSelectionList: no significant relationship with the choice, can be used directly as a ObjectList, just a list of storage nodes or objects. The list is not an option, just an ordinary list of nodes.
Storing a list of objects (list non-selected objects) of Maya, node attributes may be stored, as well as other objects Maya
Common methods:
add (MObject、MDagPath、MString、MPlug、MUuid)
remove: remove a node
merge: Merge List
intersect: intersection
getSelectionStrings
MItSelectinList
SelectionList iterator for visiting each MSelectionList in the project
Common methods:
next: The next visit has been an element in it
reset: return to a position, resume
itemType: Gets the type of element
getDagPath: get inside DagPath
getDependNode: get inside MObject