pymel.core.modeling.polyAppendVertex

static modeling.polyAppendVertex(*args, **kwargs)

Appends a new face to the selected polygonal object. The direction of the normal is given by the vertex order: the face normal points towards the user when the vertices rotate counter clockwise. Note that holes must be described in the opposite direction. Only works with one object selected.

Flags:
Long name (short name) Argument Types Properties
append (a) *, <type ‘float’>, <type ‘float’>, <type ‘float’>, * ../../../_images/create.gif
 

Append a vertex or a point to the selected object, or mark the start of a hole. This flag may also be used in place of the hole, vertexand pointflags. If no argument is passed to the appendflag, then it marks the beginning of a hole (use an empty tuple in Python ‘()’). If one argument is passed, then the argument is considered to be an index into the vertices of the selected object, as with the vertexflag. If three arguments are passed, then it is interpreted as the coordinates of a new point which will be inserted, as with the pointflag.

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. Flag can have multiple arguments, passed either as a tuple or a list.

hole (h) bool ../../../_images/create.gif
 

Add a hole. The following points and edges will define a hole. Note that this flag should be avoided in Python. You may use the appendflag instead and pass an empty tuple ‘()’ to specify the start of a hole. Common flags

name (n) unicode ../../../_images/create.gif
 
Give a name to the resulting node.
point (p) float, float, float ../../../_images/create.gif
 

Adds a new point to the new face. Coordinates of free points are given in the local object reference. Note that this flag should be avoided in Python. You may use the appendflag instead and pass three arguments.

texture (tx) int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies how new faces are mapped. 0 - None; 1 - Normalize; 2 - Unitize C: Default is 0 (no mapping). Q: When queried, this flag returns an int
vertex (v) int ../../../_images/create.gif
 

Adds the given vertex of the selected object to the new face. Note that this flag should be avoided in Python. You may use the appendflag instead and pass one argument.

Derived from mel command maya.cmds.polyAppendVertex

Example:

import pymel.core as pm

pm.polyPlane( sx=3, sy=3 )

# add a new face
pm.polyAppendVertex( a=[6, 10, (.167, .3, -.167), (.167, .3, .167)] )

# add a new holed face
pm.polyAppendVertex( a=[9, 5, (-.167, .3, .167), (-.167, .3, -.167), (), (-.167, .2, .1), (-.167, .1, 0), (-.167, .2, -.1)] )

# connect the two new faces
pm.polyAppendVertex( a=[18, 17, 16, 19] )

# add a new unconnected quad
pm.polyAppendVertex( a=[(-.5, .5, -.5), (.5, .5, -.5), (.5, .5, .5), (-.5, .5, .5)] )

Previous topic

pymel.core.modeling.polyAppend

Next topic

pymel.core.modeling.polyAutoProjection

Core

Core Modules

Other Modules

This Page