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

Synopsis

polyQuad([angle=angle], [caching=boolean], [constructionHistory=boolean], [keepGroupBorder=boolean], [keepHardEdges=boolean], [keepTextureBorders=boolean], [name=string], [nodeState=int], [worldSpace=boolean])

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

polyQuad is undoable, queryable, and editable.

Merges selected triangles of a polygonal object into four-sided faces.

Return value

stringThe node name.

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

Related

polyCloseBorder, polyCollapseEdge, polyCollapseFacet, polyDelEdge, polyDelFacet, polyDelVertex, polyMergeEdge, polyMergeFacet, polyMergeVertex, polyReduce, polySewEdge

Flags

angle, caching, constructionHistory, keepGroupBorder, keepHardEdges, keepTextureBorders, name, nodeState, worldSpace
Long name (short name) Argument types Properties
worldSpace(ws) boolean createqueryedit
This flag specifies which reference to use. If "on" : all geometrical values are taken in world reference. If "off" : all geometrical values are taken in object reference.
C: Default is "off".
Q: When queried, this flag returns an int.
angle(a) angle createqueryedit
Angle threshold above which two triangles are not merged.
C: Default is 30 degrees. The range is [0.0, 180.0].
Q: When queried, this flag returns a float.
keepGroupBorder(kgb) boolean createqueryedit
Keep facet group border : If "on", the borders of selected faces are maintained, otherwise the borders of selected facets may be modified.
C: Default is "on".
Q: When queried, this flag returns an int.
keepHardEdges(khe) boolean createqueryedit
Keep hard edges : If "on", the hard edges of selected faces are maintained, otherwise they may be deleted between two triangles.
C: Default is "on".
Q: When queried, this flag returns an int.
keepTextureBorders(ktb) boolean createqueryedit
Keep texture border : If "on", the borders of texture maps are maintained, otherwise the boreders of texture maps may be modified.
C: Default is "on".
Q: When queried, this flag returns an int.
Common flags
name(n) string create
Give a name to the resulting node.
constructionHistory(ch) boolean createquery
Turn the construction history on or off (where applicable). If construction history is on then the corresponding node will be inserted into the history chain for the mesh. If construction history is off then the operation will be performed directly on the object.
Note: If the object already has construction history then this flag is ignored and the node will always be inserted into the history chain.
caching(cch) boolean createedit
Toggle caching for all attributes so that no recomputation is needed
nodeState(nds) int createqueryedit
Defines how to evaluate the node.
  • 0: Normal
  • 1: PassThrough
  • 2: Blocking
  • 3: Internally disabled. Will return to Normal state when enabled
  • 4: Internally disabled. Will return to PassThrough state when enabled
  • 5: Internally disabled. Will return to Blocking state when enabled

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

cmds.polyCube( n='plg1', sx=3, sy=3, sz=3, w=5, h=5, d=5 )
cmds.move( -5, 0, 0 )
cmds.polyCube( n='plg2', sx=3, sy=3, sz=3, w=5, h=5, d=5 )
cmds.move( 5, 0, 0 )
cmds.delete( 'plg1.f[9:17]' )
cmds.polyTriangulate( 'plg1.f[0:44]' )
cmds.delete( 'plg2.f[9:17]' )
cmds.polyTriangulate( 'plg2.f[0:44]' )
cmds.polyMoveVertex( 'plg1.vtx[20:35]', ltz=2.5 )
cmds.polyMoveVertex( 'plg2.vtx[20:35]', ltz=2.5 )

#Only coplanar triangles will be merged.
cmds.polyQuad( 'plg1.f[0:89]', a=0.0 )

#All possible triangles will be merged.
cmds.polyQuad( 'plg2.f[0:89]', a=180.0 )