pymel.core.modeling.polyMirrorFace

polyMirrorFace(*args, **kwargs)

Mirror all the faces of the selected object.

Flags:

Long Name / Short Name Argument Types Properties
axis / a int  
   
axisDirection / ad int  
   
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.
cutMesh / cm bool  
   
direction / d int ../../../_images/create.gif
  This flag specifies the mirror direction. C: Default is 0
firstNewFace / fnf int  
   
flipUVs / fuv int  
   
frozen / fzn bool  
   
lastNewFace / lnf int  
   
mergeMode / mm int ../../../_images/create.gif
  This flag specifies the behaviour of the mirror with respect to the border edges. Valid values are 0-5, corresponding to +X, -X, +Y, -Y, +Z, -Z direction respectively. If the mode is 0, the border edges will not be merged (co-incident vertices will be present). If the mode is 1, the border vertices/edges will be merged If the mode is 2, the border edges will be extruded and connected. C: Default is 0
mergeThreshold / mt float ../../../_images/create.gif
  This flag specifies the tolerance value for merging borders. C: Default is 0.1
mergeThresholdType / mtt int ../../../_images/create.gif
  This flag specifies if the merge threshold is calculated automatically based on the average length of the border edges.
mirrorAxis / ma int ../../../_images/create.gif
  This flag specifies what method to use to define the mirror axis
mirrorPlaneCenter / pc float, float, float  
   
mirrorPlaneCenterX / pcx float  
   
mirrorPlaneCenterY / pcy float  
   
mirrorPlaneCenterZ / pcz float  
   
mirrorPosition / mps float ../../../_images/create.gif
  This flag specifies the position of the custom mirror axis plane
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 have multiple arguments, passed either as a tuple or a list.
pivot / p float, float, float ../../../_images/create.gif
  This flag specifies the pivot for the mirror. C: Default is computed using the bounding box of the object
pivotX / px float ../../../_images/create.gif
  This flag specifies the X pivot for the mirror. C: Default is computed using the bounding box of the object
pivotY / py float ../../../_images/create.gif
  This flag specifies the Y pivot for the mirror. C: Default is computed using the bounding box of the object
pivotZ / pz float ../../../_images/create.gif
  This flag specifies the Z pivot for the mirror. C: Default is computed using the bounding box of the object
scalePivotX / spx float  
   
scalePivotY / spy float  
   
scalePivotZ / spz float  
   
smoothingAngle / sa float  
   
userSpecifiedPivot / pu bool  
   
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. Common flags

Derived from mel command maya.cmds.polyMirrorFace

Example:

import pymel.core as pm

# Mirror about +X direction by merging the border vertices
pm.polyCube( name='poly1' )
pm.delete( 'poly1.f[4]' )
pm.polyMirrorFace( 'poly1', direction=0, mergeMode=1 )

# Mirror about +Y direction by connecting the border edges
# in world reference, by explicitly specifying a pivot point (0, 2, 0)
pm.polyCube( name='poly2' )
pm.delete( 'poly2.f[4]' )
pm.rotate( 0, 0, 45, 'poly2', r=True, os=True )
pm.polyMirrorFace( 'poly2', direction=2, p=(0, 2, 0), mergeMode=2, worldSpace=1 )