Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

polyListComponentConversion [-border] [-fromEdge] [-fromFace] [-fromUV] [-fromVertex] [-fromVertexFace] [-internal] [-toEdge] [-toFace] [-toUV] [-toVertex] [-toVertexFace] [-vertexFaceAllEdges] selectionItem[]

polyListComponentConversion is undoable, NOT queryable, and NOT editable.

This command converts poly components from one or more types to another one or more types, and returns the list of the conversion. It doesn't change anything of the current database.

Return value

selectionItem[]List of poly components

Related

polyInstallAction, polySelectConstraint, polySelectConstraintMonitor

Flags

border, fromEdge, fromFace, fromUV, fromVertex, fromVertexFace, internal, toEdge, toFace, toUV, toVertex, toVertexFace, vertexFaceAllEdges
Long name (short name) Argument types Properties
-fromVertex(-fv) create
-fromEdge(-fe) create
-fromUV(-fuv) create
-fromFace(-ff) create
-fromVertexFace(-fvf) create
Indicates the component type to convert from. If none of them is provided, it is assumed to be all of them, including poly objects.
-toVertex(-tv) create
-toEdge(-te) create
-toUV(-tuv) create
-toFace(-tf) create
-toVertexFace(-tvf) create
Indicates the component type to convert to. If none of them is provided, it is assumed to the object.
-internal(-in) create
Indicates that the converted components must be totally envolved by the source components. E.g. a converted face must have all of its surrounding vertices being given. If it is not provided, the converted components will be the related ones.
-border(-bo) create
Indicates that the converted components must be on the border of the selection. If it is not provided, the converted components will be the related ones.
-vertexFaceAllEdges(-vfa) create
When converting from face vertices to edges, indicates that all edges with an end at the face vertex should be included. Without this flag, the default behaviour is to only include one edge per face vertex.

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 be used more than once in a command.

MEL examples

// Convert the vertices to envolved poly face(s) and list results.
//
polyListComponentConversion -fv -tf -in plg.vtx[5:6] plg.vtx[9:10];
// Result: plg.f[4] //
// Convert anything to related poly face(s) and list results.
//
polyListComponentConversion -tf plg.vtx[0] plg.vtx[3] plg.vtx[8];
// Result: plg.f[0] plg.f[2] plg.f[3] plg.f[6] //
// Convert an object to faces and list results.
//
polyListComponentConversion    -tf plg;
// Result: plg.f[*] //
// Convert vertices to faces on selectionList and list results.
//
select -r plg.vtx[0] plg.vtx[3] plg.vtx[8];
polyListComponentConversion -fv -tf;
// Result: plg.f[0] plg.f[2] plg.f[3] plg.f[6] //
// Use several calls of the command to list edges in the order
// in which they appear in a face.
//
polyPlane -w 1 -h 1 -sx 1 -sy 1 -ax 0 1 0 -cuv 2 -ch 1;
// Will return the edges in numeric order:
polyListComponentConversion -ff -te pPlane1.f[0];
// Result: pPlane1.e[0:3] //
// Now convert to vertexFace and then to edge to get the edges in the order they
// appear within the face:
string $vfList[] = `polyListComponentConversion -ff -tvf pPlane1.f[0]`;
$vfList = `ls -flatten $vfList`;
// Result: pPlane1.vtxFace[0][0] pPlane1.vtxFace[1][0] pPlane1.vtxFace[3][0] pPlane1.vtxFace[2][0] //
for ($vf in $vfList)
{
string $edge[] = `polyListComponentConversion -fvf -te $vf`;
print ($edge);
}
// Prints out the edges in the order they show up in the face.
pPlane1.e[0]
pPlane1.e[2]
pPlane1.e[3]
pPlane1.e[1]
// Illustrate the vertexFaceAllEdges flag
//
polyPlane -w 1 -h 1 -sx 1 -sy 1 -ax 0 1 0 -cuv 2 -ch 1;
select -r pPlane1.vtxFace[0][0] ;
// Get the edge that originates at the selected face vertex
polyListComponentConversion -fvf -te;
// Result: pPlane1.e[0] //
// Get both edges that adjoin the selected face vertex
polyListComponentConversion -fvf -te -vfa;
// Result: pPlane1.e[0:1] //