Value > Collections > Collection Types > SelectionSetArray Values |
The SelectionSetArray class has only one instance, selectionSets, which is an array of all the named selection sets in the current scene.
The named selection sets correspond to the selection sets in the Named Selection Set drop-down list on the 3ds Max toolbar.
SelectionSet values are mappable.
Also see SelectionSet Values.
Returns number of named selection sets.
Accesses member of collection by named selection set name. set_name can be either a String or Name value.
Accesses member of collection by index number. Indexes start at 1.
Create or replace named selection set with name set_name , which can be either a String or Name value. node_array must be an array of nodes.
Deletes the selection set. The first argument is the selection sets array selectionSets .
The second argument can be the name of the selection set which can be either a String or Name value, or the selection set itself (which is a new option in 3ds Max 9).
The method isDeleted() is valid for named selection sets since 3ds Max 9. See SelectionSet Values for details and examples.
Returns the number of named selection sets as an integer.
Returns the name of the indexed named selection set as a string. <set_index> is 1 based.
Returns the number of nodes in the indexed named selection set as integer. <set_index > is 1 based.
Returns the indexed node in the indexed named selection set as a node. <set_index> and <node_index> are 1 based.
You access an individual selection set by indexing the selectionSets array with its name or index,
You can then use that set just as you would use any other object set in MAXScript, such as selection, objects, lights, etc.
You can use strings or MAXScript names (starting with #) interchangeably as indexes for the selectionSets array, or you can use an integer as an index if you want to loop over all the sets,
You can change, add and delete new Named Selection Sets by using the standard array methods on the selectionSets array: