ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.
goal(
selectionList
, [goal=string], [index=boolean], [useTransformAsGoal=boolean], [weight=float])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
goal は、取り消し可能、照会可能、および編集不可能です。
特定のパーティクル オブジェクトのゴールとなる特定のオブジェクトを指定します。ゴール オブジェクトがジオメトリの場合、パーティクル オブジェクト内の各パーティクルはそれぞれ、ゴールの特定の頂点、CV、ラティス ポイントの位置に追従するか一致しようとします。ゴール オブジェクトがほかのパーティクル オブジェクトの場合、各パーティクルはゴールのパーティクルに追従しようとします。その他の場合、全パーティクルはゴール オブジェクトがトランスフォームする現在位置に追従しようとします。ジオメトリとパーティクル オブジェクトの場合、この後者の動作については、-utr true を使用しても得られます。ゴール ウェイトはキーフレーム設定できます。これは、ゴールを追加してマルチアトリビュートとなる、パーティクル オブジェクトによります。
| string | コマンドの結果 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
goal(g)
|
string
|
|
||
|
||||
index(i)
|
boolean
|
|
||
|
||||
useTransformAsGoal(utr)
|
boolean
|
|
||
|
||||
weight(w)
|
float
|
|
||
|
||||
import maya.cmds as cmds cmds.sphere( name='surface1') cmds.particle( name='Particle') cmds.goal( 'Particle', g='surface1', w=.75 ) # This command assigns surface1 as a goal of Particle with a goal # weight of 0.75. cmds.goal( 'Particle', g='surface1', w=.75, utr=1 ) # This command assigns the transform of surface1 as a goal of Particle # with a goal weight of 0.75. cmds.goal( 'Particle', g='camera1', w=.75 ) # This command assigns the transform of camera1 as a goal of Particle # with a goal weight of 0.75. The -utr flag is not relevant because # only the transform can be used for any object other than geometry # or particles.