ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.

概要

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], [uvShell=boolean], [vertexFaceAllEdges=boolean])

注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。

polyListComponentConversion は、取り消し可能、照会不可能、および編集不可能です。

1 つまたは複数のタイプのポリゴン コンポーネントを別の 1 つまたは複数のタイプに変換し、変換のリストを返します。現在のデータベースは変更されません。

戻り値

selectionItem[]ポリゴン コンポーネントのリスト

関連

polyInstallAction, polySelectConstraint, polySelectConstraintMonitor

フラグ

border, fromEdge, fromFace, fromUV, fromVertex, fromVertexFace, internal, toEdge, toFace, toUV, toVertex, toVertexFace, uvShell, vertexFaceAllEdges
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
border(bo) boolean create
変換後のコンポーネントが、選択範囲の境界上に存在する必要があることを指定します。指定しないと、変換後のコンポーネントは関連したコンポーネントになります。
fromEdge(fe) boolean create
fromFace(ff) boolean create
fromUV(fuv) boolean create
fromVertex(fv) boolean create
fromVertexFace(fvf) boolean create
変換前のコンポーネント タイプを指定します。指定しないと、ポリゴン オブジェクトを含むすべてとみなされます。
internal(internal) boolean create
変換後のコンポーネントにすべてのソース コンポーネントを含める必要があることを指定しますたとえば、指定した周囲の頂点すべてを変換後のフェースに含めます。指定しないと、変換後のコンポーネントは関連したコンポーネントになります。
toEdge(te) boolean create
toFace(tf) boolean create
toUV(tuv) boolean create
toVertex(tv) boolean create
toVertexFace(tvf) boolean create
変換後のコンポーネント タイプを指定します。指定しないとオブジェクトが仮定されます。
uvShell(uvs) boolean create
同じ UV シェル内にある UV コンポーネントを返します。-tuv および -fuv フラグを指定した場合のみ動作します。
vertexFaceAllEdges(vfa) boolean create
フェースの頂点からエッジに変換した場合、フェースの頂点に端があるエッジがすべて含まれるように指定します。このフラグがない場合、既定の動作ではフェースの頂点ごとに 1 つのエッジのみが含まれます。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。

Python 例

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] #

# Use several calls of the command to list edges in the order
# in which they appear in a face.
cmds.polyPlane( w=1, h=1, sx=1, sy=1 )
# Will return the edges in numeric order:
cmds.polyListComponentConversion( 'pPlane1.f[0]', ff=True, te=True )
# 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:
vfList = cmds.polyListComponentConversion( 'pPlane1.f[0]', ff=True, tvf=True )
vfList = cmds.ls( vfList, flatten=True )
# Result: pPlane1.vtxFace[0][0] pPlane1.vtxFace[1][0] pPlane1.vtxFace[3][0] pPlane1.vtxFace[2][0]
for vf in vfList:
	edge = cmds.polyListComponentConversion( vf, fvf=True, te=True )
	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
cmds.polyPlane( w=1, h=1, sx=1, sy=1 )
cmds.select( 'pPlane1.vtxFace[0][0]', r=True )
# Get the edge that originates at the selected face vertex
print cmds.polyListComponentConversion( fvf=True, te=True )
# Result: pPlane1.e[0]
# Get both edges that adjoin the selected face vertex
print cmds.polyListComponentConversion( fvf=True, te=True, vfa=True )
# Result: pPlane1.e[0:1]