Go to: Synopsis. Return value. Related. Flags. Python examples.
filterInstances([shapes=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
filterInstances is undoable, queryable, and NOT editable.
This command filters the selection list to remove duplicate instances that refer to the same object/components. If any such instances are found they will be merged with the first selected instance. Returns a string array containing all matching selection items or true/false if the query flag is used.string[] | Command result |
In query mode, return type is based on queried flag.
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
shapes(s)
|
boolean
|
|||
|
Flag can appear in Create mode of command | Flag can appear in Edit mode of command |
Flag can appear in Query mode of command | Flag can have multiple arguments, passed either as a tuple or a list. |
import maya.cmds as cmds # Returns true if any selected object(s) are instances of another selected object. cmds.filterInstances( q=True ) # Returns a new selection list with duplicate instances removed. cmds.filterInstances()