Go to: Synopsis. Return value. Related. Flags. Python examples.
polyCreateFacet([constructionHistory=boolean], [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.
polyCreateFacet is undoable, queryable, and editable.
Create a new polygonal object with the specified face, which will be closed.
List of arguments must have at least 3 points.
string[] | Object name and node name. |
In query mode, return type is based on queried flag.
polyAppend, polyAppendVertex, polyBevel, polyChipOff, polyExtrudeEdge, polyExtrudeFacet, polySmooth, polySplit, polySplitVertex, polySubdivideEdge, polySubdivideFacet, polyTriangulate
constructionHistory, hole, name, point, subdivision, texture
Long name (short name) |
Argument types |
Properties |
|
hole(hl)
|
boolean
|
|
|
Add a hole. The following points will define a hole.
Holes can be defined either clockwise or counterclockwise.
Note that this flag is not recommended for use in Python. When specifying facets
with the point flag in Python, pass in an empty point "()" when you want to
start specifying a hole.
|
|
point(p)
|
[[, float, float, float, ]]
|
|
|
Adds a new point to the face.
Coordinates of points are given in world reference.
The point flag may also be passed with no arguments. That indicates that the
following points will specify a hole. Passing the point flag with no
arguments is the same as using the "hole" flag, except that it will work
in Python.
|
|
subdivision(s)
|
int
|
|
|
This flag specifies the level of subdivision.
Subdivides edges into the given number of edges.
C: Default is 1 (no subdivision).
Q: When queried, this flag returns an int.
|
|
texture(tx)
|
int
|
|
|
Specifies how the face is mapped.
0 - None; 1 - Normalize; 2 - Unitize
C: Default is 0 (no mapping).
Q: When queried, this flag returns an int
|
|
Common flags |
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.
|
|
name(n)
|
string
|
|
|
Sets the name of the newly-created node. If it contains
namespace path, the new node will be created under the
specified namespace; if the namespace does not exist, it
will be created.
|
|
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
# Create a triangular facet
cmds.polyCreateFacet( p=[(0.0, 0.0, 0.0), (10.0, 0.0, 0.0), (10.0, 10.0, 0.0)] )
# Create a quadrangular facet with two triangular holes inside
# Note that, in Python, specifying an empty tuple in the point list marks the
# beginning of a hole specification
cmds.polyCreateFacet( p=[(0, 0, 0), (10, 0, 0), (10, 10, 0), (0, 10, 0), (), (4, 2, 0), (5, 4, 0), (6, 2, 0), (), (5, 6, 0), (4, 8, 0), (6, 8, 0)] )
cmds.move( 0, 0, 10, r=True )