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

概要

polyCollapseTweaks([hasVertexTweaks=boolean])

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

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

それぞれの頂点データに微調整データ(メッシュ ノードに格納)を適用して、メッシュの頂点の微調整を更新するコマンドです。

このコマンドは、コンストラクション ヒストリがシェイプ ノードに関連付けられている場合のみ有効です。

メッシュの名前を入力として指定しないと、単独で選択されたメッシュがある場合は、このメッシュの微調整された頂点がベイク処理されます。

戻り値

なし

照会モードでは、戻り値のタイプは照会されたフラグに基づきます。

フラグ

hasVertexTweaks
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
hasVertexTweaks(hvt) boolean createquery
個々のメッシュに頂点の微調整があるかどうかを判別します。

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

Python 例

import maya.cmds as cmds

# Create a plane.
cmds.polyPlane( sx=10, sy=10, h=20, w=20, ch=0 )

# Query the existence of vertex tweaks for pPlane1
cmds.polyCollapseTweaks ( 'pPlane1', q=True, hvt=True )
# Result: 0

# Move a vertex,
cmds.select( 'pPlane1.vtx[8]', r=True )
cmds.move( 10, 20, 30, r=True )

# Query vertex tweaks for vertex id 8
cmds.getAttr( 'pPlane1.vtx[8]' );
# Result: [(10.0, 20.0, 30.0)]

# Query the existence of vertex tweaks for pPlane1
cmds.polyCollapseTweaks ( 'pPlane1', q=True, hvt=True )
# Result: 1

# Bake all vertex tweaks into their respective vertices.
cmds.polyCollapseTweaks( 'pPlane1' )

# Query vertex tweaks for vertex id 8
cmds.getAttr( 'pPlane1.vtx[8]' );
# Result: [(0.0, 0.0, 0.0)]

# Query the existence of vertex tweaks for pPlane1
cmds.polyCollapseTweaks ( 'pPlane1', q=True, hvt=True )
# Result: 0