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


itemFilterType( string , [text=string], [type=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

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.

Return value


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


text, type
Long name (short name) Argument types Properties
type(typ) boolean query
Query the type of the filter object. Possible return values are: itemFilter, attributeFilter, renderFilter, or unknownFilter.
text(t) string queryedit
Defines an annotation string to be stored with the filter

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.

Python examples

import maya.cmds as cmds

#    Create a filter that will pass all spot lights and transforms.
filter = cmds.itemFilter(byType=('transform', 'spotLight'))

#    Now query the type of the filter.
type = cmds.itemFilterType(filter, q=True, type=True)
print( 'Filter type: ' + type + '\n' )

#    Delete the filter.
cmds.delete( filter )