pymel.core.modeling.polyReduce

polyReduce(*args, **kwargs)

Reduce a polygonal object.

Flags:
Long name (short name) Argument Types Properties
border (b) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

This flag specifies the degree to which vertices along the geometric border are to be preserved. It has effect only if the -keepBorder flag is set to false. A value of 1.0 results in no special effort being made to preserve any border vertices. A value of 0 results in all border vertices being preserved. C: Default is .5, range is [0,1]. 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
cachingReduce (cr) bool  
   
colorWeights (cwt) float  
   
compactness (com) float  
   
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.

detail (d) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

This flag specifies how much of the reduced geometry should be dedicated to preserving regions of high curvature. A value of 1.0 will result in relatively equal distribution of vertices and faces regardless of curvature. A value of 0 will concentrate the detail in areas of high curvature. This value is ignored when -keepHardEdge is set to false. C: Default is .5, range is [0,1]. Q: When queried, this flag returns a float.

geomWeights (gwt) float  
   
keepBorder (kb) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
If true, vertices on border will not be modified. C: Default is false. Q: When queried, this flag returns a boolean.
keepHardEdge (khe) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
If true, vertices on hard edges will not be modified. C: Default is false. Q: When queried, this flag returns a boolean.
keepMapBorder (kmb) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
If true, vertices on UV border will not be modified. C: Default is false. Q: When queried, this flag returns a boolean.
keepOriginalVertices (kev) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

If true, vertices will retain their original positions and will not be repositioned for optimal shape C: Default is false. Q: When queried, this flag returns a boolean.

keepQuadsWeight (kqw) float  
   
line (l) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

This flag specifies the degree to which feature lines(edges joining faces with sharp geometric angles between them) are to be preserved. A value of 1.0 results in no special effort being made to preserve such features. A value of 0 results in the greatest possible effort to preserve such features. C: Default is .5, range is [0,1]. Q: When queried, this flag returns a float.

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.

percentage (p) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

This flag specifies what percentage of vertices have to be removed from the original object. C: Default is 100. 0 will remove as many vertices as possible. Q: When queried, this flag returns a float.

replaceOriginal (rpo) bool ../../../_images/create.gif
 

Create in place(i.e., replace) (not available in all commands). NOTE: This flag is intended for use by the Reducemenu item. If ‘polyReduce -rpo 0’ is executed from the command line, Shader information will not be copied from the original mesh to the result. Common flags

triangulate (t) bool  
   
uvWeights (uwt) float  
   
weightCoefficient (wc) float  
   

Derived from mel command maya.cmds.polyReduce

Example:

import pymel.core as pm

pm.polySphere( n='plg' )
pm.polyReduce( 'plg.f[0:399]', p=35 )

Previous topic

pymel.core.modeling.polyQueryBlindData

Next topic

pymel.core.modeling.polySelect

Core

Core Modules

Other Modules

This Page