pymel.core.modeling.polyQuad

polyQuad(*args, **kwargs)

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

Flags:
Long name (short name) Argument Types Properties
angle (a) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
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.
caching (cch) bool ../../../_images/create.gif ../../../_images/edit.gif
 
Toggle caching for all attributes so that no recomputation is needed
constructionHistory (ch) bool ../../../_images/create.gif ../../../_images/query.gif
 

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.

keepGroupBorder (kgb) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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) unicode ../../../_images/create.gif
 
Give a name to the resulting node.
nodeState (nds) int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

Defines how to evaluate the node. 0: Normal1: PassThrough2: Blocking3: Internally disabled. Will return to Normal state when enabled4: Internally disabled. Will return to PassThrough state when enabled5: Internally disabled. Will return to Blocking state when enabledFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

worldSpace (ws) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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.

Derived from mel command maya.cmds.polyQuad

Example:

import pymel.core as pm

import maya.cmds as cmds

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

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

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

Previous topic

pymel.core.modeling.polyPyramid

Next topic

pymel.core.modeling.polyQueryBlindData

Core

Core Modules

Other Modules

This Page