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

Synopsis

subdiv([currentLevel=boolean], [currentSubdLevel=boolean], [deepestLevel=int], [displayLoad=boolean], [edgeStats=boolean], [faceStats=boolean], [maxPossibleLevel=int], [proxyMode=int], [smallOffsets=boolean])

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

subdiv is undoable, queryable, and NOT editable.

Provides useful information about the selected subdiv or components, such as the deepest subdivided level, the children or parents of the currently selected components, etc.

Return value

None

In query mode, return type is based on queried flag.

Keywords

subdivision, surface, query, level

Related

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

Flags

currentLevel, currentSubdLevel, deepestLevel, displayLoad, edgeStats, faceStats, maxPossibleLevel, proxyMode, smallOffsets
Long name (short name) Argument types Properties
currentLevel(cl) boolean createquery
When queried, this flag returns an integer representing the level of the currently selected subdiv surface component(s). Returns -1, if there are more than one level of CVs are selected, (even if they are from different objects) Returns -2, if there are no input subdiv CVs to process.
currentSubdLevel(csl) boolean createquery
When queried, this flag returns an integer representing the level of the currently selected subdiv surface, regardless of whether components are selected or not. Returns -2, if there are no input subdiv CVs to process.
deepestLevel(dl) int createquery
When queried, this flag returns an integer representing the deepest level to which the queried subdiv surface has been subdivided.
displayLoad(dsl) boolean createquery
When queried, this flag prints the display load of selected subdiv
edgeStats(est) boolean createquery
When queried, this flag prints stats on the current subd.
faceStats(fst) boolean createquery
When queried, this flag prints stats on the current subd.
maxPossibleLevel(mpl) int createquery
When queried, this flag returns an integer representing the maximum possible level to which the queried subdiv surface can been subdivided.
proxyMode(pm) int createquery
When queried, this flag returns an integer representing whether or not the subdivision surface is in "polygon proxy" mode. "Proxy" mode allows the base mesh of a subdivision surface without construction history to be edited using the polygonal editing tools. Returns 1, if the subdivision surface is in "polygon proxy" mode. Returns 0, if the surface is not currently in "proxy" mode, but could be put into "proxy" mode since it has no construction history. (This state is also known as "standard" mode.) Returns 2, if the surface is not in "proxy" mode and cannot be put into proxy mode, as it has construction history.
smallOffsets(so) boolean createquery
When queried, this flag prints the number of subdiv vertices in the hierarchy that have a small enough offset so that the vertex is not required

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

# To find the deepest subdivided level of polyToSubdShape1
#
cmds.subdiv( 'polyToSubdShape1', query=True, deepestLevel=True )
# To find the level of the  selected subdiv CV
#
cmds.select( 'polyToSubdShape1.smp[2][67108865]', r=True)
cmds.subdiv( currentLevel=True )
# Result: 1 #