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

Synopsis

querySubdiv([action=int], [level=int], [relative=boolean])

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

querySubdiv is undoable, NOT queryable, and NOT editable.

Queries a subdivision surface based on a set of query parameters and updates the selection list with the results.

Return value

booleanCommand result

Keywords

subdivision, surface, query

Related

changeSubdivComponentDisplayLevel, changeSubdivRegion, createSubdivRegion, nurbsToSubdiv, polyToSubdiv, refineSubdivSelectionList, subdCollapse, subdToBlind, subdToPoly, subdiv, subdivCrease, subdivDisplaySmoothness

Flags

action, level, relative
Long name (short name) Argument types Properties
action(a) int create
Specifies the query parameter: 1 = find all tweaked verticies at level 2 = find all sharpened vertices at level 3 = find all sharpened edges at level 4 = find all faces at level If the attribute "level" is not specified then the query is applied to the current component display level. If the attribute level is specified then the query is applied to that level, either absolute or relative to the current level based on the "relative" flag state.
level(l) int create
Specify the level of the subdivision surface on which to perform the operation.
relative(r) boolean create
If set, level flag refers to the level relative to the current component display level.

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

# find all tweaked verticies at current level
cmds.querySubdiv( a=1 )

# find all tweaked verticies one level finer than current level
cmds.querySubdiv( a=1, l=1, r=True )

# find all creased verticies at current level
cmds.querySubdiv( a=2 )

# find all creased edges at current level
cmds.querySubdiv( a=3 )

# find all faces at current level.
# You should work with the subdivision surface shape.
#
cmds.querySubdiv( 'subdivShape1', a=4 )

# find all faces at level 1.
#
cmds.querySubdiv( 'subdivShape1', a=4, level=1, relative=False )

# find all faces at the next finest level from the current one.
#
cmds.querySubdiv( 'subdivShape1', a=4, level=1, relative=True )