pymel.core.modeling.querySubdiv

querySubdiv(*args, **kwargs)

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

Flags:

Long Name / Short Name Argument Types Properties
action / a int ../../../_images/create.gif
  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 levelis 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 relativeflag state.
level / l int ../../../_images/create.gif
  Specify the level of the subdivision surface on which to perform the operation.
relative / r bool ../../../_images/create.gif
  If set, level flag refers to the level relative to the current component display level. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.querySubdiv

Example:

import pymel.core as pm

# find all tweaked verticies at current level
pm.querySubdiv( a=1 )
# find all tweaked verticies one level finer than current level
pm.querySubdiv( a=1, l=1, r=True )
# find all creased verticies at current level
pm.querySubdiv( a=2 )
# find all creased edges at current level
pm.querySubdiv( a=3 )
# find all faces at current level.
# You should work with the subdivision surface shape.
#
pm.querySubdiv( 'subdivShape1', a=4 )
# find all faces at level 1.
#
pm.querySubdiv( 'subdivShape1', a=4, level=1, relative=False )
# find all faces at the next finest level from the current one.
#
pm.querySubdiv( 'subdivShape1', a=4, level=1, relative=True )