Go to: Synopsis. Return value. Flags. Python examples.
lsThroughFilter(
string
, [item=string], [nodeArray=boolean], [reverse=boolean], [selection=boolean], [sort=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
lsThroughFilter is undoable, NOT queryable, and NOT editable.
List all objects in the world that pass a given filter.
item, nodeArray, reverse, selection, sort
Long name (short name) |
Argument types |
Properties |
|
item(it)
|
string
|
|
|
Run the filter on specified node(s), using the fast
version of this command.
|
|
nodeArray(na)
|
boolean
|
|
|
Fast version that runs an entire array of
nodes through the filter at one time.
|
|
reverse(rv)
|
boolean
|
|
|
Only available in conjunction with nodeArray flag.
Reverses the order of nodes in the returned arrays if true.
|
|
selection(sl)
|
boolean
|
|
|
Run the filter on selected nodes only, using the fast
version of this command.
|
|
sort(so)
|
string
|
|
|
Only available in conjunction with nodeArray flag.
Orders the nodes in the returned array. Current options are:
"byName", "byType", and "byTime".
|
|
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
# Return all objects in the model that are named bob.
# (See the command "itemFilter" for how to construct these filters.)
cmds.lsThroughFilter( 'texturesNamedBobFilter' )
# Return same objects as above, but sorted in reverse
# alphabetical order:
cmds.lsThroughFilter( 'texturesNamedBobFilter', na=True, sort='byName', reverse=True )