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

Synopsis

itemFilterType [-defineTemplate string] [-edit] [-exists] [-query] [-text string] [-type] [-useTemplate string] filterName

itemFilterType is undoable, queryable, and editable.

This command queries a named itemFilter object. This object can be attached to selectionConnection objects, or to editors, in order to filter the item lists going through them. Using union and intersection filters, complex composite filters can be created.

Flags

defineTemplate, edit, exists, query, text, type, useTemplate
Long name (short name) [argument types] Properties
-query(-q) query
Puts the command in query mode so that it will return the value of the specified flag.

In query mode, this flag needs a value.

-edit(-e) edit
Puts the command in edit mode so that it will change the values of the specified flags
-exists(-ex) create
Returns true|false depending upon whether the specified object exists. Other flags are ignored.
-defineTemplate(-dt) string create
Puts a command in a mode where any other flags and args are parsed and added to the command template specified in the argument. They will be used as default arguments in any subsequent invocations of the command when templateName is set as the current template.
-useTemplate(-ut) string create
Will force the command to use a command template other than the current one.
-type(-typ) query
Query the type of the filter object. Possible return values are: itemFilter, attributeFilter, renderFilter, or unknownFilter.

In query mode, this flag needs a value.

-text(-t) string queryedit
Defines an annotation string to be stored with the filter

In query mode, this flag needs a value.


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

Return value


string or string[]

MEL examples

//    Create a filter that will pass all spot lights and transforms.
//
string $filter = `itemFilter -byType transform -byType spotLight`;

//    Now query the type of the filter.
//
string $type = `itemFilterType -query -type $filter`;
print ("Filter type: " + $type + "\n");

//    Delete the filter.
//
delete $filter;