pymel.core.rendering.lsThroughFilter¶
- lsThroughFilter(*args, **kwargs)¶
List all objects in the world that pass a given filter.
- Modifications:
- returns an empty list when the result is None
- returns wrapped classes
Flags:
Long Name / Short Name Argument Types Properties item / it unicode
Run the filter on specified node(s), using the fast version of this command. nodeArray / na bool
Fast version that runs an entire array of nodes through the filter at one time. reverse / rv bool
Only available in conjunction with nodeArray flag. Reverses the order of nodes in the returned arrays if true. selection / sl bool
Run the filter on selected nodes only, using the fast version of this command. sort / so unicode
Only available in conjunction with nodeArray flag. Orders the nodes in the returned array. Current options are: byName, byType, and byTime. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.lsThroughFilter
Example:
import pymel.core as pm # Return all objects in the model that are named bob. # (See the command "itemFilter" for how to construct these filters.) pm.lsThroughFilter( 'texturesNamedBobFilter' ) # Return same objects as above, but sorted in reverse # alphabetical order: pm.lsThroughFilter( 'texturesNamedBobFilter', na=True, sort='byName', reverse=True )