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

Synopsis

filterExpand([expand=boolean], [fullPath=boolean], [selectionMask=int], [symActive=boolean], [symNegative=boolean], [symPositive=boolean], [symSeam=boolean])

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

filterExpand is undoable, NOT queryable, and NOT editable.

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 Type Mask
Handle 0
Nurbs Curves 9
Nurbs Surfaces 10
Nurbs Curves On Surface 11
Polygon 12
Locator XYZ 22
Orientation Locator 23
Locator UV 24
Control Vertices (CVs) 28
Edit Points 30
Polygon Vertices 31
Polygon Edges 32
Polygon Face 34
Polygon UVs 35
Subdivision Mesh Points 36
Subdivision Mesh Edges 37
Subdivision Mesh Faces 38
Curve Parameter Points 39
Curve Knot 40
Surface Parameter Points 41
Surface Knot 42
Surface Range 43
Trim Surface Edge 44
Surface Isoparms 45
Lattice Points 46
Particles 47
Scale Pivots 49
Rotate Pivots 50
Select Handles 51
Subdivision Surface 68
Polygon Vertex Face 70
NURBS Surface Face 72
Subdivision Mesh UVs 73

Return value

string[]Command result

Related

selectType

Flags

expand, fullPath, selectionMask, symActive, symNegative, symPositive, symSeam
Long name (short name) Argument types Properties
expand(ex) boolean create
Each item is a single entity if this is true. Default is true.
fullPath(fp) boolean create
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.
selectionMask(sm) int createmultiuse
Specify the selection mask
symActive(sma) boolean create
If symmetry is enabled only return the components on the active symmetry side of the object. This flag has no effect if symmetry is not active.
symNegative(smn) boolean create
If symmetry is enabled only return the components on the negative side of the object relative to the current symmetry plane. This flag has no effect if symmetry is not active.
symPositive(smp) boolean create
If symmetry is enabled only return the components on the positive side of the object relative to the current symmetry plane. This flag has no effect if symmetry is not active.
symSeam(sms) boolean create
If symmetry is enabled only return the components that lie equally on both sides of the object relative to the current symmetry plane. This flag has no effect if symmetry is not active.

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

# Returns any selected isoparms (mask 45) as individual items
# (because of "ex=True").
cmds.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.
cmds.filterExpand( ex=False, sm=28 )

# Returns any selected CVs (mask 28) and edit points (mask 30).
cmds.filterExpand( sm=(28,30) )

# Returns any selected nurbs curves.
cmds.filterExpand( sm=9 )

# Returns any selected nurbs curves-on-surface.
cmds.filterExpand( sm=11 )

# return the poly faces (mask 34) from the specified arguments
cmds.filterExpand(["pCube1.f[1]","pCube1.f[4]","pCube1.vtx[0:3]"], sm=34)