Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

filterInstances [-shapes]

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.

Return value

string[]Command result

In query mode, return type is based on queried flag.

Related

filterExpand

Flags

shapes
Long name (short name) Argument types Properties
-shapes(-s) create
If this is true then the command will check for an instanced shapes below the selected transform(s) and use them to decide whether the parent transforms should be considered instances. Default is false.

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 be used more than once in a command.

MEL examples

// Returns true if any selected object(s) are instances of another selected object.
filterInstances -q;

// Returns a new selection list with duplicate instances removed.
filterInstances;