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

Synopsis

polyListComponentConversion( selectionItem[] , [border=boolean], [fromEdge=boolean], [fromFace=boolean], [fromUV=boolean], [fromVertex=boolean], [fromVertexFace=boolean], [internal=boolean], [toEdge=boolean], [toFace=boolean], [toUV=boolean], [toVertex=boolean], [toVertexFace=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

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
Long name (short name) Argument types Properties
fromVertex(fv) boolean create
fromEdge(fe) boolean create
fromUV(fuv) boolean create
fromFace(ff) boolean create
fromVertexFace(fvf) boolean 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) boolean create
toEdge(te) boolean create
toUV(tuv) boolean create
toFace(tf) boolean create
toVertexFace(tvf) boolean create
Indicates the component type to convert to. If none of them is provided, it is assumed to the object.
internal(internal) boolean 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) boolean 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.

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.

Python examples

import maya.cmds as cmds

# Convert the vertices to envolved poly face(s) and list results.
cmds.polyListComponentConversion( 'plg.vtx[5:6]', 'plg.vtx[9:10]', fv=True, tf=True, internal=True )
# Result: plg.f[4] #

# Convert anything to related poly face(s) and list results.
cmds.polyListComponentConversion( 'plg.vtx[0]', 'plg.vtx[3]', 'plg.vtx[8]', tf=True )
# Result: plg.f[0] plg.f[2] plg.f[3] plg.f[6] #

# Convert an object to faces and list results.
cmds.polyListComponentConversion( 'plg', tf=True )
# Result: plg.f[*] #

# Convert vertices to faces on selectionList and list results.
cmds.select( 'plg.vtx[0]', 'plg.vtx[3]', 'plg.vtx[8]', r=True )
cmds.polyListComponentConversion( fv=True, tf=True )
# Result: plg.f[0] plg.f[2] plg.f[3] plg.f[6] #