Go to: Synopsis. Return value. Related. Flags. Python examples.
polyAppend([append=[float, float, float]], [constructionHistory=boolean], [edge=int], [hole=boolean], [name=string], [point=[float, float, float]], [subdivision=int], [texture=int])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
polyAppend is undoable, queryable, and editable.
Appends a new face to the selected polygonal object.
The first argument must be a border edge.
The new face will be automatically closed.
Only works with one object selected.
In query mode, return type is based on queried flag.
polyAppendVertex, polyBevel, polyChipOff, polyCreateFacet, polyExtrudeEdge, polyExtrudeFacet, polySmooth, polySplit, polySplitVertex, polySubdivideEdge, polySubdivideFacet, polyTriangulate
append, constructionHistory, edge, hole, name, point, subdivision, texture
Long name (short name) |
Argument types |
Properties |
edge(ed)
|
int
|
|
|
Adds the given edge of the selected object to the new face.
This edge must be a border, which will be then shared by the
new face and the neighboring one. The new face is oriented according
to the orientation of the given edge(s).
Note that this flag should be avoided in Python. You may use the "append"
flag instead and pass one argument.
|
|
point(p)
|
[float, float, float]
|
|
|
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 "append"
flag instead and pass three arguments.
|
|
texture(tx)
|
int
|
|
|
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
|
|
subdivision(s)
|
int
|
|
|
This flag specifies the level of subdivisions.
Automatically subdivides new edges into the given number of edges.
Existing edges cannot be subdivided.
C : Default is 1 (no subdivision).
Q: When queried, this flag returns an int.
|
|
hole(hl)
|
boolean
|
|
|
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 "append"
flag instead and pass an empty tuple ().
|
|
append(a)
|
[float, float, float]
|
|
|
Appends to the given polygon object. The append flag should be used
multiple times to specify the edges, points, and holes that make up the new
face that is being added.
You may specify an edge by passing a single argument which will be the edges
index. A point is specified with three arguments which are the coordinates
of the point in the objects local space. Pass no arguments indicates that
the values which follow shall specify a hole. In Python, pass an empty
tuple to specify no arguments.
|
|
Common flags |
name(n)
|
string
|
|
|
Give a name to the resulting node.
|
|
constructionHistory(ch)
|
boolean
|
|
|
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 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.
|
import maya.cmds as cmds
cmds.polyCreateFacet( p=[(0, 0, 0), (10, 0, 0), (10, 10, 0), (0, 10, 0)] )
#add a new triangular facet described by the edge #0, and a free point
cmds.polyAppend( a=[0, (5, -5, 0)] )
#add a new quadrangular facet with 2 triangular holes.
cmds.polyAppend( a=[1, (20, 0, 0), (20, 10, 0), (), (12, 6, 0), (14, 5, 0), (12, 4, 0), (), (16, 5, 0), (18, 6, 0), (18, 4, 0)] )