Based on selected components (or components specified on the command line), the command filters and/or expands the list given the options. Returns a string array containing all matching selection items. Selection masks are as follows: Object TypeMaskHandle0Nurbs Curves9Nurbs Surfaces10Nurbs Curves On Surface11Polygon12Locator XYZ22Orientation Locator23Locator UV24Control Vertices (CVs)28Edit Points30Polygon Vertices31Polygon Edges32Polygon Face34Polygon UVs35Subdivision Mesh Points36Subdivision Mesh Edges37Subdivision Mesh Faces38Curve Parameter Points39Curve Knot40Surface Parameter Points41Surface Knot42Surface Range43Trim Surface Edge44Surface Isoparms45Lattice Points46Particles47Scale Pivots49Rotate Pivots50Select Handles51Subdivision Surface68Polygon Vertex Face70NURBS Surface Face72Subdivision Mesh UVs73
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
expand (ex) | bool | ||
|
|||
fullPath (fp) | bool | ||
If this is true and the selection item is a DAG object, return its full selection path, instead of the name of the object only when this value is false. Default is false.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
selectionMask (sm) | int | ||
|
Derived from mel command maya.cmds.filterExpand
Example:
import pymel.core as pm
# Returns any selected isoparms (mask 45) as individual items
# (because of "ex=True").
pm.filterExpand( ex=True, sm=45 )
# Returns any selected CVs (mask 28) as compact items. For example,
# if curve.cv[0:3] is selected, then "curve.cv[0:3]" is returned.
# If "ex=True", then four items are returned, one for each CV.
pm.filterExpand( ex=False, sm=28 )
# Returns any selected CVs (mask 28) and edit points (mask 30).
pm.filterExpand( sm=(28,30) )
# Returns any selected nurbs curves.
pm.filterExpand( sm=9 )
# Returns any selected nurbs curves-on-surface.
pm.filterExpand( sm=11 )
# return the poly faces (mask 34) from the specified arguments
pm.filterExpand(["pCube1.f[1]","pCube1.f[4]","pCube1.vtx[0:3]"], sm=34)