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

概要

copyDeformerWeights([destinationDeformer=string], [destinationShape=string], [mirrorInverse=boolean], [mirrorMode=string], [noMirror=boolean], [smooth=boolean], [sourceDeformer=string], [sourceShape=string], [surfaceAssociation=string], [uvSpace=[string, string]])

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

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

デフォーマ ウェイトを XYZ 軸の 1 軸の反対側にコピーまたはミラーするコマンドです。このコマンドを使用して、サーフェスから別のサーフェスへ、または同じサーフェス内で、ウェイトをミラーすることができます。

戻り値

なし

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

キーワード

deformer, duplicate, mirror

フラグ

destinationDeformer, destinationShape, mirrorInverse, mirrorMode, noMirror, smooth, sourceDeformer, sourceShape, surfaceAssociation, uvSpace
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
destinationDeformer(dd) string createqueryedit
目的のシェイプが使用するデフォーマを指定します。
destinationShape(ds) string createqueryedit
目的の変形シェイプを指定します。
mirrorInverse(mi) boolean createqueryedit
値は正領域から負領域へミラーされます。このフラグを使用すると、方向が反転します。
mirrorMode(mm) string createqueryedit
mirrorMode フラグは、ミラー フラグを使用した場合のミラーリングのプレーン(XY、YZ、XZ のいずれか)を定義します。既定のプレーンは XY です。
noMirror(nm) boolean createqueryedit
ミラー フラグを使用しない場合、ウェイトはミラーされずにコピーされます。
smooth(sm) boolean createqueryedit
スムーズフラグを使用するとウェイトは、最近接の 1 つの頂点から割り当てられる代わりに、最近接の頂点間で滑らかに補間されます。
sourceDeformer(sd) string createqueryedit
ウェイトをミラーするデフォーマを指定します。照会すると、ソース シェイプが使用するデフォーマを返します。
sourceShape(ss) string createqueryedit
ソースの変形シェイプを指定します。
surfaceAssociation(sa) string createqueryedit
surfaceAssociation フラグは、ウェイトがサーフェス間で転送される方法、「closestPoint」、「rayCast」、または「closestComponent」を制御します。既定は closestComponent です。
uvSpace(uv) [string, string] createqueryedit
uvSpace フラグはウェイトの転送が、指定したソース UV セットと目標 UV セットに基づいて UV 空間で実施されることを示します。

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

Python 例

import maya.cmds as cmds

# Create plane and a cluster.
#
cmds.file( f=True,new=True )
cmds.polyPlane( ch=1, w=10, h=10, sx=5, sy=5, ax=(0,1,0) )
cmds.cluster( n='testCluster', 'pPlane1' )

# Modify some weights on the -x side of the character
#
cmds.select( ['pPlane1.vtx[0]', 'pPlane1.vtx[6]', 'pPlane1.vtx[12]', 'pPlane1.vtx[18]'])
cmds.percent( 'testCluster', v='0.5' )

# Mirror the skin weights to the other side of the character
# Mirror inverse is chosen since we want to go from -x to +x, not +x to -x.
#
cmds.copyDeformerWeights( ss='pPlane1', ds='pPlane1', sd='testCluster', mirrorMode='YZ', mirrorInverse = True)
cmds.select( ['pPlane1.vtx[5]', 'pPlane1.vtx[11]', 'pPlane1.vtx[17]', 'pPlane1.vtx[23]'])
cmds.percent( 'testCluster', q=True, v=True )